var numberOfDaysPerMonthHashTable = {'9,2007' :30, '10,2007' :31, '11,2007' :30, '12,2007' :31, '1,2008' :31, '2,2008' :29, '3,2008' :31, '4,2008' :30, '5,2008' :31, '6,2008' :30, '7,2008' :31, '8,2008' :31, '9,2008' :30}
var ControlID = "ctl00_SSearchBox_";
var ErrorAjax = "Your webbrowser does not seem to be AJAX capable. Please reload the page to try again or upgrade your webbrowser";
var ErrorCallBack = "There is a problem retrieving the City or Hotel list from the server. Please reload the page, use an AJAX compatible webbrowser or report this problem with the feedback form link on the bottom of this page.";
var ErrorPast = "Check-in Date is in the past.\nPlease select a new date.";
var ErrorLater = "Check-out Date must be later than Check-in Date.";
var ErrorDays = "Number of Nights must be between 1 and 120. Maximum Number of Nights allowed is 120.\nFor stays of longer than 120 days, please contact our Customer Service Agents.";
var ErrorCountry = "Please Select a Country.";
var ErrorCity = "Please Select a City.";
var More3Rooms = "If you wish to book more than 3 rooms please contact an Online Agent.";
var AdultChildMax = "The number of adults and children selected must not exceed a total of 4 per room.";
var RoomsMoreGuest = "Searching for rooms that hold 4 guests can reduce the search results. You can now: click OK to continue this search. Click cancel to change your search or contact a customer service agent.";
var ErrorNoArrival = "Please select Arrival date or no dates at all!";
var ErrorNoDepart = "Please select Departure date or no dates at all!";
var WaitText = "Loading"+"...";
var WaitHotel = "Select City first";
var WaitCity = "Select Country first";
var ErrorDate = "Please select a date";
var txtDay = "Day";
var txtMonth = "Month";
var IsSmartSearchResult='False';
var DateDiff = 1;
var DateShift = 2;
var dNow = new Date()
TimeShift();
function TimeShift(){
var dNow = new Date();
if((((dNow.getUTCHours()*60)+dNow.getUTCMinutes()) >= ((10*60)+5)) && ((dNow.getUTCHours()*60) < (17*60))){
DateShift = 3;
}
else{
DateShift = 2;
}
}
ShiftDate();
function ShiftDate()
{
var DateNow = new Date();
var ShiftY = DateNow.getFullYear();
var ShiftM = DateNow.getMonth()+1;
var ShiftD = DateNow.getDate();
if(ShiftY==2007)
{
if(ShiftM==11)
{
if(ShiftD==28){DateShift=DateShift+4;}
else if(ShiftD==29){DateShift=DateShift+3;}
else if(ShiftD==30){DateShift=DateShift+2;}
}
else if(ShiftM==12)
{
if(ShiftD==1){DateShift=DateShift+1;}
else if(ShiftD==2){DateShift=DateShift;}
}
}
}
var jsLang =
{
txtGoCurrentMonth : "Go To Current Month",
txtTodayIs : "Today is",
txtWeek : "Wk",
txtScrollLeftMessage : "Click to scroll to previous month. Hold mouse button to scroll automatically.",
txtDayDisabled : "Can not book this day",
txtSelectYear : "Click to select a year.",
txtSelectMonth : "Click to select a month.",
txtSelectDay: "Click to select this day.",
txtNextYear : "Next Year",
txtNextMonth : "Next Month",
txtPrevYear : "Previous Year",
txtPrevMonth : "Previos Month",
txtClose : "Close Window",
//Messages
txtMsgInvalidDate :"Invalid date!! \n\nUse following format:mm/dd/yyyy",
txtMsgInvalidRange : "Selected date out of valid range!!\n Must be within a year range.",
txtMsgMaxNumerOfNights : "Number of Nights must be between 1 and 120. Maximum Number of Nights allowed is 120.\nFor stays of longer than 120 days, please contact our Customer Service Agents.",
txtMsgCheckindayInPast : "Check-in Date is in the past.\nPlease select a new date."
};
var cal_monthNames = new Array("January","February","March","April","May","June","July","August","September","October","November","December");
var cal_shortDays = new Array("Sun","Mon","Tue","Wed","Thu","Fri","Sat");
var cal_monthOutput = new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");
var cal_cmbMonthFormat = "mmm, yyyy";
var cal_dsplMonthFormat = "mmmm yyyy";
var cal_dsplComboFormat = "month";
var cal_fixedX = -1; // x position (-1 if to appear below control)
var cal_fixedY = -1; // y position (-1 if to appear below control)
var cal_startAt = 0; // 0 - sunday ; 1 - monday
var cal_showWeekNumber = 0; // 0 - don't show; 1 - show
var cal_showToday = 1; // 0 - don't show; 1 - show
var cal_imgDir = "http://temp.passionasia.com/images/"; // directory for images ... e.g. var cal_imgDir="http://temp.passionasia.com/img/"
var cal_enablehistory=false;
var cal_gotoString = jsLang.txtGoCurrentMonth;
var cal_todayString = jsLang.txtTodayIs;
var cal_weekString = jsLang.txtWeek;
var cal_scrollLeftMessage = jsLang.txtPrevMonth;
var cal_scrollRightMessage = jsLang.txtNextMonth;
var cal_selectMonthMessage = jsLang.txtSelectMonth;
var cal_selectYearMessage = jsLang.txtSelectYear;
var cal_crossObj, cal_crossMonthObj, cal_crossYearObj, cal_monthSelected, cal_yearSelected, cal_dateSelected, ocal_monthSelected, ocal_yearSelected, ocal_dateSelected, cal_monthConstructed, cal_yearConstructed, cal_intervalID1, cal_intervalID2
var cal_timeoutID1, cal_timeoutID2, cal_ctlToPlaceValue, cal_ctlNow, cal_dateFormat, cal_nStartingYear;
//Browser checks
var cal_bPageLoaded=false;
var ie=document.all;
var dom=document.getElementById;
var ns4=document.layers;
var cal_today = new Date();
var cal_dateNow = cal_today.getDate();
var cal_monthNow = cal_today.getMonth();
var cal_yearNow = cal_today.getYear();
var oFunctions;
var bShow = false;
if (dom) {
var calwidth=200;
calwidth=425;
document.write("
");
if (cal_showToday==1) {
document.write("
");
}
document.write("
");
}
var cal_monthName = cal_monthNames;
if (cal_startAt==0) {
cal_dayName = cal_shortDays;
}
else {
cal_dayName = new Array(cal_shortDays[1],cal_shortDays[2],cal_shortDays[3],cal_shortDays[4],cal_shortDays[5],cal_shortDays[6],cal_shortDays[0]);
}
/* hides