// ===================================
// Check Input For Lavora.asp
// ===================================

	function CheckField()
	{
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		// Controllo i Campi obbligatori contengono qualcosa !
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		if (IsEmpty (document.frmInfo.Nome, 'Nome')) return false;
		if (IsEmpty (document.frmInfo.Cognome, 'Cognome')) return false;

		if (IsEmpty (document.frmInfo.Regione, 'Regione')) return false;
		if (IsEmpty (document.frmInfo.Provincia, 'Provincia')) return false;

		if (IsEmpty (document.frmInfo.Localita, 'Località')) return false;
		if (IsEmpty (document.frmInfo.Telefono, 'Telefono')) return false;
		if (IsEmpty (document.frmInfo.Nazionalita, 'Nazionalità')) return false;

		if (IsEmpty (document.frmInfo.ImpiegoAttuale, 'Impiego Attuale')) 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.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.Fax, 'Fax', 3))
		{
			document.frmInfo.Fax.select();
			document.frmInfo.Fax.focus();
			return false;
		}

		if (!CheckInput (document.frmInfo.DatiFiscali, 'Cod. Fisc. o P. Iva', 5))
		{
			document.frmInfo.DatiFiscali.select();
			document.frmInfo.DatiFiscali.focus();
			return false;
		}
		*/
		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

		// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
		var AreaInteresse = false;

		AreaInteresse = (AreaInteresse || document.frmInfo.CommercialeItalia.checked);
		AreaInteresse = (AreaInteresse || document.frmInfo.CommercialeEstero.checked);

		AreaInteresse = (AreaInteresse || document.frmInfo.Acquisti.checked);
		AreaInteresse = (AreaInteresse || document.frmInfo.Amministrazione.checked);
		AreaInteresse = (AreaInteresse || document.frmInfo.Segreteria.checked);
		AreaInteresse = (AreaInteresse || document.frmInfo.Direzione.checked);

		AreaInteresse = (AreaInteresse || document.frmInfo.Produzione.checked);
		AreaInteresse = (AreaInteresse || document.frmInfo.Ricerca.checked);
		AreaInteresse = (AreaInteresse || document.frmInfo.Logistica.checked);

		if (!AreaInteresse)
		{ 
			alert("E' necessario specificare almeno uno dei valori di Aree di Interesse");
			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: RichiestaLavora.js
// ===================================
