function validazione(theForm)
{

  if (theForm.nome.value == "")
  {
    alert("Inserire un valore per il campo \"Nome\".");
    theForm.nome.focus();
    return (false);
  }


  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ \t\r\n\f";
  var checkStr = theForm.nome.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 lettere e spazi nel campo \"Nome\".");
    theForm.nome.focus();
    return (false);
  }

 
  if (theForm.cognome.value == "")
  {
    alert("Inserire un valore per il campo \"Cognome\".");
    theForm.cognome.focus();
    return (false);
  }


  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ \t\r\n\f";
  var checkStr = theForm.cognome.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 lettere e spazi nel campo \"Cognome\".");
    theForm.cognome.focus();
    return (false);
  } 
 
 
 
 

  if (theForm.user_mail.value == "")
  {
    alert("Inserire un valore nel campo \"Email\".");
    theForm.user_mail.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ0123456789-@._-";
  var checkStr = theForm.user_mail.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 lettere, numeri e \"@._-\" nel campo \"email\".");
    theForm.user_mail.focus();
    return (false);
  }

  
//  if (theForm.telefono.value == "")
//  {
//    alert("Inserire un valore per il campo \"Telefono\".");
//    theForm.telefono.focus();
//    return (false);
//  }
  
//  if (theForm.telefono.value.length < 2)
//  {
//    alert("I numero di telefono non è valido.");
//    theForm.telefono.focus();
//    return (false);
//  }

//  var checkOK = "0123456789-+ ";
//  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("Inserire solo numeri nel campo Telefono.");
//    theForm.telefono.focus();
//    return (false);
//  }
  
  if (theForm.adulti.selectedIndex == 0)
  {
    alert("Specificare il numero di adulti.");
    theForm.adulti.focus();
    return (false);
  }


  if (theForm.user_mail.value !=  theForm.user_mailck.value)
  {
    alert("Attenzione, le due email non coincidono.");
    theForm.user_mail.focus();
    return (false);
  }



  if (theForm.privacy.checked != true)
  {
    alert("Non è stata accettata l'Informativa sulla privacy.");
    theForm.privacy.focus();
    return (false);
  }



	
  return (true);  
  
  
}

              function checkform(){
                 var t1=document.form1.nome.value;
                 var t2=document.form1.user_mail.value;

                 var alertext="";
                 var allok = true;

                 if (t1.length<1 || t2.length<1) {
                   alertext = alertext + "Tutti i campi con l'asterisco sono obbligatori. \n\r";
                   allok = false;
                 }

                 if (allok == false){
				   alert("ATTENZIONE!: " + alertext);
				 }
                 return allok;
              }



