
//Controllo campi obbligatori del form
function CheckForm()
{
var temp;
var space;

//Email
if (document.forms.form.Email.value == "")
  {
    alert("Il campo \"Email\" č obbligatorio");
    document.forms.form.Email.focus();
    return (false);
  }

// check validit› email
txt=document.forms.form.Email.value;
if (txt.indexOf("@")<2)
// check presenza @
  {
    alert("Indirizzo E-mail non valido");
document.forms.form.Email.focus();
return (false);
}
if (txt.lastIndexOf(".")<txt.indexOf("@"))
// check presenza .
  {
alert("Indirizzo E-mail non valido");
document.forms.form.Email.focus();
return (false);
  }

if (txt.length<6)
// check lunghezza almeno 6 char
  {
alert("Indirizzo E-mail non valido");
document.forms.form.Email.focus();
return (false);
  }

return (true);
}
// -->