function check_form(){
	
	if (document.frm.nom.value == "" || document.frm.prenom.value == "" || document.frm.societe.value == "" || document.frm.mail.value == "")
	{
		if(document.frm.nom.value == "")
		{
			alert("Le champ Nom est obligatoire !");
		}
		else if(document.frm.prenom.value == "")
		{
			alert("Le champ Pr\351nom est obligatoire !");
		}
		else if(document.frm.mail.value == "")
		{
			alert("Le champ Email est obligatoire !");
		}
				
		return false;
	}
	
	if(!verifiermail(document.frm.mail.value)){
		return false;
	}
	
	return true;
}

function verifiermail(mail) 
{
      if (!(mail.indexOf("@")>=0) )
	  {
         alert("Merci de saisir une adresse email valide !");
         return false
      }
	  
	  if(!(mail.lastIndexOf(".")<mail.length -2) || !(mail.lastIndexOf(".")>=mail.length -4)) 
	  {
         alert("Mail invalide !");
		 return false
      }
	  return true;
}
