function emailValidation(frm){
	var esito = true;
	with (frm.txtMail){
		if (value.length > 0){
			apos=value.indexOf("@"); 
			dotpos=value.lastIndexOf(".");
			lastpos=value.length-1;
			spacepos=value.indexOf(" ");
			if (apos<1 || dotpos-apos<2 || lastpos-dotpos>4 || lastpos-dotpos<2 || spacepos>-1) {		
				esito = false;
			}
		}
	}
	if (esito==false) {
		alert("Indirizzo e-mail non valido");
		frm.txtMail.focus();
		}
	return esito
}

function checkSpam(frm){
	check_form = true;

   EmailAddr = frm.txtMail.value;
   Filtro = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
   if (!Filtro.test(EmailAddr)) { check_form=false }

	return check_form;
}

