// JavaScript Document
<!--
 function isEmail(str) {
  var supported=0;
  
  if (window.RegExp) {
   var tempStr = "a";
   var tempReg = new RegExp(tempStr);
   if (tempReg.test(tempStr)) supported = 1;
  }
  if (!supported) 
   return (str.indexOf(".")>2) && (str.indexOf("@") > 0);
  var r1 = new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
  var r2 = new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$");
  return (!r1.test(str) && r2.test(str));
 }  
   
 function decisione(ris,the_form) {
  
  if (the_form.nome.value == "")
  {
    alert("Attenzione! Inserisci il tuo nome e cognome !!!");
    the_form.nome.focus();
    return (false);
  }  
if (the_form.citta.value == "")
  {
    alert("Attenzione! Inserisci la tua città !!!");
    the_form.citta.focus();
    return (false);
  }  
if (the_form.oggetto.value == "")
  {
    alert("Attenzione! Inserisci L'oggetto della segnalazione !!!");
    the_form.oggetto.focus();
    return (false);
  }  

if (the_form.messaggio.value == "")
  {
    alert("Attenzione! Inserisci il tuo messaggio !!!");
    the_form.messaggio.focus();
    return (false);
  }
if (!the_form.privacy.checked)
   {
     alert("Devi accettare l'informativa sulla privacy spuntanto l'apposita casella!");
     return (false);
  }  
if (the_form.email.value == "")
  {
    alert("Attenzione! Inserisci il tuo indirizzo email !!!");
    the_form.email.focus();
    return (false);
  }
if (the_form.email.value != "")
  {
   if (ris) 
    {
     return (true);
    }
   else
    {
     alert("Attenzione! Inserisci un indirizzo di email valido !!!");
     the_form.email.focus();
     return (false);
    }
  }
 return (true);
 } 
//-->