
<!-- TEST CHAMP OBLIGATOIRE
function ChampsObl(champ) {
var pass=true;
if (document.images) {
for (i=0;i<champ.length;i++) {
var tempobj=champ.elements[i];
if (tempobj.name.substring(0,3)=="obl") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
         }
      }
   }
}
if (!pass) {
champnom=tempobj.name.substring(3,30).toUpperCase();
alert("Assurez vous de saisir le champ "+champnom+" qui est obligatoire.");
return false;
}
else
return true;
}
//  Fin -->
<!-- TEST CARACTERES
function valchar(champ,valid) {
var ok = "yes";
var temp;
for (var i=0; i<champ.value.length; i++) {
temp = "" + champ.value.substring(i, i+1);
if (champ.value.substring(i, i+1) == " ") {}
else {
if (valid.indexOf(temp) == "-1") ok = "no";
}
}
if (ok == "no") {
alert("Saisie invalide! Seul les caractères " + valid + " sont acceptés.");
champ.focus();
champ.select();
   }
}

//  End -->
<!-- Test Adresse email
function valemail(champ) {
var ok = "yes";
txt=champ.value;
if (txt.indexOf("@")<3) ok = "no";
if ((txt.indexOf(".com")<5)&&(txt.indexOf(".org")<5)&&(txt.indexOf(".lu")<5)
&&(txt.indexOf(".fr")<5)&&(txt.indexOf(".net")<5)
&&(txt.indexOf(".gov")<5)&&(txt.indexOf(".qc.ca")<5)
&&(txt.indexOf(".ca")<5)&&(txt.indexOf(".edu")<5))ok = "no";
if (ok == "no") {
alert("Votre adresse email est invalide. Elle doit être au format login@fournisseur.fr");
champ.focus();
champ.select();
   }
}
// Fin -->