function changeproduits(elem)
{
   var choix = elem.options[elem.selectedIndex].value;
   if(choix=="1"){
      document.forms['services'].action = "enveloppes-pochettes.html";
   }else if(choix=="2"){
      document.forms['services'].action = "packaging-emballages.html";
   }else if(choix=="3"){
      document.forms['services'].action = "imprimes-faconnes-papier.html";
   }else if(choix=="4"){
      document.forms['services'].action = "procurement-printing-commerce.html";
   }else if(choix=="5"){
      document.forms['services'].action = "management-marketing-conseils.html";
   }else if(choix=="6"){
      document.forms['services'].action = "achats-sourcing-asie-chine.html";
   }else if(choix=="7"){
      document.forms['services'].action = "autres-promotion-immobiliere.html";
   }
   if((choix!="0")||(choix!="")){
      document.forms['services'].submit();
   }
}

var errfound = false;

function testValid(elem,mesg,type)
{
   var resultat='oui';
   if(type=='nbr')
   {
	  if(elem.value != (elem.value/2)*2)
	     resultat='non';
   }
   if(type=='txt')
   {
	  if(elem.value.length==0)
	     resultat='non';
   }
   if(resultat=='non')
   {
      window.alert(mesg);
      elem.select();
      elem.focus();
      errfound = true;
   }
}

function validate()
{
   errfound = false;
   testValid(document.forms['leform'].bmcnom,"Le nom est obligatoire.","txt");
   testValid(document.forms['leform'].bmcprenom,"Le prénom est obligatoire.","txt");
   return !errfound;
}
function sendform(){
   if(validate()==true){
      document.forms['leform'].action = "contactez-nous-reponse.php";
      document.forms['leform'].submit();
   }
}