
function validation(f) { 
document.forms["site"].elements["dd"].value="aa";
if (f.nom.value == "") { f.nom.focus(); alert("Merci de noter votre nom."); return false; }
if (f.prenom.value == "") { f.prenom.focus(); alert("Merci de noter votre prénom."); return false; }
if (f.ad1.value == "" && f.ad2.value == "") { f.ad1.focus(); alert("Merci d'indiquer votre adresse."); return false;}
if (f.codp.value == "") { f.codp.focus(); alert("Merci d'indiquer votre code postal."); return false;}
if (f.ville.value == "") { f.ville.focus(); alert("Merci de noter votre ville."); return false; }
if (f.pays.value == "") { f.pays.focus(); alert("Merci de noter votre pays."); return false; }

if (f.courel.value != "") {
var emailFilter=/^.+@.+\..{2,4}$/;
if (!(emailFilter.test(f.courel.value))) { 
      f.courel.focus(); alert("Merci d'indiquer une adresse de courrier électronique valide."); return false;
											}
					}
var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\'\[\]\{\}\=\#]/
var cara = "contient des caractères erronés :\n( ) < > , ; : \\ \" \' [ ] { }...";
if (f.courel.value.match(illegalChars)) {f.courel.focus(); alert("Votre adresse de courrier électronique "+ cara); return false;}

if (f.nom.value.match(illegalChars)) {f.nom.focus(); alert("Votre nom "+ cara); return false;}

if (f.prenom.value.match(illegalChars)) {f.prenom.focus(); alert("Votre prénom "+ cara); return false;}

if (f.ville.value.match(illegalChars)) {f.ville.focus(); alert("La ville "+ cara); return false;}

if (f.pays.value.match(illegalChars)) {f.pays.focus(); alert("Le pays "+ cara); return false;}

if (f.ad1.value.match(illegalChars)) {f.ad1.focus(); alert("L'adresse "+ cara); return false;}

if (f.ad2.value.match(illegalChars)) {f.ad2.focus(); alert("L'adresse "+ cara); return false;}

if (f.codp.value.match(illegalChars)) {f.codp.focus(); alert("Le code postal "+ cara); return false;}

if (f.tel.value.match(illegalChars)) {f.tel.focus(); alert("Le numéro de téléphone "+ cara); return false;}
if (f.port.value.match(illegalChars)) {f.port.focus(); alert("Le numéro de portable "+ cara); return false;}

if (f.fax.value.match(illegalChars)) {f.fax.focus(); alert("Le numéro de fax "+ cara); return false;}

var illegalCharss= /[\<\>\\\[\]\{\}\=]/
if (f.cmt.value.match(illegalCharss)) {f.cmt.focus(); alert("Votre message contient des caractères non admis : \n< > \\ [ ] { } = ..."); return false;}
}

