<!--
function FrontPage_Form1_Validator(theForm)
{

   // inizio controllo campo Società

  if (theForm.Societa.value == "")
  {
    alert("Compilare campo \"Societa\"");
    theForm.Societa.focus();
    return (false);
  }

  if (theForm.Societa.value.length < 3)
  {
    alert("Inserire almeno 3 caratteri nel campo \"Societa\"");
    theForm.Societa.focus();
    return (false);
  }

  if (theForm.Societa.value.length > 50)
  {
    alert("Inserire un valore minore di 50 caratteri nel campo \"Societa\"");
    theForm.Societa.focus();
    return (false);
  }
  
  // fine controllo campo Società
  
  
// inizio controllo campo Contatto  

  if (theForm.Contatto.value == "")
  {
    alert("Compilare campo \"PersonaDaContattare\"");
    theForm.Contatto.focus();
    return (false);
  }

  if (theForm.Contatto.value.length < 3)
  {
    alert("Inserire almeno 3 caratteri nel campo \"PersonaDaContattare\"");
    theForm.Contatto.focus();
    return (false);
  }

  if (theForm.Contatto.value.length > 50)
  {
    alert("Inserire un valore minore di 50 caratteri nel campo \"PersonaDaContattare\"");
    theForm.Contatto.focus();
    return (false);
  }

// Fine controllo campo Contatto  


//controllo Email
 
 
 
 
 if (theForm.Email.value == "")
  {
    alert("Inserire un valore per il campo \"Email\".");
    theForm.Email.focus();
    return (false);
  }


  ValoreEmail = theForm.Email.value;
   PosizioneAt = theForm.Email.value.indexOf("@");
   PosizionePunto = theForm.Email.value.indexOf(".");
   
   
  	if (PosizioneAt==-1 || PosizioneAt==0 || PosizionePunto==-1 || PosizionePunto==0 || PosizioneAt==ValoreEmail.length-1)
   
   {  
    alert("Inserire un indirizzo di E-mail Corretto \"Email\".");
    theForm.Email.focus();
    return (false);
  }
 

//  if (theForm.Email.value.length < 7)
//  {
//   alert("Inserire almeno 7 caratteri nel campo \"Email\".");
//   theForm.Email.focus();
//   return (false);
//  }

  if (theForm.Email.value.length > 60)
  {
    alert("Inserire al massimo 60 caratteri nel campo \"Email\".");
    theForm.Email.focus();
  return (false);
  }
//controllo Email


// inizio controllo campo Telefono 

  if (theForm.Telefono.value == "")
  {
    alert("Compilare campo \"Telefono\"");
    theForm.Telefono.focus();
    return (false);
  }

  if (theForm.Telefono.value.length < 6)
  {
    alert("Inserire più di 6 numeri nel campo \"Telefono\"");
    theForm.Telefono.focus();
    return (false);
  }

  if (theForm.Telefono.value.length > 20)
  {
    alert("Inserire meno di 20 nel campo \"Telefono\"");
    theForm.Telefono.focus();
    return (false);
  }

  var checkOK = "0123456789-/ \t\r\n\f";
  var checkStr = theForm.Telefono.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Puoi inserire solo numeri, Non è consentito inserire caratteri diversi da \"/\" nel campo \"Telefono\"");
    theForm.Telefono.focus();
    return (false);
  }
  
  // fine controllo campo Telefono 
  

//  if (theForm.Fax.value == "")
//  {
//    alert("Please enter a value for the \"Fax\" field.");
//    theForm.Fax.focus();
//    return (false);
//  }

//  if (theForm.Fax.value.length < 6)
//  {
//    alert("Please enter at least 6 characters in the \"Fax\" field.");
 //   theForm.Fax.focus();
//    return (false);
//  }

//  if (theForm.Fax.value.length > 20)
//  {
//    alert("Please enter at most 20 characters in the \"Fax\" field.");
//    theForm.Fax.focus();
//    return (false);
//  }

//  var checkOK = "0123456789-/ \t\r\n\f";
//  var checkStr = theForm.Fax.value;
//  var allValid = true;
//  for (i = 0;  i < checkStr.length;  i++)
//  {
//    ch = checkStr.charAt(i);
//    for (j = 0;  j < checkOK.length;  j++)
//      if (ch == checkOK.charAt(j))
//        break;
//    if (j == checkOK.length)
//    {
//      allValid = false;
//      break;
//    }
//  }
//  if (!allValid)
//  {
//    alert("Please enter only digit, whitespace and \"/\" characters in the \"Fax\" field.");
//    theForm.Fax.focus();
 //   return (false);
//  }

//  var radioSelected = false;
//  for (i = 0;  i < theForm.Clienti.length;  i++)
//  {
//    if (theForm.Clienti[i].checked)
//        radioSelected = true;
//  }
//  if (!radioSelected)
//  {
//    alert("Please select one of the \"ClienteMaxPower\" options.");
//    return (false);
//  }



// inizio controllo campo login

// inizio controllo campo Password 

  if (theForm.Login.value == "")
  {
    alert("Compilare campo \"Login\"");
    theForm.Login.focus();
    return (false);
  }

  if (theForm.Login.value.length < 4)
  {
    alert("Inserire almeno 4 caratteri nel campo \"Login\" ");
    theForm.Login.focus();
    return (false);
  }

  if (theForm.Login.value.length > 8)
  {
    alert("Inserire un valore minore di 8 caratteri nel campo \"Login\"");
    theForm.Login.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒšœŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-";
  var checkStr = theForm.Login.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Inserire solo caratteri o numeri nel campo \"Login\"");
    theForm.Login.focus();
    return (false);
  }


// fine controllo campo login



// inizio controllo campo Password 

  if (theForm.Password.value == "")
  {
    alert("Compilare campo \"Password\"");
    theForm.Password.focus();
    return (false);
  }

  if (theForm.Password.value.length < 4)
  {
    alert("Inserire almeno 4 caratteri nel campo \"Password\" ");
    theForm.Password.focus();
    return (false);
  }

  if (theForm.Password.value.length > 8)
  {
    alert("Inserire un valore minore di 8 caratteri nel campo \"Password\"");
    theForm.Password.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒšœŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-";
  var checkStr = theForm.Password.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Inserire solo caratteri o numeri nel campo \"Password\"");
    theForm.Password.focus();
    return (false);
  }

  if (theForm.Convalida.value == "")
  {
    alert("Compilare campo \"ConfermaPassword\"");
    theForm.Convalida.focus();
    return (false);
  }

  if (theForm.Convalida.value.length < 4)
  {
    alert("Inserire almeno 4 caratteri nel campo  \"ConfermaPassword\"");
    theForm.Convalida.focus();
    return (false);
  }

  if (theForm.Convalida.value.length > 8)
  {
    alert("Inserire un valore minore di 8 caratteri nel campo \"ConfermaPassword\"");
    theForm.Convalida.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒšœŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-";
  var checkStr = theForm.Convalida.value;
  var allValid = true;
  for (i = 0;  i < checkStr.length;  i++)
  {
    ch = checkStr.charAt(i);
    for (j = 0;  j < checkOK.length;  j++)
      if (ch == checkOK.charAt(j))
        break;
    if (j == checkOK.length)
    {
      allValid = false;
      break;
    }
  }
  if (!allValid)
  {
    alert("Inserire solo caratteri o numeri nel campo \"ConfermaPassword\"");
    theForm.Convalida.focus();
    return (false);
  }
  
  
  
  
   // fine controllo campo Password 
  
  
    if (theForm.Convalida.value != theForm.Password.value)
  {
    alert("PASSWORD NON VALIDA, DIGITA NEL CAMPO \"Convalida\"LA STESSA PASSWORD DIGITATA NEL CAMPO PASSWORD ");
    theForm.Convalida.focus();
    return (false);
  }
  
  
  return (true);
}
//-->
