// Franck P. LEVY// Fonctions gŽnŽriques de traitement des frames.var FPLDEBUGFNIN = true;		/* EntrŽe dans les fonctions */var FPLDEBUGFNOUT = true;		/* Sortie des fonctions */var FPLDEBUGFNARG = true;		/* Arguments des fonctions */var FPLDEBUGFNSRC = true;		/* URL source de l'appel de la fonction */var FPLDEBUGFNVAR = true;		/* Valeurs des variables */var FPLDEBUGFNURL = true;		/* Changement d'URL */var FPLDEBUGFNHTM = true;		/* Ecriture dans le document HTML */var FPLDEBUGFNALT = true;		/* Alternatif */var SECINMIN = 60;							/* Nombre de secondes dans une minute */var MININHOUR = 60;							/* Nombre de minutes dans une heure */var HOURINDAY = 24;							/* Nombre d'heures dans un jour */var DAYINWEEK = 7;							/* Nombre de jours dans une semaine */var DAYINYEAR = 365.25;						/* Nombre de jours dans une annŽe */var MONTHINYEAR = 12;						/* Nombre de mois dans une annŽe */var DAYINMONTH = DAYINYEAR / MONTHINYEAR;	/* Nombre de jours dans un mois */var SECOND = 1000;			/* Nombre de millisecondes dans une seconde */var MINUTE = SECOND * 60;	/* Nombre de millisecondes dans une minute */var HOUR = MINUTE * 60;		/* Nombre de millisecondes dans une heure */var DAY = HOUR * 24;		/* Nombre de millisecondes dans une journŽe */var WEEK = DAY * 7;			/* Nombre de millisecondes dans une semaine */var YEAR = DAY * 364.25;	/* Nombre de millisecondes dans une annŽe standard */var MONTH = YEAR / 12;		/* Nombre de millisecondes dans un mois standard */var SHOWUPDATEDDELAY = 4;	/* DurŽe d'apparition d'une date de mise ˆ jour en semaines */var SHOWNEWDELAY = 4;		/* DurŽe d'appairtion d'une date de crŽation en semaines */var agt = navigator.userAgent.toLowerCase();var majorVersion = parseInt(navigator.appVersion);var minorVersion = parseFloat(navigator.appVersion);var is_ie = (agt.indexOf('msie') != -1);if (is_ie) majorVersion = parseInt(agt.substring(agt.indexOf('msie ')+5));if (is_ie) minorVersion = parseFloat(agt.substring(agt.indexOf('msie ')+6));var is_ns = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) && (agt.indexOf('webtv')==-1));var is_truens = (agt.indexOf("netscape")!=-1);if (is_truens) majorVersion = parseInt(agt.substring(agt.indexOf('netscape')+10));if (is_truens) minorVersion = parseFloat(agt.substring(agt.indexOf('netscape')+12));var is_ns3 = (majorVersion==3 && is_ns);var is_ns4 = (majorVersion==4 && is_ns);var is_ns6 = (majorVersion==6 && is_ns);var is_ns4up = (is_ns && (majorVersion >= 4));var is_ie3 = (majorVersion==3 && is_ie);var is_ie4 = (majorVersion==4 && is_ie);var is_ie4up = (is_ie && (majorVersion >= 4));var is_ie5up = (is_ie && (majorVersion > 4));var is_mac = (agt.indexOf("mac")!=-1);var is_IEmacDud = is_mac && is_ie && (majorVersion<4);var is_linux = (agt.indexOf("linux")!=-1);var is_pc = (agt.indexOf("win")!=-1);// var crlf = "\r\n";		/* Windows */var crlf = "\r";			/* Macintosh */// var crlf = "\n";		/* Unix */var timestamp = 0;function debug(flag, label, value){	if (flag) {		var msg = " " + label + "=" + value;		var now = new Date();		var elapsed = now - timestamp;		if (elapsed < 10000) {			msg += " (" + elapsed + " msec)";		}		msg = now + ": " + msg;		alert(msg);	}}function ToggleParaDyn(nr, expand){	/* Utilisation:																										*/	/* Partie permettant l'affichage de la partie masquŽe:																*/	/* <span id="cmd1" class="paracmd"><a href="javascript:ToggleParaDyn('1',true)"><img ...></a></span>				*/	/* Partie permettant de masquer la partie affichŽe prŽcedement:														*/	/* <span id="dyn1" class="paradyn">...<a href="javascript:ToggleParaDyn('1',false)"><img ...></a></span>			*/	if (expand)	{		cmdstyle = "none";		dynstyle = "inline";	}	else	{		cmdstyle = "inline";		dynstyle = "none";	}	if (document.getElementById) /* Netscape 5 and Explorer 5 */	{		document.getElementById("cmd" + nr).style.display = cmdstyle;		document.getElementById("dyn" + nr).style.display = dynstyle;	}	else if (document.all) /* Explorer 4 */	{		document.all["cmd" + nr].style.display = cmdstyle;		document.all["dyn" + nr].style.display = dynstyle;	}}function ShowBrowserInfo(){	var FPLDEBUGFN = 0;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "ShowBrowserInfo()", "start...");	if (is_ie) {		document.write(navigator.appName);		document.write(" " + majorVersion + "." + minorVersion);	} else {		if (is_ns) {			document.write(navigator.appName);			document.write(" " + majorVersion + "." + minorVersion);		} else {			document.write(navigator.appName);			document.write(" " + majorVersion + "." + minorVersion);		}	}		if (is_mac) {		document.write(" on MacOS");	} else {		if (is_linux) {			document.write(" on Linux");		} else {			if (is_pc) {				document.write(" on Windows");			} else {				document.write("");			}		}	}//	document.write(". (" + navigator.userAgent + ":" + navigator.appName + ":" + navigator.appVersion + ")");	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "ShowBrowserInfo()", "end...");}// Fonction gŽnŽrique de remplacement d'un caractrefunction replaceChar(theString, theOldChar, theNewChar){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "replaceChar()", "start...");	debug(FPLDEBUGFNARG && FPLDEBUGFN, "theString, theOldChar, theNewChar", theString + ", " + theOldChar + ", " + theNewChar);	var theTemp = theString;	var theIndex = theTemp.indexOf(theOldChar);	while (theIndex != -1)	{		theTemp = theTemp.substr(0, theIndex) + theNewChar + theTemp.substr(theIndex + 1);		theIndex = theTemp.indexOf(theOldChar);	}	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "replaceChar()", "end...");	return theTemp;}// Remplace tous les caractres $ par le caractre # dans une chaine de caractresfunction makeTrueAnchor(theString){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "makeTrueAnchor()", "start...");	debug(FPLDEBUGFNARG && FPLDEBUGFN, "theString", theString);	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "makeTrueAnchor()", "end...");	return replaceChar(theString, '$', '#');}// Remplace tous les caractres # par le caractre $ dans une chaine de caractresfunction makeFalseAnchor(theString){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "makeFalseAnchor()", "start...");	debug(FPLDEBUGFNARG && FPLDEBUGFN, "theString", theString);	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "makeFalseAnchor()", "end...");	return replaceChar(theString, '#', '$');}// Remplace tous les caractres ? par le caractre @ dans une chaine de caractresfunction makeFalseSearch(theString){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "makeFalseSearch()", "start...");	debug(FPLDEBUGFNARG && FPLDEBUGFN, "theString", theString);	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "makeFalseSearch()", "end...");	return replaceChar(theString, '?', '@');}// Remplace tous les caractres @ par le caractre ? dans une chaine de caractresfunction makeTrueSearch(theString){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "makeTrueSearch()", "start...");	debug(FPLDEBUGFNARG && FPLDEBUGFN, "theString", theString);	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "makeTrueSearch()", "end...");	return replaceChar(theString, '@', '?');}// Partie A:n'est valable que pour les pages index.html// Force l'affichage au plus haut niveau (empche que la page soit affichŽe dans une frame)function frameJammer_top(){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "frameJammer_top()", "start...");	debug(FPLDEBUGFNSRC && FPLDEBUGFN, "called from", location.href);	// anti-hijacking frame buster code	debug(FPLDEBUGFNVAR && FPLDEBUGFN, "self.location", self.location);	debug(FPLDEBUGFNVAR && FPLDEBUGFN, "top.location", top.location);	if (self != top)	{		debug(FPLDEBUGFNURL && FPLDEBUGFN,"top.location = self.location", " self.location=" + self.location);		top.location = self.location;	}	debug(FPLDEBUGFNSRC && FPLDEBUGFN, "end of called from", location.href);	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "frameJammer_top()", "end...");}// Partie B: ˆ placer dans toutes les pages devant tre affichŽes dans une frame// Force l'affichage d'une page dans la frame o est doit tre affichŽe//  theGoodName:	Nom de la frame ou doit de trouver la page (ex: ftopic_pres)//  theGoodPage:	Page contenant le Frameset (ex:page.html)// theGoodPath:	Chemin relatif de la page par rapport au frameset function frameJammer_in(theGoodName, theGoodPage, theGoodPath){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "frameJammer_in()", "start...");	debug(FPLDEBUGFNARG && FPLDEBUGFN, "theGoodName, theGoodPage, theGoodPath", theGoodName + ", "+ theGoodPage + ", " + theGoodPath);	debug(FPLDEBUGFNSRC && FPLDEBUGFN, "called from", location.href);	debug(FPLDEBUGFNVAR && FPLDEBUGFN, "window.name", window.name);	if ((window.name != theGoodName) && !((self.innerHeight == 0) && (self.innerWidth == 0)))	{		// La page n'est pas affichŽe dans le bon cadre.		var theLocation = location.href.substring(location.href.lastIndexOf('/')+1);		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theLocation", theLocation);		var theLocationToGo = theGoodPath + theGoodPage + '?' + escape(theLocation) + '~' + theGoodName;		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theLocationToGo", theLocationToGo);		// Remplace les $ par des #		theLocationToGo = makeTrueAnchor(theLocationToGo);		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theLocationToGo", theLocationToGo);		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "top.location", top.location);		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "self.location", self.location);		if (top.location == self.location)		{			// On se trouve au niveau le plus haut (_top)			// On remplace l'URL de top			debug(FPLDEBUGFNURL && FPLDEBUGFN,"top.location.replace(theLocationToGo)", " theLocationToGo=" + theLocationToGo);			top.location.replace(theLocationToGo);		}		else		{			// On est dans une frame			// On change l'URL de top			debug(FPLDEBUGFNURL && FPLDEBUGFN,"top.location = theLocationToGo", " theLocationToGo=" + theLocationToGo);			top.location = theLocationToGo;		}	}	debug(FPLDEBUGFNSRC && FPLDEBUGFN, "end of called from", location.href);	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "frameJammer_in()", "end...");}// Partie C: ˆ placer dans toutes les pages contenant des framesets// Traitement de l'affichage correct des contenus des frames//  Appel ˆ placer dans <frameset ... onLoad="frameJammer_hp()">function frameJammer_hp(){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "frameJammer_hp()", "start...");	debug(FPLDEBUGFNSRC && FPLDEBUGFN, "called from", location.href);	var theSearchIndex = location.href.indexOf('?');	debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theSearchIndex", theSearchIndex);	if (theSearchIndex != -1)	{		var framedPage = location.href.substring(theSearchIndex);		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "framedPage", framedPage);		framedPage = unescape(framedPage.substring(1));		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "framedPage", framedPage);//		framedPage = unescape(framedPage);//		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "framedPage", framedPage);		// Remplace les $ par des #		framedPage = makeTrueAnchor(framedPage);		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "framedPage", framedPage);		var theSplit = framedPage.lastIndexOf('~');		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theSplit", theSplit);		var thePage = framedPage.substring(0, theSplit);		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "thePage", thePage);		var theFrame = framedPage.substring(theSplit+1);		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theFrame", theFrame);		var theLast = thePage.indexOf('~');		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theLast", theLast);				var theActionJammer = "self." + theFrame + ".location";		debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theActionJammer", theActionJammer);		if (theLast == -1)		{			debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theLast", theLast);			// Si la frame contient la page void.html, on utilise un replace()			// Recherche de la page actuellement affichŽe dans la frame			var theFrameIsBlank = eval(theActionJammer + ".href.indexOf('void.html')");			debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theFrameIsBlank", theFrameIsBlank);			if (theFrameIsBlank  != -1)			{				// Redirection -> utilisation de .replace pour bypasser l'historique				var theActionJammer = theActionJammer + ".replace(\'" + thePage + "\')";				debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theActionJammer", theActionJammer);			}			else			{				// Pas de redirection -> utilisation de = pour enregistrer l'URL dans l'historique				var theActionJammer = theActionJammer + "=\'" + thePage + "\'";				debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theActionJammer", theActionJammer);			}		}		else		{			debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theLast", theLast);			// Si la frame contient la page void.html, on utilise un replace()			// Recherche de la page actuellement affichŽe dans la frame			var theFrameIsBlank = eval(theActionJammer + ".href.indexOf('void.html')");			debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theFrameIsBlank", theFrameIsBlank);			if (theFrameIsBlank != -1)			{				// Redirection -> utilisation de .replace pour bypasser l'historique				var theActionJammer = theActionJammer + ".replace(\'" + thePage + "\')";				debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theActionJammer", theActionJammer);			}			else			{				// Pas de redirection -> utilisation de = pour enregistrer l'URL dans l'historique				var theActionJammer = theActionJammer + "=\'" + thePage + "\'";				debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theActionJammer", theActionJammer);			}		}		debug(FPLDEBUGFNURL && FPLDEBUGFN,"eval(theActionJammer)", " theActionJammer=" + theActionJammer);		eval(theActionJammer);	}	debug(FPLDEBUGFNSRC && FPLDEBUGFN, "end of called from", location.href);	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "frameJammer_hp()", "end...");}// Fonction de mise en place des frameset dynamiques// Nota: Pour Internet Explorer, il n'est pas nŽcessaire de dŽfinir l'URL de la page d'une frame pour que la frame soit dŽfinie.//       Par contre pour Netscape, il faut obligatoirement une URL (ici void.html) pour que la frame soit dŽfinie.//       Un effet perverse de ceci fait que le retour en arrire dans l'historique passe d'abord par l'affichage de la page blank.html !function frameJammer_dyn(theLocation, theSize, theDynFrame, theNameOne, theURLOne, theNameTwo, theURLTwo){	var FPLDEBUGFN = false;	debug(FPLDEBUGFNIN && FPLDEBUGFN, "frameJammer_dyn()", "start...");	debug(FPLDEBUGFNARG && FPLDEBUGFN, "theLocation, theSize, theDynFrame, theNameOne, theURLOne, theNameTwo, theURLTwo",  theLocation + ", " + theSize + ", " + theDynFrame + ", " + theNameOne + ", " + theURLOne + ", " + theNameTwo + ", " + theURLTwo);	debug(FPLDEBUGFNSRC && FPLDEBUGFN, "called from", location.href);	// FPL le 7/12/2001: L'intŽgralitŽ du code HTML est initialisŽ dans un buffer et Žcrit en une seule fois dans le document.	// 	Cela permet d'Žviter le parsing du contenu des frames au fur et a mesure de l'Žcriture.	var buffer = "";		// Test si il y a une partie search dans l'URL	var theSearchIndex = theLocation.indexOf('?');	debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theSearchIndex", theSearchIndex);		// Ecriture du tag <FRAMESET>	if (theSearchIndex != -1)	{		buffer += "<frameset rows=\"" + theSize + "\" border=\"0\" framespacing=\"0\" frameborder=\"no\" onload=\"frameJammer_hp()\">";		debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "<frameset rows=\"" + theSize + "\" border=\"0\" framespacing=\"0\" frameborder=\"no\" onload=\"frameJammer_hp()\">");	}	else	{		buffer += "<frameset rows=\"" + theSize + "\" border=\"0\" framespacing=\"0\" frameborder=\"no\">";		debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "<frameset rows=\"" + theSize + "\" border=\"0\" framespacing=\"0\" frameborder=\"no\">");	}	// Remplace les $ par des #	theURLOne = makeTrueAnchor(theURLOne);	debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theURLOne", theURLOne);	theURLTwo = makeTrueAnchor(theURLTwo);	debug(FPLDEBUGFNVAR && FPLDEBUGFN, "theURLTwo", theURLTwo);	// Test sur le numŽro de la frame ayant une taille dynamique	if (theDynFrame == 1)	{		// La premire frame a une taille dynamique		if (theSearchIndex  != -1)		{			// Il y a une composition dynamique en cours, on prŽpare ici une frame vierge			// sans URL dŽfinie si Internet Explorer, avec void.html dans les autres cas			debug(FPLDEBUGFNVAR && FPLDEBUGFN, "is_ie4up && !is_mac", (is_ie4up && !is_mac));			if (is_ie4up && !is_mac)			{				// FPL le 14/06/2002: Rajout src="void.html"				buffer += crlf + "<frame src=\"void.html\" name=\"" + theNameOne + "\" noresize>";				debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "<frame name=\"" + theNameOne + "\" noresize>");			}			else			{				buffer += crlf + "<frame src=\"void.html\" name=\"" + theNameOne + "\" noresize>";				debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "<frame src=\"void.html\" name=\"" + theNameOne + "\" noresize>");			}		}		else		{			buffer += crlf + "<frame src=\"" + theURLOne + "\" name=\"" + theNameOne + "\" noresize>";			debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "<frame src=\"" + theURLOne + "\" name=\"" + theNameOne + "\" noresize>");		}		buffer += crlf + "<frame src=\"" + theURLTwo + "\" name=\"" + theNameTwo + "\" scrolling=\"no\" noresize>";		debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line","<frame src=\"" + theURLTwo + "\" name=\"" + theNameTwo + "\" scrolling=\"no\" noresize>");	}	else	{		// La deuxime frame a une taille dynamique		buffer += crlf + "<frame src=\"" + theURLOne + "\" name=\"" + theNameOne + "\" scrolling=\"no\" noresize>";		debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line","<frame src=\"" + theURLOne + "\" name=\"" + theNameOne + "\" scrolling=\"no\" noresize>");		if (theSearchIndex  != -1)		{			// Il y a une composition dynamique en cours, on prŽpare ici une frame vierge			// sans URL dŽfinie si Internet Explorer, avec void.html dans les autres cas			debug(FPLDEBUGFNVAR && FPLDEBUGFN, "is_ie4up && !is_mac", is_ie4up && !is_mac);			if (is_ie4up && !is_mac)			{				// FPL le 14/06/2002: Rajout src="void.html"				buffer += crlf + "<frame src=\"void.html\" name=\"" + theNameTwo + "\" noresize>";				debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "<frame name=\"" + theNameTwo + "\" noresize>");			}			else			{				buffer += crlf + "<frame src=\"void.html\" name=\"" + theNameTwo + "\" noresize>";				debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "<frame src=\"void.html\" name=\"" + theNameTwo + "\" noresize>");			}		}		else		{			buffer += crlf + "<frame src=\"" + theURLTwo + "\" name=\"" + theNameTwo + "\" noresize>";			debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "<frame src=\"" + theURLTwo + "\" name=\"" + theNameTwo + "\" noresize>");		}	}		// Ecriture du tag </FRAMESET>	buffer += crlf + "</frameset>" + crlf;	debug(FPLDEBUGFNHTM && FPLDEBUGFN, "line", "</frameset>");	debug(FPLDEBUGFNHTM && FPLDEBUGFN, "text", buffer);	document.write(buffer);	debug(FPLDEBUGFNSRC && FPLDEBUGFN, "end of called from", location.href);	debug(FPLDEBUGFNOUT && FPLDEBUGFN, "frameJammer_dyn()", "end...");}// Fonction de dŽtermination du chemin d'accs aux images en fonction du niveau hiŽrarchiquefunction GetPathImg(pathLevel){	var thePathImg = "";	for (k = 0; k < pathLevel; k++) {		thePathImg = thePathImg +"../";	}	thePathImg = thePathImg + "img/";	return thePathImg}// Fonction d'affichage d'une valeur sous forme de digits imagefunction ShowDigits(value, maxDigits, withZero, pathLevel){	var thePathImg = GetPathImg(pathLevel) + "digits/";	if (value == -1) {		var theString = "?";	} else {		var theString = "" + value + "";	}	for (i = 0; i < (maxDigits - theString.length); i++) {		if (withZero && (value != -1)) {			document.write("<img height=\"17\" width=\"12\" src=\"" + thePathImg + "d0.gif\" border=\"0\" hspace=\"1\" vspace=\"1\">");		} else {			document.write( "<img height=\"17\" width=\"12\" src=\"" + thePathImg + "ds.gif\" border=\"0\" hspace=\"1\" vspace=\"1\">");		}	}	if (value == -1) {		document.write( "<img height=\"17\" width=\"12\" src=\"" + thePathImg + "du.gif\" border=\"0\" hspace=\"1\" vspace=\"1\">");	} else {		for (j = 0; j < theString.length; j++) {			document.write("<img height=\"17\" width=\"12\" src=\"" + thePathImg + "d" + theString.substr(j, 1) +".gif\" border=\"0\" hspace=\"1\" vspace=\"1\">");		}	}}// Fonction d'affichage de l'icone "new!" si la date fournie a moins d'un moisfunction NewOn(year, month, day, pathLevel){	ShowNewOn(false, year, month, day, pathLevel);}// Fonction d'affichage de l'icone "new!" Žventuellement suivi de la date, si la date fournie a moins d'un moisfunction ShowNewOn(withText, year, month, day, pathLevel){	var thePathImg = GetPathImg(pathLevel);	var now = new Date();	var delay = new Date(SHOWNEWDELAY * WEEK);	var expire = new Date(year, month - 1, day, now.getHours(), now.getMinutes(), now.getSeconds() + 1);	if ((expire.getTime() + delay.getTime()) >= now.getTime())	{		document.write("<img height=\"11\" width=\"28\" src=\"" + thePathImg + "new.gif\" border=\"0\" hspace=\"5\" alt=\"New!\" align=\"bottom\">");		if (withText)		{			var theTexte = "since ";			if (month < 10) theTexte = theTexte + "0";			theTexte = theTexte + month + "/";			if (day < 10) theTexte = theTexte + "0";			theTexte = theTexte + day + "/" + year;			document.write(theTexte);		}	}}// Fonction d'affichage de l'icone "updated" si la date fournie a moins d'un moisfunction UpdatedOn(year, month, day, pathLevel){	ShowUpdatedOn(false, year, month, day, pathLevel);}// Fonction d'affichage de l'icone "updated" Žventuellement suivi de la date, si la date fournie a moins d'un moisfunction ShowUpdatedOn(withText, year, month, day, pathLevel){	var thePathImg = GetPathImg(pathLevel);	var now = new Date();	var delay = new Date(SHOWUPDATEDDELAY * WEEK);	var expire = new Date(year, month - 1, day, now.getHours(), now.getMinutes(), now.getSeconds() + 1);	if ((expire.getTime() + delay.getTime()) >= now.getTime())	{		document.write("<img height=\"11\" width=\"44\" src=\"" + thePathImg + "updated.gif\" border=\"0\" hspace=\"5\" alt=\"Updated\" align=\"bottom\">");		if (withText)		{			var theTexte = "on ";			if (month < 10) theTexte = theTexte + "0";			theTexte = theTexte + month + "/";			if (day < 10) theTexte = theTexte + "0";			theTexte = theTexte + day + "/" + year;			document.write(theTexte);		}	}}// Fonction d'affichage du dŽlai (Žventuellement arrondi) avant une date donnŽe// range = durŽe en jours (0 si pas de durŽe)function ShowExpiredOn(year, month, day, range){	var nDate = new Date();						/* date courante (local) */	var nTime = nDate.getTime();				/* temps courant (UTC) */	var dTime = Date.UTC(year, month - 1, day);	/* temps limite (UTC) */	/* On arrondi le temps courant et le temps limite au jour entier */	nTime = Math.floor(nTime / DAY);	dTime = Math.floor(dTime / DAY);	var bTime = dTime - nTime;			/* DiffŽrence entre les deux temps en jours, peut tre nŽgatif ou positif */	var nDays = Math.round(bTime);		/* Nombre de jours (nŽgatif ou positif) */	var rDays = 0;	if (nDays == -1)	{		if (range > 1)		{			// En cours			document.write("<font color=\"teal\">in progress</font>");		}		else		{			// ExpirŽ			document.write("<font color=\"red\">yesterday</font>");		}	}	else	{		if (nDays == 0)		{			document.write("<font color=\"teal\">today</font>");		}		else		{			if (nDays == 1)			{				document.write("<font color=\"green\">tomorrow</font>");			}			else			{				if (nDays < 0)				{					rDays = range + nDays					if (rDays > 0)					{						// En cours						document.write("<font color=\"teal\">in progress</font>");					}					else					{						// DŽlai ŽcoulŽ						document.write("<font color=\"red\">expired</font>");					}				}				else				{					// DŽlai non ŽcoulŽ					var nWeeks = Math.floor(nDays / DAYINWEEK);				/* Nombre de semaines */					if (nDays < 21)					{						if (nDays <= 14) { document.write("<font color=\"green\">"); }						document.write(nDays + " days");						if (nDays <= 14) { document.write("</font>"); }					}					else					{						if (nWeeks < 6)						{							rDays = Math.floor(nDays - (nWeeks * DAYINWEEK));							if (rDays == 0)							{								document.write(nWeeks + " week");							}							else							{								nWeeks = nWeeks + 1;								document.write("&lt; " + nWeeks + " week");							}							if (nWeeks > 1) { document.write("s"); }						}						else						{							var nMonths = Math.floor(nDays / DAYINMONTH);	/* Nombre de mois */							if (nMonths < 10)							{								rDays = Math.floor(nDays - (nMonths * DAYINMONTH));								if (rDays == 0)								{									document.write(nMonths + " month");								}								else								{									nMonths = nMonths + 1;									document.write("&lt; " + nMonths + " month");								}								if (nMonths > 1) { document.write("s"); }							}							else							{								var nYears = Math.floor(nDays / DAYINYEAR);	/* Nombre d'annŽes */								rDays = Math.floor(nDays - (nYears * DAYINYEAR));								if (rDays == 0)								{									document.write(nYears + " year");								}								else								{									if (rDays < (DAYINYEAR / 2))									{										document.write("&gt; " + nYears + " year");									}									else									{										nYears = nYears + 1;										document.write("&lt; " + nYears + " year");									}								}								if (nYears > 1) { document.write("s"); }							}						}					}				}			}		}	}	}function CalendarDay(){	calendar = new Date();	day = calendar.getDay();		/* Day of date */	month = calendar.getMonth();	/* Month of date */	date = calendar.getDate();		/* Current date */	year = calendar.getYear();		/* Year of date */	if (year < 1000) year+=1900;	/* Adjust year if necessary */			var dayname = new Array ("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");	var monthname = new Array ("January","February","March","April","May","June","July","August","September","October","November","December" );	// Display day name	document.write(dayname[day] + ", ");	// Display month name	document.write(monthname[month] + " ");	// Display date number	if (date < 10) document.write(date + ", ");	/* document.write("0" + date + ", "); */	else document.write(date + ", ");	// Display year number	document.write(year);}