<!--
function checkField(frm)
{
 nome           = frm.nome.value;
 len_nome       = nome.length;
 cognome        = frm.cognome.value;
 len_cognome    = cognome.length;
 email          = frm.email.value;
 len_email      = email.length;


 // fail if email is empty
 if ( len_nome == "") {
    alert("\nIl campo Nome è obbilgatorio");
    frm.nome.value = "";
    frm.nome.focus();
    return false;
 }

 // fail if cognome is empty
 if ( len_cognome == "") {
    alert("\nIl campo Cognome è obbligatorio");
    frm.cognome.value = "";
    frm.cognome.focus();
    return false;
 }


 // fail if email is empty
 if ( len_email == "") {
    alert("\nIl campo E-Mail richiede un indirizzo corretto");
    frm.email.value = "";
    frm.email.focus();
    return false;
 }

 // fail if email contains spaces
 if ( email.indexOf(' ', 0) > -1) {
    alert("\nIl campo E-Mail richiede un indirizzo corretto");
    frm.email.value = "";
    frm.email.focus();
    return false;
 }

 // fail if email start with '@'
 if ( email.indexOf('@', 0) == 0) {
    alert("\nIl campo E-Mail richiede un indirizzo corretto");
    frm.email.value = "";
    frm.email.focus();
    return false;
 }

 // fail if email not contains any '.'
 if ( email.indexOf('.', 0) == -1) {
    alert("\nIl campo E-Mail richiede un indirizzo corretto");
    frm.email.value = "";
    frm.email.focus();
    return false;
 }

  return true; 
}
-->