
self.moveTo(0,0);
self.resizeTo(screen.availWidth,screen.availHeight);


function confirmReset()
 {
	var resetForm = confirm("Vuoi cancellare tutto ? / Do you want erase everything ?");
	if (resetForm == true) 
		{modulo.struttura.focus();
		return true;}
	return false;
}



function submitForm()

{


if ((modulo.cognome.value == "") || (modulo.nome.value == "") || (modulo.email.value == ""))
{
alert("Dati base non corretti !");
modulo.struttura.focus();
return (false);  
}
if ((modulo.cognome.value.length < 3) || (modulo.nome.value.length < 3) || (modulo.email.value.length < 8))
{
alert("Dati non corretti !");
modulo.struttura.focus();
return (false);  
}
if ((modulo.nome.value == modulo.cognome.value))
{
alert("Dati base non corretti !");
modulo.struttura.focus();
return (false);  
}


if (modulo.cap.value.length < 5)
  {
alert("Inserire solo numeri nel campo CAP (niente spazi).");   
modulo.cap.focus();
    return (false);
  }



var checkOK = "0123456789";
  var checkStr = modulo.cap.value;
  var allValid = 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)
  {
    modulo.cap.focus();
    return (false);
}




if (modulo.telefono.value.length < 6)
  {
    modulo.telefono.focus();
    return (false);
  }




var checkOK = "0123456789";
  var checkStr = modulo.telefono.value;
  var allValid = 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 numeri nel campo Numero di telefono (niente spazi).");
    modulo.telefono.focus();
    return (false);
  }








 txt=document.modulo.email.value;

  if ((txt.indexOf("@")<3) || (modulo.email.value.length >50))
{
modulo.struttura.focus();
  alert("Dati non corretti ! ");
return (false);
  }

if ((modulo.struttura.value == "") || (modulo.via.value == "") || (modulo.comune.value == "") || (modulo.provincia.value == "") 
|| (modulo.cap.value == "") || (modulo.telefono.value == "") || (modulo.sito.value == "http://www.") )
{
modulo.struttura.focus(); 
alert("Hai lasciato campi vuoti  ! ");
return (false);
}

}
// FINE NASCOSTO A BROWSER INCOMPATIBILI -->




