function validazione(){
with(document.form1) {
	if(nome.value=="") {
	alert("Inserire il nome");
	nome.focus();
	return false;
	}
	if(cognome.value=="") {
	alert("Inserire il cognome");
	cognome.focus();
	return false;
	}
	if(telefono.value=="") {
	alert("Inserire il numero di telefono");
	telefono.focus();
	return false;
	}
	if(messaggio.value=="") {
	alert("Inserire il messaggio");
	telefono.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;
	}
}
return true;
}