function valida(form)
{
	oscenita = new Array ("#", "http", "@", "merda", "cacca", "stronzo", "stronze"," puttana", "puttane", "culo", "vaffanculo"," imbecille","imbecilli", "cretino","cretini", "coglione","coglioni");
	oscenita_atsi = new Array ("merda", "cacca", "stronzo", "stronze"," puttana", "puttane", "culo", "vaffanculo"," imbecille","imbecilli", "cretino","cretini", "coglione","coglioni");
	tf = true;
		
	
	if (form.name.value == "") 
	{
		alert("Inserire il nome del Mittente");
		form.name.focus();
		return (false)
	}

     if (form.name.value.length > 50) 
	{
		alert("Nome Mittente troppo lungo, max 50 caratteri");
		form.name.focus();
		return (false)
	}

	ogg = new String(form.name.value);
    ogg = ogg.toUpperCase();

      for (var i=0; i < oscenita.length; i++) {
        ele = oscenita[i].toUpperCase();
        if (ogg.indexOf(ele) != -1){
             alert("Il nome del Mittente non e' in linea con i contenuti e lo stile del sito, e quindi non viene accettato");
	  	 form.name.focus();
		 return (false)
        }
	}

      if (form.email.value == "") 
	{
		alert("Inserire l'Oggetto del messaggio");
		form.email.focus();
		return (false)
	}
	
	ogg = new String(form.email.value);
      ogg = ogg.toUpperCase();

      for (var i=0; i < oscenita.length; i++) {
        ele = oscenita[i].toUpperCase();
        if (ogg.indexOf(ele) != -1){
             alert("L'oggetto non e' in linea con i contenuti e lo stile del sito, e quindi non viene accettato");
	  	 form.email.focus();
		 return (false)
        }
	}
	
     if (form.email.value.length > 100) 
	{
		alert("Oggetto troppo lungo, max 100 caratteri");
		form.email.focus();
		return (false)
	}

     if (form.to.value.length > 50) 
	{
		alert("'Risposta a:' troppo lunga, max 50 caratteri");
		form.to.focus();
		return (false)
	}

	ogg = new String(form.to.value);
      ogg = ogg.toUpperCase();

      for (var i=0; i < oscenita.length; i++) {
        ele = oscenita[i].toUpperCase();
        if (ogg.indexOf(ele) != -1){
             alert("La risposta non e' in linea con i contenuti e lo stile del sito, e quindi non viene accettato");
	  	 form.to.focus();
		 return (false)
        }
	}

	if (form.text.value == "") 
	{
		alert("Inserire il testo del Messaggio");
		form.text.focus();
		return (false)
	}
	
      tes = new String(form.text.value);
      tes = tes.toUpperCase();

	if (form.name.value == "Degustare") { 
	for (var i=0; i < oscenita_atsi.length; i++) {
        ele = oscenita_atsi[i].toUpperCase();
        if (tes.indexOf(ele) != -1){
             alert("Il testo non e' in linea con i contenuti e lo stile del sito, e quindi non viene accettato");
	  	 form.text.focus();
		 return (false)
        }
      }
	  } else {
	  for (var i=0; i < oscenita.length; i++) {
        ele = oscenita[i].toUpperCase();
        if (tes.indexOf(ele) != -1){
             alert("Il testo non e' in linea con i contenuti e lo stile del sito, e quindi non viene accettato");
	  	 form.text.focus();
		 return (false)
        }
	  }
	} 
	      
	return true
	
}