function controllaModulo()
   {
   
   
	var nome = document.modulocontatti.nome.value;
	var cognome = document.modulocontatti.cognome.value;
	var recapito = document.modulocontatti.recapito.value;
	var mail = document.modulocontatti.mail.value;
  	var messaggio = document.modulocontatti.messaggio.value;
    var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
 	var autorizzato = document.modulocontatti.autorizzo[0].checked;

 if ((nome == "") || (nome == "undefined")) {
   alert("Il campo Nome è obbligatorio.\nname field is obligatory\nname fangen ist obligatorisch auf");
   document.modulocontatti.nome.focus();
   return false;
}


if ((cognome == "") || (cognome == "undefined")) {
   alert("Il campo Cognome è obbligatorio.\nsurname field is obligatory\nFamilienname fangen ist obligatorisch auf");
   document.modulocontatti.cognome.focus();
   return false;
}
 
 
 
if (mail!=""){

	if (!email_reg_exp.test(mail) || (mail == "") || (mail == "undefined")) {
	alert("INSERISCI UN INDIRIZZO EMAIL VALIDO DEL TIPO: TUONOME@TUODOMINIO.IT.\ninsert a valid email address type: yourname@yoursite.com\neine gültige email addressart einsetzen: yourname@yoursite.com");
	document.modulocontatti.mail.select();  // NEL MIO CASO email
	document.modulocontatti.mail.value="";
	document.modulocontatti.mail.focus();
	return false;
	
	}

}

if ((messaggio == "") || (messaggio == "undefined")) {
   alert("Il campo Messaggio è obbligatorio.\nmessage field is obligatory\nAnzeige fangen ist obligatorisch auf");
   document.modulocontatti.messaggio.focus();
   return false;
}

if (autorizzato === false) {
   alert("Per inviare il modulo devi autorizzare il trattamento dei dati personali.\nfor send the module you it authorizes the treatment of personal data\nfür das Modul senden autorisieren die Behandlung der persönlichen Daten");
   return false;
}
 
 }
 
 
 
function isnum(obj) {
if (isNaN(obj.value) || parseInt(obj.value)<0 || parseInt(obj.value) > 9999999999999999)
{
alert('Nel campo è possibile immettere solo numeri!.\nin this field to only insert numbers.\ndiesbezüglich auffangen, um Zahlen nur einzusetzen');
obj.value="";
obj.focus();
}
}
