function checkdata ()
	{
				
		if (document.forms[0].aptDa.value == '')
		{
			alert ('Manca l\'aeroporto di PARTENZA');
			document.forms[0].aptDa.focus();
			return false;
		}
		
		if ((document.forms[0].aptDa.value.length) < 3)
		{
			alert ('Il nome dell\'aeroporto di PARTENZA è troppo breve');
			document.forms[0].aptDa.focus();
			return false;
		}
		
		if (document.forms[0].aptA.value == '')
		{
			alert ('Manca l\'aeroporto di ARRIVO');
			document.forms[0].aptA.focus();
			return false;
		}
			
		if (document.forms[0].aptA.value.length < 3)
		{
			alert ('Il nome dell\'aeroporto di ARRIVO è troppo breve');
			document.forms[0].aptA.focus();
			return false;
		}
					
		if (document.frmSearch.RT.checked)
		{
			date1 = document.frmSearch.d1.value.replace(/\//g,'');
			date2 = document.frmSearch.d2.value.replace(/\//g,'');

			d1 = date1.substring(4,8) + date1.substring(2,4) + date1.substring(0,2);
			d2 = date2.substring(4,8) + date2.substring(2,4) + date2.substring(0,2);
			
			if (d2 < d1)
			{
				alert ('La data di ritorno è antecedente a quella di partenza');
				return false;
			}			
		}

		return true;
	}