<!--
//
//      Copyright(c) Amedeo Zullino
//  ------------------------------------
//  e-mail:   azullino@libero.it
//  ------------------------------------
//
function Valida(form) 
{
  if (form.Cognome.value == "")
  {
    alert("Il campo Cognome e' obbligatorio.");
    form.Cognome.focus();

    return false;
  }

  if (form.Nome.value == "")
  {
    alert("Il campo Nome e' obbligatorio.");
    form.Nome.focus();

    return false;
  }

/*
  if (form.Indirizzo.value == "")
  {
    alert("Il campo Indirizzo e' obbligatorio.");
    form.Indirizzo.focus();

    return false;
  }

  if (form.Localita.value == "")
  {
    alert("Il campo Località e' obbligatorio.");
    form.Localita.focus();

    return false;
  }

  if (form.Provincia.value == "")
  {
    alert("Il campo Provincia e' obbligatorio.");
    form.Provincia.focus();

    return false;
  }

  if (form.CAP.value == "")
  {
    alert("Il campo CAP e' obbligatorio.");
    form.CAP.focus();

    return false;
  }

  if(form.CAP.value < "0" || form.CAP.value > "9")
  {
    form.CAP.focus();
    alert("Inserire nel campo CAP un valore numerico.");

    return false;
  }

  if (form.Telefono.value == "")
  {
    alert("Il campo Telefono e' obbligatorio."); 
    form.Telefono.focus();

    return false;
  }

  if(form.Telefono.value < "0" || form.Telefono.value > "9")
  {
    form.Telefono.focus();
    alert("Inserire nel campo Telefono un valore numerico.");

    return false;
  }

  if (form.FAX.value == "")
  {
    alert("Il campo FAX e' obbligatorio.");
    form.FAX.focus();

    return false;
  }

  if(form.FAX.value < "0" || form.FAX.value > "9")
  {
    form.FAX.focus();
    alert("Inserire nel campo FAX un valore numerico.");

    return false;
  }
*/

  var anyString = form.EMail.value;
	
  for (var i=0; i<=anyString.length-1; i++)
  {
    if (((anyString.charAt(i) >= "A") && (anyString.charAt(i) <= "Z")) || 
        ((anyString.charAt(i) >= "a") && (anyString.charAt(i) <= "z")) || 
        ((anyString.charAt(i) >= "0") && (anyString.charAt(i) <= "9")) ||
        ((anyString.charAt(i) == "@") || (anyString.charAt(i) == ".")))
    {
    }
    else
    {		
      form.EMail.focus();
      alert("Inserire nel campo E-Mail una e-mail valida.");

      return false;
    }
  }
  
//  form.submit();
  return true;
}
-->