function MsgAccueil (nomfichier,h,w) {
	i = nomfichier.lastIndexOf("/");j = nomfichier.indexOf(".htm") - ++i;suff = nomfichier.substr(i,j);
//	i = nomfichier.indexOf(".htm");suff = nomfichier.substr(0,i);
//	alert ("suff = " + suff);
	if (document.cookie) {
		index = document.cookie.indexOf("Rappel_Date"+suff);
//		alert ("index = "+ index);
		if ( index != -1) { M = new Date();
			d = M.getDate();	// if ( d < 10) {d = "0" + d}
			m = M.getMonth();	// if ( m < 10) {m = "0" + m}
			y = M.getYear() - 1900; Ref = y*10000 + m*100 + d*1;
			var futur = new Date(y + 2,m,d);
//			alert ("y = " + y + "\nm = " + m + "\nd = " + d + "\nRef = " + Ref + "\nfutur = " + futur.toGMTString());
			if ( chercher ('Rappel_Date'+suff) - Ref > 0 ) {
//				alert ("Ne pas rappeler : semaine en cours ou jamais plus");
				n = chercher ('visites'); n = eval(n) + 1;
				document.cookie = "visites=" + n + " ; expires=" + futur.toGMTString();
				return null;
			}
			else {
//				alert ("Rappeler : semaine ecoulee");
				popupwindow(nomfichier,h,w);
			}
		}
		else {
//			alert ("Rappeler : la prochaine fois");
			popupwindow(nomfichier,h,w);
			return null;
		}
	}
	else {
//		alert ("Premiere fois");
		popupwindow(nomfichier,h,w);
	}
return null;
}

function popupwindow(nomfichier,h,w) {
	var a; width = w; height = h;
	winleft= Math.round((screen.width-width)/2);
	var ua = window.navigator.userAgent;var oper = ua.indexOf ("Opera ");
//	if ((navigator.appName=="Netscape")){h = h*1.1; w = w*1.1;}
//	if (oper > 1){h = h*1.1; w = w*1.1;}
	a=window.open(nomfichier, 'popup', 'toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=auto,resizable=no,width='+ w + ',height='+ h);
	a.focus(); a.moveTo(-450,100); winpos = (-450);
	if (oper > 1){a.moveTo(-200,0); winpos = (-300); winleft= 0;}
	while(winpos < winleft)	{
		a.moveBy(5,0); winpos += 5;
	}
}

function chercher (nom) {
var chaine = document.cookie ;
nom = nom + "=";
var longueur = nom.length ; var result;
if(chaine.length > 0) {
	debut = chaine.indexOf( nom , 0 );
	if (debut >= 0) {
		fin = chaine.indexOf( ";" , debut+longueur );
		if (fin >= 0) {
			 result = unescape(chaine.substring(debut+longueur,fin));
			}
			else result = unescape(chaine.substring(debut+longueur,chaine.length));
		}
	else result = 0;
	}
else result = 0;
return result;
}
