var nsx=0;nsy=0;

function InitPage() {
 if ((document.layers)&&(window.innerWidth>780)) 
  Orgnx=(window.innerWidth-780)/2; //NS
 ChgNot();
 }

function InitPage2() {
 InitCalq('Ici'); 
 InitCalq('Marg');}

function rien() {}

function Retour() {window.history.back()} 

function Recommander() {open('/Divers/Contact/Recommander.php?Page='+location.href,'blank','scrollbars=yes, width=530, height=340, status=no, menubar=no, location=no, resizable=no')}

function VerifierMail(Mail) {
	var A=Mail.indexOf("@",1);
	if ((A>-1)&&(Mail.length>4)&&(Mail.indexOf(".",A+1)>1)) {return true}
	else {return false}
	}

function VerifPico(FR) {
	if ((FR.query.value=="Mots-clés")||(FR.query.value==""))
		{
		alert("Vous devez saisir un mot avant de cliquer sur 'Rechercher' ;-)");
		FR.query.focus();
		}
	else {FR.Search.value="Je cherche..."; FR.submit();}
	}
	
function Doc(DocCode) {
 InitCalq('Document');
 AffCalq('Document',Orgnx+Decx()+LargMarg+5,Orgny+HautPcp,DocCode,1);
 } 

function Mask(Ht) {
 InitCalq('Masker');
 var MaskIm="spacer.gif";
 //var MaskIm="SM.bmp";
 AffCalq('Masker',Orgnx+Decx()+LargMarg+5,Orgny+HautPcp,"<img src='/Images/"+MaskIm+"' width='570' height='"+Ht+"' alt=' '>",1);} 

function Mask2(Ht) {
 InitCalq('Masker');
 var MaskIm="Carte.gif";
 var MaskIm="spacer.gif";
 //var MaskIm="SM.bmp";
 AffCalq('Masker',Orgnx+Decx()+LargMarg+5,Orgny+HautPcp,"<img src='/Images/"+MaskIm+"' width='570' height='"+Ht+"' alt='Carte'>",1);} 

function MoveDiv(Nom,x,y) { // Deplacement d'un <Div>
 if (document.getElementById||document.all) { //Moz et IE>=4
  if (document.all&&!document.getElementById) {a=document.all[Nom];}
  else if (document.getElementById) {a=document.getElementById(Nom);}
  //a.innerHTML=Contenu;
	a.style.top=y;
  a.style.left=x;}

 if (document.layers) { //NS
  //document.layers[Nom].document.write(Contenu);
  //document.layers[Nom].document.close();
  document.layers[Nom].top=y;
  document.layers[Nom].left=x-NSDec(0,8);}
	}

function ChgNot(Arr) {
 if (document.getElementById||document.all) { //Moz IE>=4
 AffCalq('Marg',Orgnx+Decx(),document.body.scrollTop+HautMarg,ContMarg(Arr),1);}

 if (document.layers) { //NS document.layers["Marg"].document.write(ContMarg(Arr));
 document.layers["Marg"].document.close(); if (nsy<240) {y=240} else y=nsy-10;
 document.layers["Marg"].top=y; document.layers["Marg"].left=Orgnx+Decx()-NSDec(0,8);
 document.layers["Marg"].visibility="show";}}

function Decx() { // renvoie le décalage dû affichage

 if ((document.getElementById||document.all)&&(document.body.clientWidth>780)) {return (document.body.clientWidth-780)/2} else return 0;
 if ((document.layers)&&(window.innerWidth>780)) {return (window.innerWidth-780)/2} else return 0;}

function Tabl(Titre,Type,Texte) { return "<table cellspacing='0' class='WWMrgNote'><tr><th class='WWC"+Type+" WWT10'>"+Titre+"</th></tr><tr><td class='WWT9'>"+Texte+"</td></tr></table>";}

function AffCalq(Nom,x,y,Contenu,Aff) {
 if (document.getElementById||document.all) { //Moz et IE>=4
  if (document.all&&!document.getElementById) {a=document.all[Nom];}
  else if (document.getElementById) {a=document.getElementById(Nom);}
  a.innerHTML=Contenu;
	a.style.top=y;
  a.style.left=x;
  if (Aff) {a.style.visibility="visible"} else a.style.visibility="hidden"}

 if (document.layers) { //NS
  //a=eval('document.layers["'+Nom+'"]');
  document.layers[Nom].document.write(Contenu);
  document.layers[Nom].document.close();
  document.layers[Nom].top=y;
  document.layers[Nom].left=x-NSDec(0,8);}}

function AffCalq2(Nom,x,y,Aff) { // gere les calque contenant deja un texte fixe (type Analyse)
 if (document.getElementById||document.all) { //Moz et IE>=4
  if (document.all&&!document.getElementById) {a=document.all[Nom];}
  else if (document.getElementById) {a=document.getElementById(Nom);}
	a.style.top=y;
  a.style.left=x;
  if (Aff) {a.style.visibility="visible"} else a.style.visibility="hidden"}

 if (document.layers) { //NS
  //a=eval('document.layers["'+Nom+'"]');
  document.layers[Nom].document.close();
  document.layers[Nom].top=y;
  document.layers[Nom].left=x-NSDec(0,8);}}

// Crée les différents contenus

function ContIci(IciTxt) {return "<table cellspacing='0' class='WWIci WWT12 WWCA'><tr><th>"+IciTxt+"</th></tr></table>"}

function ContMarg(Arr) {
 contenu="";
 if (Arr) {contenu+=Tabl(Arr[0],Arr[1],Arr[2],196)+"<br>";}
 //Arr=ChoixLien();
 //contenu+=Tabl(Arr[0],Arr[1],Arr[2],196);
 return contenu;}
 
function ns(e) {
 nsx=e.x;nsy=e.y;}

function InitCalq(Nom) {
 if (document.getElementById||document.all) {//IE>=4, Moz
  document.write("<DIV id='"+Nom+"' style='position:absolute;top:0;left:0;visibility:hidden'><img src='http://www.hebdotop.com/cgi-bin/vote.eur?id=26050' width='80' height='30' border='0' alt='Positionnement et Statistiques Gratuites'></DIV>");}
 if (document.layers) {// NS
  window.captureEvents(Event.MOUSEMOVE);
  window.onMouseMove=ns;
  document.write("<LAYER name='"+Nom+"' top="+Orgny+" left="+Orgnx+" visibility='show'></LAYER>");}}

function IENS(a,b) {
 if (document.getElementById||document.all) {return a;} //IE>=4, Moz
 if (document.layers) {return b;}} //NS

function NSDec(a,b) {// (NS) Correctif de position pour NS en fonction taille affichage
 if ((document.layers)&&(window.innerWidth>780)) {return b;} else {return a;}}

function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);