//---------
function testBox1(form) { Ctrl = form.nom;
        if (Ctrl.value.search(/[a-z-A-Z]{2,}/)==-1) {validatePrompt (Ctrl, "Mettez votre nom !!")
                return (false);} else  return (true);}
//---------
function testBox2(form) {
        Ctrl = form.prenom; if (Ctrl.value.search(/[a-z-A-Z]{2,}/)==-1) {
                validatePrompt (Ctrl, "Mettez votre Prénom !!")
                return (false);} else return (true);}
//---------
function testBox3(form) {
        Ctrl = form.email;
       if (Ctrl.value.search(/[a-z-0-9_.-A-Z]*@[a-z-0-9]{3,}[.][a-z]{2}/)==-1){				
				validatePrompt (Ctrl, "Entrez un e-mail valide !!")
             	 return (false);} else return (true);}
//---------
function testBox4(form) {
        Ctrl = form.sujet;
       if (Ctrl.value.search(/[a-z-A-Z]{2,}/)==-1){				
				validatePrompt (Ctrl, "Vous devez mettre un sujet")
             	 return (false);} else return (true);}
//---------
function testBox5(form) {
        Ctrl = form.Commentaires;
       if (Ctrl.value.search(/[a-z-A-Z-0-9]{2,}/)==-1){				
				validatePrompt (Ctrl, "Vous devez écrire quelque chose")
             	 return (false);} else return (true);}
//----------------				 
function runSubmit (form, button)  { if (!testBox1(form)) return;if (!testBox2(form)) return;if (!testBox3(form)) return;
        if (!testBox4(form)) return;   if (!testBox5(form)) return; 
       
        //document.test.submit();       // un-comment to submit form
        form.submit();} 
//---------
function validatePrompt (Ctrl, PromptStr) {alert (PromptStr)
        Ctrl.focus(); return;}
function loadDoc() { // initial focus; use if needed //document.test.inputbox1.focus ();
        return;}

