// TN 2 : date stamp function

var ns = navigator.appName == "Netscape"; 

var month = new Array("janvier", "f&eacute;vrier", "mars", "avril", "mai", "juin", "juillet", "a&ucirc;ot", "septembre", "octobre", "novembre", "d&#233;cembre")
var day = new Array( "Dimanche", "Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi");

function y2k(number) { return (number < 1000) ? number + 1900 : number; }

function openMapCopyright() {
     window.open('http://www.microsoft.com/mappoint/net/terms.mspx','MapPoint_Copyright','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=yes,width=575,height=380')  
}
function urlPopup(new_url,urlWinWidth,urlWinHeight,urlWinScroll) {
		var urlWinWidth = (urlWinWidth)? urlWinWidth:480;
		var urlWinHeight = (urlWinHeight)? urlWinHeight:275;
		var urlWinScroll = (urlWinScroll)? urlWinScroll:'yes';
		NewWindow = self.open(new_url,"",'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars='+ urlWinScroll + ',resizable=yes,copyhistory=yes,width= ' + urlWinWidth + ',height=' + urlWinHeight + ',screenX=150,screenY=120,left=150,top=120');
}
function appPopup(new_url,appWinWidth,appWinHeight,appWinScroll)  {       	
		var appWinWidth = (appWinWidth)? appWinWidth:480;
		var appWinHeight = (appWinHeight)? appWinHeight:275;
		var appWinScroll = (appWinScroll)? appWinScroll:'yes';				
		NewWindow = self.open(new_url,"appWindow",'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=' + appWinScroll + ',resizable=yes,copyhistory=yes,width= '+appWinWidth+',height='+appWinHeight+',screenX=150,screenY=120,left=150,top=120');
}

function appPopupNew(new_url,appWinWidth,appWinHeight,appWinScroll,appWinStatus)  {       	
		var appWinWidth = (appWinWidth)? appWinWidth:480;
		var appWinHeight = (appWinHeight)? appWinHeight:275;
		var appWinScroll = (appWinScroll)? appWinScroll:'yes';				
		NewWindow = self.open(new_url,"appWindow",'toolbar=yes,location=yes,directories=yes,status=' + appWinStatus + ',menubar=yes,scrollbars=' + appWinScroll + ',resizable=yes,copyhistory=yes,width= '+appWinWidth+',height='+appWinHeight+',screenX=150,screenY=120,left=150,top=120');
}

function pestPopup(new_url)  {
        NewWindow = self.open(new_url,"pestWindow","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width=640,height=480,screenX=150,screenY=120,left=150,top=120");
}

var ie5 = (document.all && document.getElementbyID) ? false : true;

var isMac = (navigator.appVersion.indexOf("Mac") == -1) ? false : true;

var win, win2;	


function openWinnew(url, popWidth, popHeight, popScroll, popStatus) {

		var winName =  "popup";

		// popStatus is a new parameter; it is optional so that old calls will not cause an error

		var statusBar = popScroll; 

		

		if (popStatus != null) { 

			statusBar  = popStatus;

			// 'fix' for Mac IE's problem when including a status bar in the pop up window

			// - the browser chops off the bottom 18 pixels of the window to accomodate for the

			//   the status bar, and so we add 18 pixels to the height			

			if (!ie5 && !ns && isMac) { popHeight += 18; }

		}



		if(win) {

			if(!win.closed) {

				if(win.name == "popup") winName = "popup2";	

			  	win.close(); 

			}			

			win = null;	

		}

		

		win=window.open(url, winName, 'width=' + popWidth + ',height=' + popHeight + ',screenX=25,screenY=150,left=25,top=150,scrollbars=' + popScroll + ',resizable=yes,status=' + statusBar + '');

		

		if (win.opener == null) win.opener = self;

		win.focus();

	}