<!--
function compter_cars(target, max, nomchamp){
         strlen = target.value.length
         if (strlen > max ) {
             target.value = target.value.substring(0,max);
             charsleft = max;
         } else {
             charsleft = strlen;
         }
         nomchamp.value = charsleft;
}
function verify() {
                var msg = "Des erreurs ont été trouvées lors de la validation de ce formulaire !\n _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\n";
                var errors = "FALSE";

                if (isEmpty(document.contactform.nom.value))  {
                        errors = "TRUE";
                        msg += "Le champ NOM est un champ obligatoire.\n\n";
                }

                if (isEmpty(document.contactform.prenom.value)) {
                        errors = "TRUE";
                        msg += "Le champ PRENOM est un champ obligatoire .\n\n";
                }

                if (isEmpty(document.contactform.telephone.value) || isNotTelephone(document.contactform.telephone.value, "all"))  {
                        errors = "TRUE";
                        msg += "Le champ TELEPHONE est un champ obligatoire. Il doit comporter 10 chiffres !\n\n";
                }
                
                if (isNotEmailAdress(document.contactform.email.value)) {
                        errors = "TRUE";
                        msg += "Le champ EMAIL est un champ obligatoire.Doit être renseigné par un email valide. \n\n";
                }
               
                if (isEmpty(document.contactform.societe.value)) {
                        errors = "TRUE";
                        msg += "Le champ SOCIETE est un champ obligatoire.\n\n";
                }

                
                if (isEmpty(document.contactform.adresse.value)) {
                        errors = "TRUE";
                        msg += "Le champ ADRESSE est un champ obligatoire.\n\n";
                }
                if (isEmpty(document.contactform.codepostal.value) || isNotCodePostal(document.contactform.codepostal.value)) {
                        errors = "TRUE";
                        msg += "Le champ CODE POSTAL est un champ obligatoire. Il doit comporter 5 chiffres ! \n\n";
                }
                if (isEmpty(document.contactform.ville.value)) {
                        errors = "TRUE";
                        msg += "Le champ VILLE est un champ obligatoire.\n\n";
                }


                
                if (errors == "TRUE") {
                        msg += " _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _\n\nCorrigez ces erreurs avant de soumettre ce formulaire.\n";
                        alert(msg);
                        return false;
                }
                else {
                   document.contactform.submit.disabled=="true";
                }
          }


