function popup(l,h,url) {
	hauteur=Math.round((screen.availHeight-h)/2);
	largeur=Math.round((screen.availWidth-l)/2);
	window.open(url, "site", "toolbar=0,location=0,directories=0,status=0, scrollbars=0,resizable=0,menubar=0,top="+hauteur+",left="+largeur+",width="+l+",height="+h);
}

function twPopupImage(img, titre) {
  // Compatible IE5+ / NN6+ / Mozilla
 oFenetre = window.open('','Image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no');
 oFenetre.document.write("<html><head><title>"+titre+"</title></head>");
 oFenetre.document.write("<script type=\"text/javascript\">function twAjustePopUp() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+25,document.images[0].height+55); window.focus();} else { setTimeout('twAjustePopUp()',1000) } }</"+"script>");
 oFenetre.document.write("<body onload='twAjustePopUp()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
 oFenetre.document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><tr><td valign='middle' align='center'>");
 oFenetre.document.write("<img src='"+img+"' border='0' alt='"+titre+"' title='"+titre+"'>");
 oFenetre.document.write("</td></tr></table></body></html>");
 oFenetre.document.close();
}

function MenuAuto(fileName){
	if (fileName != ""){
		window.location.replace(fileName);
	}
}

function arobaceok(){
	var a=document.formulaire.email.value;
	var test="" + a;
	for(var k = 0; k < test.length;k++){
		var c = test.substring(k,k+1);
		if(c == "@"){
			return true;
		}
	}
	alert("Veuillez saisir une adresse E-mail valide, merci.");
	return false;
}
