// JavaScript Document
function flightadd(z,y){
	if(z == 'True'){
		$('#AirParam').show();
		$('#wair').attr('class','Text_Arial12_BlueBold')
		$('#woair').attr('class','Text_Arial12_Blue')
		
	}
	if(z =='False'){
		$('#AirParam').hide();
		$('#wair').attr('class','Text_Arial12_Blue')
		$('#woair').attr('class','Text_Arial12_BlueBold')
		$('#iDepCity').val('US city airport');
	}
}
function showChild(qty){
	for (i=0;i<=2;i++){
		if (i<=qty){
			$('#divChild'+ i +'').show();
		}
		else{
			$('#divChild'+ i +'').hide();
		}
	}
}
function priceIt(){
	var iRet
	myOption = -1;
	for (i=Form1.addFlight.length-1; i > -1; i--){
		if (Form1.addFlight[i].checked){
		myOption = i; i = -1;
		}
	}
	
	p = Form1.addFlight[myOption].value;
	
	if (p == 'True'){
		
		if ($('#iDepCity').val() == -1){
			alert('Please Select a Departure City   ')
			return;
		}
		$('#iRetCity').val($('#iDepCity').val());
		//document.Form1.iRetCity.value = document.Form1.iDepCity.value
	}
	if (p == 'False'){
		$('#iRetCity').val(-1);
		$('#iDepCity').val(-1);
		//document.Form1.iRetCity.value = -1
		//document.Form1.iDepCity.value = -1
	}
	//alert($('#iRetCity').val())
	var sele = $('#InDate1').val()
	if (sele.indexOf('mm/dd/yy') == 0)
	{
		alert('Please Select a Valid Date   ')
		return;
	}
	sele = $('#OutDate1').val()
	if (sele.indexOf('mm/dd/yy') == 0)
	{
		alert('Please Select a Valid Date   ')
		return;
	}
	
	var ziCabin
		ziCabin = $('#Cabin').val(); //document.Form1.Cabin.value // findObj('Cabin').value;
		if (ziCabin=='C' || ziCabin=='F'){
			//findObj('AirVendorAPI').value
			//document.Form1.AirVendorAPI.value = '3|6-7-26-17-53-55';
			$('#Cabin').val('3|6-7-26-17-53-55');
		}
	
	var pckType
	var booProcess = 'javascript:alert("Type Of Packages is not difine");return false;'
	pckType = 'MC' //$('#PackType').val(); //document.Form1.PackType.value
	var pckID
	pckID = $('#Pkgid').val(); //document.Form1.Pkgid.value
	//alert(pckType)
	switch (pckType)
			{
			case 'TP3':
				bookProcess="http://europeandestinations.bookingprocess.com/TVLAPI/TourPackage3/TP_ComponentList.ASP?" + pckID 
			break;
			case 'MC':
				bookProcess="http://europeandestinations.bookingprocess.com/TVLAPI/Multicity3/MC_ComponentList.ASP?" + pckID 
			break;
			}
			
	document.Form1.action=bookProcess
	document.Form1.submit()
	//__utmLinkPost(bookProcess)

 }