

/*----------------------------------Affichage du sous-menu ------------------------------*/
function montre(id) {
	if(id)	{
		var d = document.getElementById(id);
			for (var i = 1; i<=10; i++) {
				if (document.getElementById('smenu'+i)) {document.getElementById('smenu'+i).style.display='none';}
			}
		if (d) {d.style.display='block';}
	}
}

/*----------------------------------Mise en Gras du menu ------------------------------*/


function AffPage(idmenu)
{
	//Si nav respectant le DOM
	if(document.getElementById)	{
	 	document.getElementById('menu'+idmenu).style.textDecoration="underline";  
	 	document.getElementById('menu'+idmenu).style.color="#659E2E";
	 	
	 	if(document.getElementById('onglet'+idmenu) )	{
	 		document.getElementById('onglet'+idmenu).style.borderBottomColor="#F8093B"; /*"#F6FAFF";*/
	 	}
	 }	//fin if
}

/*----------------------------------Mise en Gras du menu ------------------------------*/

function AffSsrub(idssrub)
{
 //alert("ok AffSsrub "+idssrub);
	//Si nav respectant le DOM
	if(document.getElementById)
	 	{
	 	document.getElementById('ssrub_'+idssrub).style.textDecoration="underline"; 
	 	document.getElementById('ssrub_'+idssrub).style.color="#001A53";
	 	document.getElementById('ssrub_'+idssrub).style.fontWeight="bold";
	 	}	//fin if
}

/*------------------------REDIRECTION JS POUR DIV CLIQUABLE-----------*/
 function redirectlien(url)
 {
 //alert("ok redirect");
 window.location.replace(url);
 }
 /*----------------------------------RETOUR---------------------------*/
function retour()
{
history.back();
}
/*------------------------------- FERMER LA FENETRE--------------------*/
function fermer()
{
window.close();
}
/*------- AFFICHER UN MESSAGE--------*/
function message(message)
{
 window.alert(message);
}
/*-----------------------------------Modifie le cookie de langue-------*/

function chang_lang(lang)	{
	var expDate = new Date()
	expDate.setTime(expDate.getTime() + (360 * 24 * 3600 * 1000))
        document.cookie = "lang=" + escape(lang)+ ";expires=" + expDate.toGMTString();
        
        document.location.reload();

}

/*----------------------------------SURBRILLANCE DES DIV------------------------------*/
 function aff_cadre(element)
 {
 //alert("ok roll aff");
 
    if(document.getElementById)
       {
       document.getElementById(element).style.border = "1px solid #ADD295";
       document.getElementById(element).style.backgroundColor = "#ffffff";
       }
    else if(document.all)
       {
       document.all[element].style.border = "1px solid #ADD295";
       document.all[element].style.backgroundColor = "#ffffff";
       }
 
 }
 function mask_cadre(element)
 {
// alert("ok roll mask");
 
    if(document.getElementById)
       {
       document.getElementById(element).style.border = "1px solid #D9E0E9";
       document.getElementById(element).style.backgroundColor = "#EFF3F7";
       }
    else if(document.all)
       {
       document.all[element].style.border = "1px solid #D9E0E9";
        document.all[element].style.backgroundColor = "#EFF3F7";
       }
 
 }


/*-------------AFFICHAGE DES IMAGE EN POPUP---------------*/
function visu(url, largeur, hauteur)	{

window.open('visu_img.php?url='+url+'', '', 'resizable=no, location=no, width='+largeur+', height='+hauteur+', left=150, top=150, menubar=no, status=no, scrollbars=no, menubar=no');
}
/*------------VERIFICATION DU FORMULAIRE DE CONTACT-----------------------------------*/
function verif_formContact()
{
/*Nom*/
if(document.formContact.nom.value == "")  {
   alert("Veuillez entrer votre nom !");
   document.formContact.nom.focus();
   return false;
  }
 /*Prenom*/
 if(document.formContact.prenom.value == "") {
   alert("Veuillez entrer votre prénom !");
   document.formContact.prenom.focus();
   return false;
  }
/*Email*/
 if(document.formContact.email.value == "") {
   alert("Veuillez entrer votre email !");
   document.formContact.email.focus();
   return false;
  }
 if(document.formContact.email.value.indexOf('@') == -1) {
   alert("Veuillez entrer un email valide !");
   document.formContact.email.focus();
   return false;
  } 
 /*Sujet*/
  if(document.formContact.sujet.value == "") {
      alert("Veuillez entrer un sujet !");
      document.formContact.sujet.focus();
      return false;
  }
 /*Question*/
   if(document.formContact.question.value == "") {
       alert("Veuillez entrer votre question !");
       document.formContact.question.focus();
       return false;
  }
}
 
 /* Fonction qui vérifie si le form recherh est bien remplie par o moin un mot*/
function verif_formRecherche()	{
	if(document.form_recherche.mots_cles.value == "")  {
	   alert("Veuillez entrer un où plusieurs mots à rechercher !");
	   document.form_recherche.mots_cles.focus();
	   return false;
	}
}

/*---------------------------fct qui ouvre un popup grand avec une url---------------------------------*/
function popupG(url)	{
	//alert("ok fct popupG");
	window.open(''+url+'', '', 'resizable=no, location=no, width=800, height=700, left=150, top=100, menubar=no, status=no, scrollbars=no, menubar=no');
}


 
