function TESTAShop_Validator(theForm)
{

  if (theForm.Nome.value == "")
  {
    alert("Inserire un valore per il campo \"Nome\".");
    theForm.Nome.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  var checkStr = theForm.Nome.value;
  var allValid = true;
  var validGroups = 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 lettera caratteri 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ƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  var checkStr = theForm.Cognome.value;
  var allValid = true;
  var validGroups = 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 lettera caratteri nel campo \"Cognome\".");
    theForm.Cognome.focus();
    return (false);
  }

  if (theForm.Indirizzo.value == "")
  {
    alert("Inserire un valore per il campo \"Indirizzo\".");
    theForm.Indirizzo.focus();
    return (false);
  }

  if (theForm.Citta.value == "")
  {
    alert("Inserire un valore per il campo \"Città\".");
    theForm.Citta.focus();
    return (false);
  }

  if (theForm.CAP.value == "")
  {
    alert("Inserire un valore per il campo \"CAP\".");
    theForm.CAP.focus();
    return (false);
  }

  if (theForm.CAP.value.length < 5)
  {
    alert("Inserire almeno 5 caratteri nel campo \"CAP\".");
    theForm.CAP.focus();
    return (false);
  }

  if (theForm.CAP.value.length > 5)
  {
    alert("Inserire al massimo 5 caratteri nel campo \"CAP\".");
    theForm.CAP.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.CAP.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Inserire solo cifra caratteri nel campo \"CAP\".");
    theForm.CAP.focus();
    return (false);
  }

  if (theForm.Provincia.value == "")
  {
    alert("Inserire un valore per il campo \"Provincia\".");
    theForm.Provincia.focus();
    return (false);
  }

  if (theForm.Provincia.value.length < 2)
  {
    alert("Inserire almeno 2 caratteri nel campo \"Provincia\".");
    theForm.Provincia.focus();
    return (false);
  }

  if (theForm.Provincia.value.length > 2)
  {
    alert("Inserire al massimo 2 caratteri nel campo \"Provincia\".");
    theForm.Provincia.focus();
    return (false);
  }

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzƒŠŒŽšœžŸÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ";
  var checkStr = theForm.Provincia.value;
  var allValid = true;
  var validGroups = 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 lettera caratteri nel campo \"Provincia\".");
    theForm.Provincia.focus();
    return (false);
  }

  if (theForm.email.value == "")
  {
    alert("Inserire un valore per il campo \"email\".");
    theForm.email.focus();
    return (false);
  }

  if (theForm.Copie.value == "")
  {
    alert("Inserire un valore per il campo \"Copie\".");
    theForm.Copie.focus();
    return (false);
  }

  if (theForm.Copie.value.length < 1)
  {
    alert("Inserire almeno 1 caratteri nel campo \"Copie\".");
    theForm.Copie.focus();
    return (false);
  }

  if (theForm.Copie.value.length > 2)
  {
    alert("Inserire al massimo 2 caratteri nel campo \"Copie\".");
    theForm.Copie.focus();
    return (false);
  }

  var checkOK = "0123456789-";
  var checkStr = theForm.Copie.value;
  var allValid = true;
  var validGroups = true;
  var decPoints = 0;
  var allNum = "";
  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;
    }
    allNum += ch;
  }
  if (!allValid)
  {
    alert("Inserire solo cifra caratteri nel campo \"Copie\".");
    theForm.Copie.focus();
    return (false);
  }

  var chkVal = allNum;
  var prsVal = parseInt(allNum);
  if (chkVal != "" && !(prsVal > "0"))
  {
    alert("Inserire un valore maggiore di \"0\" nel campo \"Copie\".");
    theForm.Copie.focus();
    return (false);
  }

  if (theForm.Prodotto.selectedIndex < 0)
  {
    alert("Selezionare una delle opzioni di \"Prodotto\".");
    theForm.Prodotto.focus();
    return (false);
  }

  if (theForm.Prodotto.selectedIndex == 0)
  {
    alert("La prima opzione di \"Prodotto\" non è una selezione valida. Scegliere un'altra opzione.");
    theForm.Prodotto.focus();
    return (false);
  }
  return (true);
}