
function submitform() {
	
	if(document.modulo.nome.value == '' || document.modulo.nome.value == 'undefined') {
		alert("Attenzione!! Compilazione incompleta del form:\nnon hai specificato il tuo nome!");
		document.modulo.nome.focus();
		
	} else if (document.modulo.cognome.value == '' || document.modulo.cognome.value == 'undefined') {
		alert("Attenzione!! Compilazione incompleta del form:\nnon hai specificato il tuo cognome!");
		document.modulo.cognome.focus();
	
	} else if (document.modulo.comune.value == '' || document.modulo.comune.value == 'undefined') {
		alert("Attenzione!! Compilazione incompleta del form:\nnon hai specificato il comune!");
		document.modulo.d_comune.focus();
		
	} else if (document.modulo.provincia.value == '' || document.modulo.provincia.value == 'undefined') {
		alert("Attenzione!! Compilazione incompleta del form:\nnon hai specificato la provincia!");
		document.modulo.provincia.focus();
		
	} else if (document.modulo.email.value == '' || document.modulo.email.value == 'undefined') {
		alert("Attenzione!! Compilazione incompleta del form:\nNon hai specificato il tuo indirizzo email!");
		document.modulo.email.focus();
		
	} else if (document.modulo.email.value.indexOf("@") == -1 || document.modulo.email.value.indexOf(".") == -1) {
		alert("Attenzione!! Compilazione errata del form:\nNon hai specificato un indirizzo email valido!");
		document.modulo.email.value = '';
		document.modulo.email.focus();
	
	

	} else {
	 document.modulo.submit();
    }

		
}




function numeralsOnly(evt) {
evt = (evt) ? evt : event;
var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode
: ((evt.which) ? evt.which : 0));
if (charCode> 31 && (charCode < 48 || charCode> 57)) {
alert("Puoi inserire solo numeri!");
return false;
}
return true;

}


	
	

	
