<!--//
	
	function ValidaForm()
	{
		var cognome = document.getElementById("txtCognome");
		var nome = document.getElementById("txtNome");
		var localita = document.getElementById("txtLocalita");
		var email = document.getElementById("txtEmail");
		var telefono = document.getElementById("txtTelefono");
		var oggetto = document.getElementById("txtOggetto");
		var messaggio = document.getElementById("txtMessaggio");
		var filtroEmail = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;
		
		if(Trim(cognome.value)=="")
		{
			alert("Specificare il cognome.");
			cognome.focus();
			return false;
		}
		
		if(Trim(nome.value)=="")
		{
			alert("Specificare il nome.");
			nome.focus();
			return false;
		}
		
		if(Trim(localita.value)=="")
		{
			alert("Specificare la localita\'.");
			localita.focus();
			return false;
		}
		
		if(Trim(email.value)=="")
		{
			alert("Specificare almeno un indirizzo e-mail.");
			email.focus();
			return false;
		}
		
		if(Trim(email.value)!="")
		{
			if(!filtroEmail.test(Trim(email.value)))
			{
				alert("Formato non valido per l\'indirizzo e-mail.");
				email.focus();
				return false;
			}
		}
		
		if(Trim(telefono.value)=="")
		{
			alert("Specificare il numero di telefono.");
			telefono.focus();
			return false;
		}
		
		if(Trim(oggetto.value)=="")
		{
			alert("Specificare l\'oggetto.");
			oggetto.focus();
			return false;
		}
		
		if(Trim(messaggio.value)=="")
		{
			alert("Specificare il messaggio.");
			messaggio.focus();
			return false;
		}
		
		return true;
	}

	function MessaggioEmail()
	{
		alert('Email inviata correttamente.');
		return;
	}
//-->