function testtexte(nomForm,nomChamps) { Nom=eval("document."+nomForm+"."+nomChamps); if(Nom.value==0 || Nom.value==null) { Nom.focus(); return true; } return false; } function testnombre(nomForm,nomChamps) { Nom=eval("document."+nomForm+"."+nomChamps); if(Nom.value==0 || Nom.value==null || isNaN(Nom.value)) { Nom.focus(); return true; } return false; } function radiocheck(nomForm,champs) { var tabchec = document.forms[nomForm].elements[champs]; var tabchec_cnt = (typeof(tabchec.length) != 'undefined') ? tabchec.length : 0; var ch="false"; if (tabchec_cnt) { for (var i = 0; i < tabchec_cnt; i++) { if((tabchec[i].checked)) { ch="true"; return tabchec[i].value; } } tabchec[0].focus(); return false; } } function verifform(nomForm,type,lan,info) { if(!lan || lan=="fr") { lan="fr"; message="Rubriques obligatoires"; } if(lan=="en") { message="Compulsory field"; } if(lan=="it") { message="Rubriche obbligatorie "; } if(type==1) { if (testtexte(nomForm,"entreprise")) { alert(message); return (false); } if (testtexte(nomForm,"email")) { alert(message); return (false); } if (testtexte(nomForm,"tel")) { alert(message); return (false); } if (testtexte(nomForm,"sujet")) { alert(message); return (false); } if (testtexte(nomForm,"message")) { alert(message); return (false); } } NomForm=eval("document."+nomForm); if(type==2) { if (!radiocheck(nomForm,"spontanee")) { alert(message); return false; } if (radiocheck(nomForm,"spontanee")=="non" && testtexte(nomForm,"reference")) { alert(message); return (false); } if (testtexte(nomForm,"fondtion")) { alert(message); return (false); } if (! radiocheck(nomForm,"contrat")) { alert(message); return false; } if (! radiocheck(nomForm,"contrat2")) { alert(message); return false; } if (testnombre(nomForm,"dispojour")) { alert(message); return (false); } if (testnombre(nomForm,"dispojmois")) { alert(message); return (false); } if (testnombre(nomForm,"dispojannee")) { alert(message); return (false); } if (! radiocheck(nomForm,"test")) { alert(message); return false; } if (testtexte(nomForm,"nom")) { alert(message); return (false); } if (testtexte(nomForm,"nom")) { alert(message); return (false); } if (testtexte(nomForm,"prenom")) { alert(message); return (false); } if (testtexte(nomForm,"email")) { alert(message); return (false); } if (testtexte(nomForm,"tel")) { alert(message); return (false); } if (testtexte(nomForm,"adresse")) { alert(message); return (false); } if (testtexte(nomForm,"cp")) { alert(message); return (false); } if (testtexte(nomForm,"ville")) { alert(message); return (false); } if (testtexte(nomForm,"raisons")) { alert(message); return (false); } } NomForm.action="email.htm?type="+type+"&lan="+lan+"&inf="+info; NomForm.submit(); }