<!--
function check_Email(strTmp){
var Valid = true;
var myAtSymbolAt = strTmp.indexOf('@');
var myLastDotAt = strTmp.lastIndexOf('.');
var mySpaceAt = strTmp.indexOf(' ');
var myLength = strTmp.length;

// deve essere presente almeno un @ e non prima del carattere 2
if (myAtSymbolAt < 1 ){Valid = false}

// deve esserci almeno un punto dopo il @
if (myLastDotAt < myAtSymbolAt){Valid = false}

// devono esserci almeno due caratteri dopo l'ultimo punto
if (myLength - myLastDotAt <= 2){Valid = false}

// non devono esserci spazi
if (mySpaceAt != -1){Valid = false}

 
return Valid
}

/////////////////////////////////////////////////////////////////////////////////////////////////

function check_form_dati(){

	//controlla che il campo "nome" non sia vuoto
	strTmp=document.form_dati.nome.value.toLowerCase();
	if (strTmp.length <= 0){ 
		alert("El campo Nombre  es vacío ");
		document.form_dati.nome.focus();
		return false;}
	
	//controlla l'email
	strTmp=document.form_dati.email.value.toLowerCase();
	if (strTmp.length <= 0){
		alert("El campo Email es vacío ");
		document.form_dati.email.focus();
		return false;}
	if ((strTmp.length > 0) && (check_Email(strTmp) != true)){
		alert("El email address es incorrecto");
		document.form_dati.email.focus();
		return false;}
	
	//controlla che il campo "telefono" sia almeno di otto caratteri
	strTmp=document.form_dati.telefono.value.toLowerCase();
	if ((strTmp.length > 0) && (strTmp.length <= 8)){ 
		alert("El número telefónico es incorrecto");
		document.form_dati.telefono.focus();
		return false;}

	//controlla che il campo "testo" non sia vuoto
	strTmp=document.form_dati.testo.value.toLowerCase();
	if (strTmp.length <= 0){ 
		alert("El campo Mensaje es vacío ");
		document.form_dati.testo.focus();
		return false;}

	return true;
}
-->