
function form_validator(theForm)
{

  if (theForm.nome.value == "")
  {
    alert("Compilare il campo nome");
    theForm.nome.focus();
    return (false);
  }
     if (/@/.test(theForm.nome.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Nome");
    theForm.nome.focus();
    return (false);
  }

  if (theForm.cognome.value == "")
  {
    alert("Compilare il campo cognome");
    theForm.cognome.focus();
    return (false);
  }
     if (/@/.test(theForm.cognome.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Cognome");
    theForm.cognome.focus();
    return (false);
  }

  
    if (theForm.citta.value == "")
  {
    alert("Compilare il campo cittā");
    theForm.citta.focus();
    return (false);
  }
  
     if (/@/.test(theForm.citta.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Cittā");
    theForm.citta.focus();
    return (false);
  }

    if (theForm.telefono.value == "")
  {
    alert("Compilare il campo telefono");
    theForm.telefono.focus();
    return (false);
  }
  
     if (/@/.test(theForm.telefono.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Telefono");
    theForm.telefono.focus();
    return (false);
  }
    if (theForm.indirizzo.value == "")
  {
    alert("Compilare il campo Indirizzo");
    theForm.indirizzo.focus();
    return (false);
  }
  
     if (/@/.test(theForm.indirizzo.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Indirizzo");
    theForm.indirizzo.focus();
    return (false);
  }

    if (theForm.email.value == "")
  {
    alert("Compilare il campo email");
    theForm.email.focus();
    return (false);
  }


 if (theForm.email.value.length < 7)
  {
    alert("L'email inserita non č corretta");
    theForm.email.focus();
    return (false);
  }

  if (theForm.email.value.indexOf("@") == -1)
  {
    alert("manca il carattere @ nella email");
    theForm.email.focus();
    return (false);
  }

   if (theForm.email.value.indexOf(".") == -1)
  {
    alert("manca il punto nella email");
    theForm.email.focus();
    return (false);
  }
  
   if (theForm.url_sito.value == "")
  {
    alert("Compilare il campo Indirizzo link di ritorno");
    theForm.url_sito.focus();
    return (false);
  }
  if (theForm.url_sito.value == "")
  {
    alert("Compilare il campo Indirizzo link di ritorno");
    theForm.url_sito.focus();
    return (false);
  }
  var espressione = /^http\:\/\//;
   if (espressione.test(theForm.url_sito.value))
  {
    alert("Si prega di non inserire http:// su Indirizzo sito web");
    theForm.url_sito.focus();
    return (false);
  }
  
   if (theForm.url_pagina.value == "")
  {
    alert("Compilare il campo Indirizzo link di ritorno");
    theForm.url_pagina.focus();
    return (false);
  }
	
	if (espressione.test(theForm.url_pagina.value))
  {
    alert("Si prega di non inserire http:// su Indirizzo link di ritorno");
    theForm.url_pagina.focus();
    return (false);
  }
     if (/@/.test(theForm.url_sito.value))
  {
    alert("Si prega di non inserire il carattere @ su Indirizzo sito web");
    theForm.url_sito.focus();
    return (false);
  }
     if (/@/.test(theForm.url_pagina.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Indirizzo link di ritorno");
    theForm.url_pagina.focus();
    return (false);
  }
  
     if (/@/.test(theForm.description.value))
  {
    alert("Si prega di non inserire il carattere @ sul campo Descrizione");
    theForm.description.focus();
    return (false);
  }
    return (true);
}

