function checkEmail(NameObject) {
	var temp; var space;
	if (NameObject.value == "") {
		alert("Il campo \"E-mail\" è obbligatorio");
		NameObject.focus();
		return (false);
	}
	// check validità email
	txt=NameObject.value;
	
	// check presenza @
	if (txt.indexOf("@")<2) {
		alert("Indirizzo E-mail non valido");
		NameObject.focus();
		return (false);
	}
	// check presenza .
	if (txt.lastIndexOf(".")<txt.indexOf("@")) {
		alert("Indirizzo E-mail non valido");
		NameObject.focus();
		return (false);
	}
	 
	// check lunghezza almeno 6 char
	if (txt.length<6) {
		alert("Indirizzo E-mail non valido");
		NameObject.focus();
		return (false);
	}
	return (true);
}

function checkNamePhone () {
	
	if (document.forms[0].Name.value.length == 0) {
		alert("Per inviare la richiesta è necessario inserire il Name");
		document.forms[0].Name.focus();
		return false;
	}
	if (document.forms[0].Phone.value.length == 0) {
		alert("Per inviare la richiesta è necessario inserire il Phone");
		document.forms[0].Phone.focus();
		return false;
	}
	
	return true;
}

function checkComments () {
	if (document.forms[0].Comments.value.length < 10) {
		alert("Per inviare la richiesta è necessario inserire un Testo");
		document.forms[0].Comments.focus();
		return false;
	} else {
		return true;
	}
}