// Hotel Search JavaScript 

var searchType= "hotel";
      var hotelDoaCal;
      var hotelDodCal;
      var htlCalArray = new Array(); // store calendar objects for use to show calendar.
             
    function hotelInitCal()
        {
           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){}
	}
	
	
	window.onload = function ()
	{
		getCT_XStyle();
	}