YAHOO.namespace("example.calendar");


function changeAll() {change('tab_1','norm_tab');change('tab_2','norm_tab');change('tab_3','norm_tab');change('tab_4','norm_tab');change('tab_5','norm_tab');change('tab_6','norm_tab');}


function hideAll() {}


function flip(idLayer){
	hideAll();
	if (idLayer=='1' || idLayer=='hotel' ){ searchType = "hotel";show('hotel_frame');changeAll();change('tab_1','active_tab');}
	if (idLayer=='2' || idLayer=='air'){ searchType = "air";show('air_frame');changeAll();change('tab_2','active_tab');}
	if (idLayer=='3' || idLayer=='customtrip'){searchType = "airHotel";show('airHotel_frame');changeAll();change('tab_3','active_tab');}
	if (idLayer=='4' || idLayer=='car'){searchType = "car";show('car_frame');changeAll();change('tab_4','active_tab');}
	if (idLayer=='5' || idLayer=='lmd'){searchType = "lmd";show('lmd_frame');changeAll();change('tab_5','active_tab');}
	if (idLayer=='6' || idLayer=='activities'){searchType = "attractions";show('attractions_frame');changeAll();change('tab_6','active_tab');}
}


function go() {

       var destination = document.CarSearch.puwhere.value;

       var re = new RegExp('CarRequest');
       var m = re.exec(destination);
       if (m != null)
       {

               top.location.href = destination;
       } else {
               return false;
       }
}







	  var searchType= "hotel";
      var hotelDoaCal;
      var hotelDodCal;
      var htlCalArray = new Array(); 
             
    function hotelInitCal()
        {
            /*airDoaCal = new WCT.calendar("airDoa","airCal1Container","airCalendarBoxArrive",document.forms["AirSearch"].chk_in,"DOA");            
            airDodCal = new WCT.calendar("airDod","airCal2Container","airCalendarBoxDepart",document.forms["AirSearch"].chk_out,"doD");*/
		
            hotelDoaCal = new WCT.calendar("hotelDoa","hotelCal1Container","hotelCalendarBoxArrive",document.forms["HotelSearch"].chk_in,"DOA");            
            hotelDodCal = new WCT.calendar("hotelDod","hotelCal2Container","hotelCalendarBoxDepart",document.forms["HotelSearch"].chk_out,"doD");
            hotelDoaCal.addLinkedCal(hotelDodCal);
            hotelDodCal.addLinkedCal(hotelDoaCal);     
			                                
            htlCalArray.push(hotelDoaCal);
            htlCalArray.push(hotelDodCal);
       }
  
     function htlSplitDate()
     {
      hotelDoaCal.returnSelectedDate("doa_yy","doa_mm","doa_dd");
      hotelDodCal.returnSelectedDate("dod_yy","dod_mm","dod_dd");
	 }
	
	function getCT_XStyle() {
			var bkImg = null;
			var x=document.getElementById('ad_link');
			try
			{
				if (window.getComputedStyle  ) {
					var cStyle = window.getComputedStyle(x, "");
					bkImg = cStyle.getPropertyValue("background-image");
				}
				else
				{
					bkImg = x.currentStyle.backgroundImage;
				} 	
			
				if(bkImg.match("save220.gif"))
				{
					document.getElementById("ct_info_link").style.display = 'block';
				}
			}
			catch(e){}
	}
	

