<!--//

	function Trim(stringa)
	{
		reTrim=/\s+$|^\s+/g;
		return stringa.replace(reTrim,"");
	}

	function Numeri(valore)
	{
		var ieKey = event.keyCode;

		if (!(ieKey >= 48 && ieKey <= 57))
		{
			event.returnValue = false;
		}
	}
	
	function ValidaForm()
	{
		var cognome = document.getElementById("txtCognome");
		var nome = document.getElementById("txtNome");
		var localitacli = document.getElementById("txtCitta");
		var indirizzo = document.getElementById("txtIndirizzo");
		var telefono = document.getElementById("txtTelefono");
		var fax = document.getElementById("txtFax");
		var trattativa = document.getElementById("ddlTrattativa");
		var email = document.getElementById("txtEmail");
		
		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(localitacli.value)=="")
		{
			alert("Specificare la localita\' di residenza.");
			localitacli.focus();
			return false;
		}
		
		if(Trim(indirizzo.value)=="")
		{
			alert("Specificare l\'indirizzo di residenza.");
			indirizzo.focus();
			return false;
		}
		
		if(Trim(email.value)=="")
		{
			alert("Specificare un indirizzo e-mail.");
			email.focus();
			return false;
		}
		
		if((Trim(telefono.value)=="")&&(Trim(fax.value)==""))
		{
			alert("Specificare almeno un numero di telefono.");
			telefono.focus();
			return false;
		}
		
		if(trattativa.value==0)
		{
			alert("Specificare il tipo di trattativa.");
			trattativa.focus();
			return false;
		}
		
		return true;
	}
	
	function MessaggioEmail()
	{
		alert('Email inviata correttamente.');
		return;
	}
	
//-->