// ===================================
// Check Input For Info.asp
// ===================================

	function CheckField()
	{
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		// Controllo i Campi obbligatori contengono qualcosa !
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		if (IsEmpty (document.frmInfo.Nome, 'Nome e Cognome')) return false;
		if (IsEmpty (document.frmInfo.Info, 'Informazioni richieste')) return false;
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		// Controllo che i Campi obbligatori non siano vuoti e contengano dei dati corretti
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		if (!FieldIsOK (document.frmInfo.EMail, 'E-mail', 4)) return false;
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		// Controllo che i Campi NON obbligatori (ma compilati), contengano dei dati corretti
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		if (!CheckInput (document.frmInfo.Fax, 'Fax', 3))
		{
			document.frmInfo.Fax.select();
			document.frmInfo.Fax.focus();
			return false;
		}

		if (!CheckInput (document.frmInfo.Cap, 'C.A.P.', 2))
		{
			document.frmInfo.Cap.select();
			document.frmInfo.Cap.focus();
			return false;
		}

		if (!CheckInput (document.frmInfo.Telefono, 'Telefono', 3))
		{
			document.frmInfo.Telefono.select();
			document.frmInfo.Telefono.focus();
			return false;
		}

		if (!CheckInput (document.frmInfo.DatiFiscali, 'Cod. Fisc. o P. Iva', 5))
		{
			document.frmInfo.DatiFiscali.select();
			document.frmInfo.DatiFiscali.focus();
			return false;
		}
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^


		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		// Controllo la Validità dei valori inseriti nei Campi compilati !
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		if (!IsCAP (document.frmInfo.Cap))
		{ 
			alert("Il campo CAP non è corretto.");
			document.frmInfo.Cap.select();
			document.frmInfo.Cap.focus();
			return false;
		}

		/*
		if (!IsCodiceFiscale (document.frmInfo.DatiFiscali) && !IsPartitaIVA (document.frmInfo.DatiFiscali))
		{
			alert("Il campo C.F. o P.Iva  non è corretto.");
			document.frmInfo.DatiFiscali.select();
			document.frmInfo.DatiFiscali.focus();
			return false;
		}
		*/

		if (!IsEmail (document.frmInfo.EMail))
		{
			alert("Il campo EMAIL non è corretto.");
			document.frmInfo.EMail.select();
			document.frmInfo.EMail.focus();
			return false;
		}
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

		if (!document.frmInfo.Privacy.checked){
			alert("Senza Consenso alla Privacy\nnon si può procedere alla Registrazione !");
			return false;
		}

		return true;
	}

// ===================================
// EOF: RichiestaInfo.js
// ===================================
