	// Fonction qui verifie le formulaire
	
	function verifFormulaire(){
		var mesg = '';
		mesg +=champVide("nom","Nom et prénom");
		mesg +=champVide("tel","Téléphone");
		mesg +=champVide("message"," Message ");
		if(mesg==''){
			document.frm.submit();
			return true;
		}else{
			alert(mesg);
			return false;
		}
	}
	
	// Fonction qui verifie si un champ est vide
	function champVide(champ,libelle){
		 var mesg = "";
		 if(document.getElementById(champ).value==''){
			document.getElementById(champ).style.background="#FF9999";
			mesg+= libelle+" doit être indiquée \n\r";
		}else{
			document.getElementById(champ).style.background="#FFFFFF";
		}
		return mesg;
	 }
	 
	 // Fonction qui verifie si un champ est un numéro
	 function champNumber(champ,libelle){
		 var mesg = "";
		 if(isNaN(document.getElementById(champ).value)){
			document.getElementById(champ).style.background="#FF9999";
			mesg+= libelle+" doit être un entier \n\r";
		}else{
			document.getElementById(champ).style.background="#FFFFFF";
		}
		return mesg;
	 }
	 // Fonction qui verifie si un champ est un numéro
	 function champMaxCharacter(champ, libelle, nbmax){
		 var mesg = "";
		 if((document.getElementById(champ).value).length>nbmax){
			document.getElementById(champ).style.background="#FF9999";
			mesg+= libelle+" ne doit pas dépasser "+nbmax+" caractère \n\r";
		}else{
			document.getElementById(champ).style.background="#FFFFFF";
		}
		return mesg;
	 }
	 // Fonction qui verifie l'extention d'un champ
		function verifExtention(){
		  var mesg = "";
		  var path = document.frm.photo.value;
		  var extnum = path.length - 3;
		  var check = path.substr(extnum,3);
		  if(!(check=="jpg")){
			document.getElementById("photo").style.background='#FF9999';
			document.frm.photo.value='';
			alert("Ce n'est pas une image jpg \n\r");
			document.frm.photo.value='';
		  }else{
			document.getElementById("photo").style.background='#FFFFFF';
		  }
		  //return mesg;
	 }
	 
	// Fonction qui verifie le nombre maximum d'element selectionnez dans  une liste choix multiple
	function verifSelectedStationMetro(liste){
		 var mesg = "";
		NbCol1 = document.forms[liste].elements.station.length;
		var compteur = 0;
		for (a = 0; a < NbCol1; a++){
			if(document.forms[liste].elements.station.options[a].selected == true){
				if(compteur>2){
					mesg+= "Veulliez choisir 3 station au maximum \n\r";
					document.getElementById("station").style.background='#FF9999';
				}else{
					document.getElementById("station").style.background='#FFFFFF';
					compteur++;
				}
			}
		}
		return mesg;
	}