// JavaScript Document
function verifica(form) {   
with(document.newsletter) {
	if(email.value=="") {
	alert("Inserire l' e-mail");
	email.focus();
	return false;
	}
	var stato=true;
	if(email.value.indexOf(" ")!=-1) {
	email.focus();
	stato=false;
	}
	var chiocciola=email.value.indexOf("@");
	if(chiocciola<2) {
	email.focus();
	stato=false;
	}
	var punto=email.value.indexOf(".", chiocciola);
	if(punto<chiocciola+3) {
	email.focus();
	stato=false;
	}
	var lung=email.value.length;
	if(lung-punto<3) {
	email.focus();
	stato=false;
	}
	
	//if(stato) {
		//alert("E-mail valida");
	//}else{	

	if(stato==false) {
		alert("E-mail non valida. L'E-mail deve essere del tipo tuonome@tuoprovider");
	return stato;
	}
	if(privacy.checked==0) {
	alert("E' necessario leggere ed accettare le condizioni di privacy");
	privacy.focus();
	return false;
	}
}
return true;
}	
