<!--

function SymError()
{
  return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
  return (new Object());
}

window.open = SymWinOpen;


function bookingNA() {
		var props = 'toolbar=no,location=no,directories=no,status=yes,scrollbars=yes,resizable=yes,copyhistory=no,width=600,height=500,top=0,left=0';
		window.open('https://res.amadeus.net/pl/1a-res-usa/US/avail_only.htm?OFFICE_ID=MIA1S38AC', 'showBookingEngine',  props);
		}

tlTimer=null;

function fieldLength(field,len)
	{
	if( field.value.length>len )
		{
		alert('Too many characters (max '+len+')');
		field.value=field.value.substring(0, len-1);
		}
	return false;
	}

	
function Dup_date_car()
	{
	//var oldDepart = document.getElementById('departure_code_'+RowNum);
	//var test = document.getElementById(date_id);
	//alert(test.value);
	var J_flight_date_1 = document.requestForm.flight_date_1;
	var J_flight_date_2 = document.requestForm.flight_date_2;
	var J_flight_date_3 = document.requestForm.flight_date_3;
	var J_flight_date_4 = document.requestForm.flight_date_4;
	var J_car_in_date_1 = document.requestForm.car_in_date_1;
	var J_car_out_date_1 = document.requestForm.car_out_date_1;
	var J_car_in_date_2 = document.requestForm.car_in_date_2;
	var J_car_out_date_2 = document.requestForm.car_out_date_2;
	var J_car_in_date_3 = document.requestForm.car_in_date_3;
	var J_car_out_date_3 = document.requestForm.car_out_date_3;
	var temp;
	temp = J_flight_date_1.value.substr(0,8);
	if ( temp !='') 
		J_car_in_date_1.value = temp;
		temp='';
	temp = J_flight_date_2.value.substr(0,8);
	if ( temp !='') 
		J_car_out_date_1.value = temp;
		temp='';
	temp = J_flight_date_2.value.substr(0,8);
	if ( temp !='') 
		J_car_in_date_2.value = temp;
		temp='';
	temp = J_flight_date_3.value.substr(0,8);
	if ( temp !='') 
		J_car_out_date_2.value = temp;
		temp='';
	temp = J_flight_date_3.value.substr(0,8);
	if ( temp !='') 
		J_car_in_date_3.value = temp;
		temp='';
	temp = J_flight_date_4.value.substr(0,8);
	if ( temp !='') 
		J_car_out_date_3.value = temp;
		temp='';
		
		
	//alert(J_flight_date_1.value.substr(0,8));
	}
function Dup_date_hotel()
	{
		//var oldDepart = document.getElementById('departure_code_'+RowNum);
	//var test = document.getElementById(date_id);
	//alert(test.value);
	var J_flight_date_1 = document.requestForm.flight_date_1;
	var J_flight_date_2 = document.requestForm.flight_date_2;
	var J_flight_date_3 = document.requestForm.flight_date_3;
	var J_flight_date_4 = document.requestForm.flight_date_4;
	var J_hotel_in_date_1 = document.requestForm.hotel_in_date_1;
	var J_hotel_out_date_1 = document.requestForm.hotel_out_date_1;
	var J_hotel_in_date_2 = document.requestForm.hotel_in_date_2;
	var J_hotel_out_date_2 = document.requestForm.hotel_out_date_2;
	var J_hotel_in_date_3 = document.requestForm.hotel_in_date_3;
	var J_hotel_out_date_3 = document.requestForm.hotel_out_date_3;
	var temp;
	temp = J_flight_date_1.value.substr(0,8);
	if ( temp !='') 
		J_hotel_in_date_1.value = temp;
		temp='';
	temp = J_flight_date_2.value.substr(0,8);
	if ( temp !='') 
		J_hotel_out_date_1.value = temp;
		temp='';
	temp = J_flight_date_2.value.substr(0,8);
	if ( temp !='') 
		J_hotel_in_date_2.value = temp;
		temp='';
	temp = J_flight_date_3.value.substr(0,8);
	if ( temp !='') 
		J_hotel_out_date_2.value = temp;
		temp='';
	temp = J_flight_date_3.value.substr(0,8);
	if ( temp !='') 
		J_hotel_in_date_3.value = temp;
		temp='';
	temp = J_flight_date_4.value.substr(0,8);
	if ( temp !='') 
		J_hotel_out_date_3.value = temp;
		temp='';
	//alert(J_flight_date_1.value.substr(0,8));
	}
	
function CheckFieldForm()
		{
		var FieldsVal= new Array() ;
		FieldsVal[0] = document.requestForm.First_Name1;
		FieldsVal[1] = document.requestForm.Last_Name1;
		FieldsVal[2] = document.requestForm.email;
				
		
		var x=0; 
		for (x=0; x<10; x++) 
			{
			if (FieldsVal[x])
			if (FieldsVal[x].value=='' || 
				(x==2 && FieldsVal[x].value.search("@") == -1) ||
				(x==5 &&FieldsVal[4].value != FieldsVal[5].value)	)
				{
				alert('Some Fields Can Not Be Left Empty or they are Not Valid\n\nMissing field are in Red color\n');
				FieldsVal[x].focus();
				FieldsVal[x].className='Redinput';
				//document.mainForm.action ='insert.php';
				return false;
				}
			else
				{
				FieldsVal[x].className='';
				}
			}
		
		return document.requestForm.submit();
		}
function disableEnterKey() 
{ 
if (window.event.keyCode == 13) window.event.keyCode = 0; 
} 

	  function ShowTr(TrId,Do_what)
	  	{
		var Show =document.getElementById(TrId);
		
		Show.style.display = (Do_what=='show') ? '' :'none';
			
		}
		
function RoundTrip(RowNum)
	{
	var oldDepart = document.getElementById('departure_code_'+RowNum);
	var oldDepart_edit = document.getElementById('departure_code_'+RowNum+'_edit');
	var newDepart = document.getElementById('departure_code_'+(RowNum+1));
	var newDepart_edit = document.getElementById('departure_code_'+(RowNum+1)+'_edit');
	
	var oldArrival = document.getElementById('arrival_code_'+RowNum);
	var oldArrival_edit = document.getElementById('arrival_code_'+RowNum+'_edit');
	var newArrival = document.getElementById('arrival_code_'+(RowNum+1));
	var newArrival_edit = document.getElementById('arrival_code_'+(RowNum+1)+'_edit');
	
	newDepart.value=oldArrival.value;
	newDepart_edit.value=oldArrival_edit.value;
	
	newArrival.value=oldDepart.value;
	newArrival_edit.value=oldDepart_edit.value;
	
	}
			
//-->
