//was in head tag  before the other scripts
function setEngType(val){
	document.forms["form1"].pkgType.value = val;
	document.forms["ResPkgSearchForm"].pkgType.value = val;
    //alert (document.forms["form1"].pkgType.value) ;
	document.forms["ResPkgSearchForm"].elements["engineType"].value=val;
	if (val=="H"){
  		document.getElementById("h").style.backgroundColor='#fae69f';
		document.getElementById("f").style.backgroundColor='';
		document.getElementById("a").style.backgroundColor='';
		document.getElementById("c").style.backgroundColor='';
		
		document.getElementById("hotelDisplay").style.display="block";
		document.getElementById("activityDisplay").style.display="none";
		document.getElementById("airDisplay").style.display="none";
		document.getElementById("carDisplay").style.display="none";		
		document.forms["form1"].H_Loc.value="";
		document.forms["form1"].elements["H_cmbNoOfRooms"].value="1";
		showRooms(1);
		document.forms["form1"].elements["H_nights"].value="1";
		document.forms["form1"].elements["hid_H_Loc"].value="";
		document.forms["form1"].elements["hid_A_Loc"].value="";
		document.forms["form1"].elements["hid_car_Loc"].value="";
		document.forms["form1"].elements["hid_air_Loc"].value="";
		document.forms["form1"].elements["hid_car_Loc1"].value="";
		document.forms["form1"].elements["hid_air_Loc1"].value="";
		
		document.getElementById("adult_act").innerHTML="";
		document.getElementById("adult_hot").innerHTML=buildOcc();
		
		
	}else if (val=="A"){
		document.getElementById("a").style.backgroundColor='#fae69f';
		document.getElementById("h").style.backgroundColor='';
		document.getElementById("f").style.backgroundColor='';
		document.getElementById("c").style.backgroundColor='';
		
		document.getElementById("hotelDisplay").style.display="none";
		document.getElementById("airDisplay").style.display="none";
		document.getElementById("activityDisplay").style.display="block";
		document.getElementById("carDisplay").style.display="none";
		document.forms["form1"].activity_Loc.value="";
		document.forms["form1"].elements["activity_nights"].value="1";
		document.forms["form1"].elements["Act_type"].value="0";
		document.forms["form1"].elements["hid_H_Loc"].value="";
		document.forms["form1"].elements["hid_A_Loc"].value="";
		document.forms["form1"].elements["hid_car_Loc"].value="";
		document.forms["form1"].elements["hid_air_Loc"].value="";
		document.forms["form1"].elements["hid_car_Loc1"].value="";
		document.forms["form1"].elements["hid_air_Loc1"].value="";
			
		document.getElementById("adult_hot").innerHTML="";
		document.getElementById("adult_act").innerHTML=buildOcc_act();			
		
	}else if (val=="F"){
		document.getElementById("f").style.backgroundColor='#fae69f';
		document.getElementById("h").style.backgroundColor='';
		document.getElementById("a").style.backgroundColor='';
		document.getElementById("c").style.backgroundColor='';
		
		document.getElementById("hotelDisplay").style.display="none";
		document.getElementById("activityDisplay").style.display="none";
		document.getElementById("airDisplay").style.display="block";
		document.getElementById("carDisplay").style.display="none";
		document.forms["form1"].air_Loc.value="";
		document.forms["form1"].air_Loc1.value="";
		document.forms["form1"].Air_RetTime.value="00:00:00";
		document.forms["form1"].Air_DepTime.value="00:00:00";
		document.forms["form1"].Air_cmbNoOfAdults.value="1";
		document.forms["form1"].elements["Air_FlightClass"][0].checked="";
		document.forms["form1"].elements["Air_FlightClass"][1].checked="";
		document.forms["form1"].elements["Air_FlightClass"][2].checked="1";
		document.forms["form1"].Air_cmbNoOfSeniors.value="0";
		document.forms["form1"].Air_cmbNoOfChildren.value="0";
		document.forms["form1"].Air_cmbNoOfInfants.value="0";

		document.forms["form1"].elements["hid_H_Loc"].value="";
		document.forms["form1"].elements["hid_A_Loc"].value="";
		document.forms["form1"].elements["hid_car_Loc"].value="";
		document.forms["form1"].elements["hid_air_Loc"].value="";
		document.forms["form1"].elements["hid_car_Loc1"].value="";
		document.forms["form1"].elements["hid_air_Loc1"].value="";		
		
		document.getElementById("adult_hot").innerHTML=buildOcc();
		
	}else if (val=="C"){
  		document.getElementById("h").style.backgroundColor='';
		document.getElementById("f").style.backgroundColor='';
		document.getElementById("a").style.backgroundColor='';
		document.getElementById("c").style.backgroundColor='#fae69f';
			
		document.getElementById("hotelDisplay").style.display="none";
		document.getElementById("activityDisplay").style.display="none";
		document.getElementById("airDisplay").style.display="none";
		document.getElementById("carDisplay").style.display="block";
		document.forms["form1"].car_Loc.value="";
		document.forms["form1"].car_Loc1.value="";
		document.forms["form1"]._CarType.value="ALL";
		document.forms["form1"].PickTime.value="00:00:00";
		document.forms["form1"].ReturnTime.value="00:00:00";		
		document.forms["form1"].elements["_ReturnCar"].checked="";
		document.forms["form1"].elements["hid_H_Loc"].value="";
		document.forms["form1"].elements["hid_A_Loc"].value="";
		document.forms["form1"].elements["hid_car_Loc"].value="";
		document.forms["form1"].elements["hid_air_Loc"].value="";
		document.forms["form1"].elements["hid_car_Loc1"].value="";
		document.forms["form1"].elements["hid_air_Loc1"].value="";		
		document.getElementById("adult_hot").innerHTML=buildOcc();
	}
}
function search(){
	document.forms["ResPkgSearchForm"].elements["pkgType"].value=document.forms["form1"].pkgType.value;
	//alert("XXX" + document.forms["form1"].pkgType.value); 
	eval("loadDataNew_"+document.forms["form1"].pkgType.value+"()");

}

