function controler_contact(f)
	{
		if (!f.civilite[0].checked && !f.civilite[1].checked && !f.civilite[2].checked) {alert("sélectionnez votre civilité");return(false);}
		if (f.nom.value=="") {alert("Entrez votre nom");return(false);}
		if (f.prenom.value=="") {alert("Entrez votre prénom");return(false);}
		if (f.message.value=="") {alert("Entrez un message");return(false);}
		var adresse2 = f.email.value;
		var place = adresse2.indexOf("@",1);
		var point = adresse2.indexOf(".",place+1);
		if ((place == -1)||(adresse2.length < 7)||(point == -1))
			{
				alert("Entrez une adresse email valide");return(false);
			}
		f.submit();
		return (true);
	}
function controler_inscription(f)
	{
		if (!f.civilite[0].checked && !f.civilite[1].checked && !f.civilite[2].checked) {alert("sélectionnez votre civilité");return(false);}
		if (f.nom.value=="") {alert("Entrez votre nom");return(false);}
		if (f.prenom.value=="") {alert("Entrez votre prénom");return(false);}
		if (f.rue.value=="") {alert("Entrez votre rue");return(false);}
		if (f.tel.value=="") {alert("Entrez votre téléphone");return(false);}
		if (f.cp.value=="") {alert("Entrez votre code postal");return(false);}
		
		if (!f.candidature[0].checked && !f.candidature[1].checked && !f.candidature[2].checked) {alert("sélectionnez le type de candidature");return(false);}
		f.submit();
		return (true);
	}
function controler_forum(f)
	{	
		if (f.auteur.value=="") {alert("Entrez votre nom");return(false);}
		if (f.sujet.value=="") {alert("Entrez un sujet");return(false);}
		if (f.message.value=="") {alert("Entrez un message");return(false);}
		var adresse2 = f.email_auteur.value;
		var place = adresse2.indexOf("@",1);
		var point = adresse2.indexOf(".",place+1);
		if ((place == -1)||(adresse2.length < 7)||(point == -1))
			{
				alert("Entrez une adresse email valide");return(false);
			}
		f.submit();
		return (true);
	}	
	
	
function check_appli()
{
 var monform = document.getElementById("frm_newsletter2");
    var myCB = monform.getElementsByTagName("INPUT" )
 for (var i=0; i<=myCB.length-1; i++)
   if (myCB[i].type.toLowerCase()=="checkbox" )
          if(myCB[i].checked) return true; 
    window.alert("Vous devez sélectionner au moins un groupe" );
    return false;
}

function confsuppr(url)
{
	if(confirm('etes-vous sur de vouloir supprimer cette donnée ?'))
     	window.location=(url+"&ref="+escape(document.location.pathname+document.location.search))
}
function confsuppr_form()
{
	if(confirm('etes-vous sur de vouloir supprimer cette donnée ?'))
     	return (true);
     else
     	return (false);
}
function submit_page(numero_page)
{
	
	document.forms.frm_recherche.page_en_cours.value=numero_page;
	document.forms.frm_recherche.submit();
}

function MM_CheckFlashVersion(reqVerStr,msg){
  with(navigator){
    var isIE  = (appVersion.indexOf("MSIE") != -1 && userAgent.indexOf("Opera") == -1);
    var isWin = (appVersion.toLowerCase().indexOf("win") != -1);
    if (!isIE || !isWin){  
      var flashVer = -1;
      if (plugins && plugins.length > 0){
        var desc = plugins["Shockwave Flash"] ? plugins["Shockwave Flash"].description : "";
        desc = plugins["Shockwave Flash 2.0"] ? plugins["Shockwave Flash 2.0"].description : desc;
        if (desc == "") flashVer = -1;
        else{
          var descArr = desc.split(" ");
          var tempArrMajor = descArr[2].split(".");
          var verMajor = tempArrMajor[0];
          var tempArrMinor = (descArr[3] != "") ? descArr[3].split("r") : descArr[4].split("r");
          var verMinor = (tempArrMinor[1] > 0) ? tempArrMinor[1] : 0;
          flashVer =  parseFloat(verMajor + "." + verMinor);
        }
      }
      // WebTV has Flash Player 4 or lower -- too low for video
      else if (userAgent.toLowerCase().indexOf("webtv") != -1) flashVer = 4.0;

      var verArr = reqVerStr.split(",");
      var reqVer = parseFloat(verArr[0] + "." + verArr[2]);
  
      if (flashVer < reqVer){
        if (confirm(msg))
          window.location = "http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash";
      }
    }
  } 
}
