// CAMPI DI CONTROLLO
function controllo(){
with(document.modulo) {
if(categoria.value=="") {
alert("Compilare il campo CATEGORIA");
categoria.focus();
return false;
}
if(nome.value=="") {
alert("Compilare il campo NOME");
nome.focus();
return false;
}
if(cognome.value=="") {
alert("Compilare il campo COGNOME");
cognome.focus();
return false;
}
if(citta.value=="") {
alert("Compilare il campo CITTA'");
citta.focus();
return false;
}
if(provincia.value=="") {
alert("Compilare il campo PROVINCIA");
provincia.focus();
return false;
}
	if(mail.value=="") {
	alert("Inserire l' e-mail");
	mail.focus();
	return false;
	}
	var stato=true;
	if(mail.value.indexOf(" ")!=-1) {
	mail.focus();
	stato=false;
	}
	var chiocciola=mail.value.indexOf("@");
	if(chiocciola<2) {
	mail.focus();
	stato=false;
	}
	var punto=mail.value.indexOf(".", chiocciola);
	if(punto<chiocciola+3) {
	mail.focus();
	stato=false;
	}
	var lung=mail.value.length;
	if(lung-punto<3) {
	mail.focus();
	stato=false;
	}
	
	//if(stato) {
		//alert("E-mail valida");
	//}else{	

	if(stato==false) {
		alert("E-mail non valida");
	return stato;
	}
}
//alert("Il modulo sara' inoltrato alla nostra casella email. GRAZIE.");
return true;
} 
