// JavaScript Document

function testBox1(form) {
        Ctrl = form.nom; if (Ctrl.value.search(/[a-z0-9-A-Z]{2,}/)==-1) {
                validatePrompt (Ctrl, "Your Surname & First Name !!")
                return (false);} else return (true);}
//---------
function testBox2(form) { Ctrl = form.societe;
        if (Ctrl.value.search(/[a-z0-9-A-Z]{2,}/)==-1) {validatePrompt (Ctrl, "The name of your Company !!")
                return (false);} else  return (true);}
//---------
function testBox3(form) {
        Ctrl = form.email;
        if (Ctrl.value.search(/[a-z0-9-A-Z]*@[a-z0-9-A-Z]{2,}[.][a-z-A-Z]{2}/)==-1){
                                validatePrompt (Ctrl, "Your email !!")
                return (false);} else return (true);}
//---------
function testBox4(form) {
        Ctrl = form.tel;
        if (Ctrl.value.search(/[a-z0-9_.-A-Z]{2}/)==-1) {validatePrompt (Ctrl, "Your phone number !!")
                return (false);} else return (true);}

//---------
function testBox5(form) {Ctrl = form.lemessage;
        if (Ctrl.value.search(/[a-z-A-Z]{2}/)==-1) {validatePrompt (Ctrl, "Your message !!")
                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;
       
       form.submit();}
//---------
function validatePrompt (Ctrl, PromptStr) {alert (PromptStr)
        Ctrl.focus(); return;}
function loadDoc() {
        return;}


