<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_jumpMenu(targ,selObj,restore){ 
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
function afficheVignette(texteVignette,cheminMaxi,texteMaxi)
	{
	document.write("<A HREF=\"javascript:afficheMaxi(\'"+cheminMaxi+"\',\'"+texteMaxi+"\')\">"+texteVignette+"</A>");
	}

function afficheSurvol(texteVignette,cheminMaxi,texteMaxi,cheminSurvol)
	{
	document.write("<A HREF=\"javascript:afficheMaxi(\'"+cheminMaxi+"\',\'"+texteMaxi+"\')\" onMouseOut=\"MM_swapImgRestore()\" onMouseOver=\"MM_swapImage('"+cheminSurvol+"','','img/plan/vignettes_petites_blanches/"+cheminSurvol+"',1)\">"+texteVignette+"</A>");
	}
	
function afficheMaxi(chemin,texteMaxi)
	{
	popupImage = window.open('detail_plan.php?titre='+texteMaxi+'&chemin='+chemin,'_blank','height=610, width=670, toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=0,status=0');
	}
	
function affichePhoto(texteVignette,cheminMaxi,texteMaxi)
	{
	document.write('<A HREF="javascript:afficheMaxiPhoto(\''+cheminMaxi+'\',\''+texteMaxi+'\')">'+texteVignette+'</A>');
	}
function afficheMaxiPhoto(chemin,texteMaxi)
	{
	i1 = new Image;
	i1.src = chemin;
	html = '<HTML><HEAD><TITLE>'+texteMaxi+'</TITLE></HEAD><BODY LEFTMARGIN=0 MARGINWIDTH=0 TOPMARGIN=0 MARGINHEIGHT=0><CENTER><IMG SRC="'+chemin+'" BORDER=0 NAME=imageTest onLoad="window.resizeTo(document.imageTest.width+14,document.imageTest.height+32)"></CENTER></BODY></HTML>';
	popupImage = window.open('','_blank','toolbar=0,location=0,directories=0,menuBar=0,scrollbars=0,resizable=1');
	popupImage.document.open();
	popupImage.document.write(html);
	popupImage.document.close()
	}

function ecrire(adresse,titre)
	{
	window.location.href = 'contacts.php?adresse='+adresse+'&titre='+titre;
	}	

function verif () {
  var ok = 1;
  
  p=new RegExp("^.+@.+\\..+$");
  if ((document.form_news.adresse.value == "") || (document.form_news.adresse.value.search(p) == -1)) {
    alert("Vous devez saisir une adresse e-mail valide");
    ok = 0;
  }

  if (ok == 1) {
    adresse = document.form_news.adresse.value; 
	suppr = "";
	if (document.form_news.suppr.checked) suppr = "yes";
    param="height=200, width=400, location=no, menubar=yes, resizable=no, scrollbars=no, status=yes, toolbar=no";
    var newWindow=window.open("inscrire.php?adresse="+adresse+"&suppr="+suppr, '_blank', param);
  }
}

function modif(type, id, langue,rubid) {
  if (type == "rubrique") {
    fichier = "modif_rubrique";
    id_rubrique = id;
    param="height=550, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&id_rubrique="+id_rubrique+"&langue="+langue, '_blank', param);
  }
  if (type == "paragraphe"){
    fichier = "modif_paragraphe";
	id_paragraphe = id;
	id_rubrique = rubid;
    param="height=550, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&id_paragraphe="+id_paragraphe+"&id_rubrique="+id_rubrique+"&langue="+langue, '_blank', param);
  }
}

function suppr(type, id, zone, langue,rubid) {
  if (type == "rubrique") {
    fichier = "suppr_rubrique";
    id_rubrique = id;
    param="height=350, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&id_rubrique="+id_rubrique+"&langue="+langue, '_blank', param);
  }
  if (type == "paragraphe"){
    fichier = "suppr_paragraphe";
	id_paragraphe = id;
	id_rubrique = rubid;
	id_zone = zone;
    param="height=350, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&id_zone="+id_zone+"&id_paragraphe="+id_paragraphe+"&id_rubrique="+id_rubrique+"&langue="+langue, '_blank', param);
  }
}

function ajout_para(type, id, zone, langue,rubid) {
  if (type == "rubrique") {
    fichier = "ajout_paragraphe";
    id_rubrique = id;
	id_zone = zone;
    param="height=550, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&id_rubrique="+id_rubrique+"&ajout=debut&id_zone="+id_zone+"&langue="+langue, '_blank', param);
  }
  if (type == "paragraphe"){
    fichier = "ajout_paragraphe";
	id_paragraphe = id;
	id_zone = zone;
	id_rubrique = rubid;
    param="height=550, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&id_paragraphe="+id_paragraphe+"&id_rubrique="+id_rubrique+"&id_zone="+id_zone+"&langue="+langue, '_blank', param);
  }
}

function ajout_rub(type, id, langue) {
  if (type == "rubrique") {
    fichier = "ajout_rubrique";
    id_rubrique = id;
    param="height=550, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&id_rubrique="+id_rubrique+"&langue="+langue, '_blank', param);
  }
}

function bouge(type, id, zone, direction, langue,rubid) {
  if (type == "rubrique") {
    fichier = "bouge_rubrique";
    id_rubrique = id;
    param="height=350, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&direction="+direction+"&id_rubrique="+id_rubrique+"&langue="+langue, '_blank', param);
  }
  if (type == "paragraphe"){
    fichier = "bouge_paragraphe";
	id_paragraphe = id;
	id_zone = zone;
	id_rubrique = rubid;
    param="height=350, width=650, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
    var newWindow=window.open("root/index.php?fichier="+fichier+"&id_zone="+id_zone+"&direction="+direction+"&id_paragraphe="+id_paragraphe+"&id_rubrique="+id_rubrique+"&langue="+langue, '_blank', param);
  }
}

function verif_ml() {
  p=new RegExp("^.+@.+\\..+$");
  if ((document.form_newsletter.email.value == "") || (document.form_newsletter.email.value.search(p) == -1)) {
    alert("Vous devez saisir une adresse e-mail valide");
  }
  else document.form_newsletter.submit();
}

function admin_ml() {
  param="height=550, width=600, location=no, menubar=no, resizable=no, scrollbars=yes, status=yes, toolbar=no";
  var newWindow=window.open("root/index.php?fichier=admin_ml", '_blank', param);
}


     function testChampscontactez()
          {
		  var erreur=0;
            
                  if (!document.contactez.nom.value)
            {
                   erreur="Nom";
                        alerte(erreur)
                   document.contactez.nom.focus();
                   return false;
                 }
				 else if (!document.contactez.email.value)
            {
                   erreur="Email";
                        alerte(erreur)
                   document.contactez.email.focus();
                   return false;
                 }

              return true;
              }

//-- message d'erreur ----------------------
                function alerte(msg)
                {

                {
                alert("renseigner le champ : "+msg);
                }
        }
		
		function MM_popupMsg(msg) { //v1.0
  alert(msg);
}
//-->