function valid(champ,nomchamp)
{
   str=champ.value;
   if (str == "")
   {
      alert("Merci de saisir une valeur pour le champ \""+ nomchamp +"\"");
      champ.focus();
      return(false);
   }
   return true;
}

function validemail(champ)
{
  str= champ.value;
  if (str != "")
  {
     if (str.indexOf('@',0) == -1)
     {      
        alert("Adresse email invalide.");
        champ.focus();
        return(false);
     }
     if (str.indexOf('.',0) == -1)
     { 
        alert("Adresse email invalide.");
        champ.focus();
        return(false);
     }
  }
  return true;
}

function validation_contact(theform)
{
   champ_nom = "Nom";
   champ_prenom = "Prénom";
   champ_adr = "Adresse";
   champ_cp = "Code postal";
   champ_ville = "Ville";
   champ_demande = "Demande";
   return (
      valid(theform.nom,champ_nom) &&
      valid(theform.prenom,champ_prenom) &&
      valid(theform.adresse1,champ_adr) &&
	  valid(theform.cp,champ_cp) &&
	  valid(theform.ville,champ_ville) &&
	  valid(theform.demande,champ_demande)	  
   )
}
