var seType = "City" // search box specific type var defCountry = "United States" // default Country var defCity = "byron bay" // default City var showSub = true var langCode = "EN" var affID = 46360 // affiliate ID var tid = 4163 // template ID var isB2B = true // is b2b var disabled = 1 var tabBitMask = 111 //set current date var curDay = 31 var curMonth = 6 var curYear = 2010 var wkdArray = new Array('Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat') var arrShortDay = new Array('Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa') var arrMonth = new Array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec') var monthArray = arrMonth var dateMask = 'd|m|y|-' var Common_Scripts_TravelDates_VldCheckIn = 'Please select a valid Check-in Date.' var Common_Scripts_TravelDates_CheckInPast = 'The Check-in Date you have selected is in the past.' var Common_Scripts_TravelDates_VldCheckOut = 'Please select a valid Check-out Date.' var Common_Scripts_TravelDates_StayTooLong = 'Your period of stay should be not longer than 25 nights.\n\nIf you wish to book for more than 25 nights, please send us an e-mail with your request.' var Common_Scripts_TravelDates_OutAfterIn = 'Please ensure that the Check-out Date is after the Check-in Date.' var Common_Scripts_TravelDates_SelectDates = 'Please select your Travel Dates.' /* requires initialisation of the following variables: curDay, curMonth (0-11), curYear short month name array arrMonth requires setting dates cookie as below BEFORE instantializing the TravDates object: SetDatesCookie(30, 12, 1899, 30, 12, 1899) */ if (typeof(dateMask) == "undefined") dateMask = "d|m|y|-" if (typeof(wkdArray) == "undefined") var wkdArray = new Array("Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat") // TRAVEL DATES OBJECT START //travel dates object constructor function TravDates(inYCtl, inMCtl, inDCtl, inDayCtl, outYCtl, outMCtl, outDCtl, outDayCtl, lenStayID, startBlank, numYears) { if (numYears == null) numYears = 3 //default number of years for the calendar //properties this.inYCtl = inYCtl this.inMCtl = inMCtl this.inDCtl = inDCtl this.inDayCtl = inDayCtl this.outYCtl = outYCtl this.outMCtl = outMCtl this.outDCtl = outDCtl this.outDayCtl = outDayCtl this.lenStayID = lenStayID //methods this.SetDef = SetDefDates this.Validate = ValidateDates this.GetDate = GetSelDate this.SetDate = SetSelDate this.SetLenStay = SetLenStay this.SetDaysOfWeek = SetDay this.resetDate = ResetDate //populate select boxes if (startBlank) { var presOpt = 0 } else { var presOpt = -1 } populateDay(inDCtl, presOpt) populateMonth(inMCtl, presOpt) populateYear(inYCtl, presOpt, numYears) populateDay(outDCtl, presOpt) populateMonth(outMCtl, presOpt) populateYear(outYCtl, presOpt, numYears) //set default values this.SetDef(startBlank) //instatialise calendar object if (!document.layers) { cal = new Calendar(numYears, SetCalDate) window.onfocus = new Function("if (cal.win) cal.win.close()") } //populate day select box function populateDay(ctl, presOpt) { clearSelect(ctl, presOpt) var newOpt for (var i = 1 + presOpt; i < 32 + presOpt; i++) { newOpt = i - presOpt ctl[i] = new Option(newOpt, newOpt) } } //populate month select box function populateMonth(ctl, presOpt) { clearSelect(ctl, presOpt) for (var i = 1 + presOpt; i < 13 + presOpt; i++) ctl[i] = new Option(arrMonth[i-1-presOpt], i-presOpt) } //populate year select box function populateYear(ctl, presOpt, numYears) { clearSelect(ctl, presOpt) var newOpt for (var i = 1 + presOpt; i <= numYears + presOpt; i++) { newOpt = i + curYear - 1 - presOpt ctl[i] = new Option(newOpt, newOpt) } } //clear options of select control function clearSelect(ctl, presOpt) { for (var i = ctl.options.length - 1; i > presOpt; i--) ctl.options[i] = null } } //set default dates function SetDefDates(startBlank) { var defInD, defInM, defInY, defOutD, defOutM, defOutY if ( GetQSVal("inDay") != "" && GetQSVal("inMonth") != "" && GetQSVal("inYear") != "" && GetQSVal("outDay") != "" && GetQSVal("outMonth") != "" && GetQSVal("outYear") != "" ) { //if all dates were passed in querystring defInD = GetQSVal("inDay") defInM = GetQSVal("inMonth") defInY = GetQSVal("inYear") defOutD = GetQSVal("outDay") defOutM = GetQSVal("outMonth") defOutY = GetQSVal("outYear") } else if (GetQSVal("Checkin") != "" && GetQSVal("Checkout") != "") { //if all dates were passed in querystring var dateParts = GetQSVal("Checkin").split("-") defInD = dateParts[2] defInM = dateParts[1] defInY = dateParts[0] dateParts = GetQSVal("Checkout").split("-") defOutD = dateParts[2] defOutM = dateParts[1] defOutY = dateParts[0] } else { //extract dates from cookie var oSECookie = GetDatesCookie() if (oSECookie.inDate == "") { //there are no dates in cookie if (!startBlank) { //set default dates as follows: var defInDate = new Date(curYear, curMonth, curDay + 17) var defOutDate = new Date(curYear, curMonth, curDay + 19) defInD = defInDate.getDate() defInM = defInDate.getMonth() + 1 defInY = defInDate.getFullYear() defOutD = defOutDate.getDate() defOutM = defOutDate.getMonth() + 1 defOutY = defOutDate.getFullYear() } } else { //get defaults from cookie //var inDArray = oSECookie.inDate.split("-") //var outDArray = oSECookie.outDate.split("-") var inDArray; var outDArray; if (oSECookie.inDate.indexOf("/") > 0) { inDArray = oSECookie.inDate.split("/") outDArray = oSECookie.outDate.split("/") } else { inDArray = oSECookie.inDate.split("-") outDArray = oSECookie.outDate.split("-") } defInY = inDArray[0] defInM = inDArray[1] defInD = inDArray[2] defOutY = outDArray[0] defOutM = outDArray[1] defOutD = outDArray[2] } } //set dates if (!isNaN(defInD)) { this.SetDate(defInY, defInM, defInD, "in") this.SetDate(defOutY, defOutM, defOutD, "out") } } //validate dates and save them to cookie function ValidateDates() { //check that both dates are selected if (SelEmpty(this.inDCtl) || SelEmpty(this.inMCtl) || SelEmpty(this.inYCtl) || SelEmpty(this.outDCtl) || SelEmpty(this.outMCtl) || SelEmpty(this.outYCtl)) { return false } var checkinDate = this.GetDate("in") var checkoutDate = this.GetDate("out") //validate checkin date if (!validDate(checkinDate, this.inDCtl)) { if (typeof (Common_Scripts_TravelDates_VldCheckIn) == "undefined") Common_Scripts_TravelDates_VldCheckIn = "Please select a valid Check-in Date." alert(Common_Scripts_TravelDates_VldCheckIn) this.inDCtl.focus() return false } var curDate = new Date(curYear, curMonth, curDay) if (checkinDate - curDate < 0) { if (typeof (Common_Scripts_TravelDates_CheckInPast) == "undefined") Common_Scripts_TravelDates_CheckInPast = "The Check-in Date you have selected is in the past." alert(Common_Scripts_TravelDates_CheckInPast) this.inDCtl.focus() return false } //validate checkout date if (!validDate(checkoutDate, this.outDCtl)) { if (typeof (Common_Scripts_TravelDates_VldCheckOut) == "undefined") Common_Scripts_TravelDates_VldCheckOut = "Please select a valid Check-out Date." alert(Common_Scripts_TravelDates_VldCheckOut) this.outDCtl.focus() return false } //validate checkin - checkout difference if (checkoutDate - checkinDate > 2160000000) { //25 days in milliseconds if (typeof (Common_Scripts_TravelDates_StayTooLong) == "undefined") Common_Scripts_TravelDates_StayTooLong = "Your period of stay should be not longer than 25 nights.\n\nIf you wish to book for more than 25 nights, please send us an e-mail with your request." alert(Common_Scripts_TravelDates_StayTooLong) this.outDCtl.focus() return false } if (checkoutDate - checkinDate <= 0) { if (typeof (Common_Scripts_TravelDates_OutAfterIn) == "undefined") Common_Scripts_TravelDates_OutAfterIn = "Please ensure that the Check-out Date is after the Check-in Date." alert(Common_Scripts_TravelDates_OutAfterIn) this.outDCtl.focus() return false } //save dates to cookie SetDatesCookie(GetSelVal(this.inDCtl), GetSelVal(this.inMCtl), GetSelVal(this.inYCtl), GetSelVal(this.outDCtl), GetSelVal(this.outMCtl), GetSelVal(this.outYCtl)) return true //check that date select box has a not empty selection function SelEmpty(ctl) { if (GetSelVal(ctl) == "") { if (typeof (Common_Scripts_TravelDates_SelectDates) == "undefined") Common_Scripts_TravelDates_SelectDates = "Please select your Travel Dates." alert(Common_Scripts_TravelDates_SelectDates) ctl.focus() return true } return false } } //get date selected in dropdown boxes function GetSelDate(inOut) { var y = GetSelVal(eval("this." + inOut + "YCtl")) var m = GetSelVal(eval("this." + inOut + "MCtl")) var d = GetSelVal(eval("this." + inOut + "DCtl")) if (y == "" || m == "" || d == "") { return new Date() } else { return new Date(y, m - 1, d) } } //set date into dropdown boxes (month 1 to 12) function SetSelDate(year, month, day, inOut, bDoReset) { if (bDoReset == null) bDoReset = true SetSelVal(eval("this." + inOut + "YCtl"), Number(year)) SetSelVal(eval("this." + inOut + "MCtl"), Number(month)) SetSelVal(eval("this." + inOut + "DCtl"), Number(day)) if (bDoReset) { //reset the other date if (inOut == "in") this.resetDate("out") else this.resetDate("in") } } //set days of the week function SetDay() { if (this.inDayCtl != null) this.inDayCtl.value = "[" + wkdArray[this.GetDate("in").getDay()] + "]" if (this.outDayCtl != null) this.outDayCtl.value = "[" + wkdArray[this.GetDate("out").getDay()] + "]" } //set length of stay function SetLenStay() { if (this.lenStayID != null) { if (document.all) var stay = document.all[this.lenStayID] else if (document.getElementById) var stay = document.getElementById(this.lenStayID) if (stay) // Ask Eugene, for backwards affiliate capabilities stay.innerHTML = Math.round((this.GetDate("out") - this.GetDate("in")) / 86400000) + " " } //set days of the week this.SetDaysOfWeek() } //reset out date to (in date + 2) if out date <= in date AND reset in date to (out date - 1) if in date >= out date function ResetDate(InOut) { var checkinDate = this.GetDate("in") var checkoutDate = this.GetDate("out") var checkDate, incremet if (InOut == "in") { checkDate = checkoutDate incremet = -1 } else { checkDate = checkinDate incremet = 2 } if (checkinDate >= checkoutDate) { var newDate = new Date(checkDate.getFullYear(), checkDate.getMonth(), checkDate.getDate() + incremet) this.SetDate(newDate.getFullYear(), newDate.getMonth() + 1, newDate.getDate(), InOut, false) } //set length of stay this.SetLenStay() } // TRAVEL DATES OBJECT END //save dates to cookie function SetDatesCookie(inD, inM, inY, outD, outM, outY) { var oSECookie = GetDatesCookie() if (isNaN(inD) || isNaN(inM) || isNaN(inY) || isNaN(outD) || isNaN(outM) || isNaN(outY)) { oSECookie.inDate = "" oSECookie.outDate = "" } else { oSECookie.inDate = inY + "-" + inM + "-" + inD oSECookie.outDate = outY + "-" + outM + "-" + outD } document.cookie = escape("|SearchEng|") + "=" + escape("|" + oSECookie.country + "|" + oSECookie.city + "|" + oSECookie.suburb + "|" + oSECookie.inDate + "|" + oSECookie.outDate + "|") + ";path=/" } //returns object containing search engine cookie elements function GetDatesCookie() { var oSECookie = new Object() oSECookie.country = "" oSECookie.city = "" oSECookie.suburb = "" oSECookie.inDate = "" oSECookie.outDate = "" var cookieArray = URLDecode(document.cookie).split("|") for (var i = 0; i < cookieArray.length; i++) { if (cookieArray[i] == "SearchEng") { if (typeof (cookieArray[i + 2]) != "undefined") oSECookie.country = cookieArray[i + 2] if (typeof (cookieArray[i + 3]) != "undefined") oSECookie.city = cookieArray[i + 3] if (typeof (cookieArray[i + 4]) != "undefined") oSECookie.suburb = cookieArray[i + 4] if (typeof (cookieArray[i + 5]) != "undefined") oSECookie.inDate = cookieArray[i + 5].replace("/", "-").replace("/", "-") if (typeof (cookieArray[i + 6]) != "undefined") oSECookie.outDate = cookieArray[i + 6].replace("/", "-").replace("/", "-") break } } return oSECookie } //to include this library the following variables should be initialized: //affID, langCode, seType var lastCity = -1 //index of last selected city //initialise search engine function initSearchEng() { frm = document.searchEngine if (typeof(isB2B) != "undefined") { frmAction = new String(frm.action) if (isB2B) { rExp = /http:\/\/www/gi; frm.action = frmAction.replace(rExp, "http://b2b") } else { rExp = /http:\/\/b2b/gi; frm.action = frmAction.replace(rExp, "http://www") } } //initialise dates tDates = new TravDates(frm.inYear, frm.inMonth, frm.inDay, frm.SetInDay, frm.outYear, frm.outMonth, frm.outDay, frm.SetOutDay, "lenStay", false, null) langRow = false if (typeof(langCode) == "undefined") langCode = "EN" if (typeof(tabBitMask) == "undefined") tabBitMask = 111 if (typeof(showSub) == "undefined") showSub = true frm.affid.value = affID if (typeof(tid) != "undefined") frm.tid.value = tid sourceVal = "" targetCtl = "" if (typeof(sLoading) == "undefined") sLoading = 'loading...' if (typeof(sAllLocations) == "undefined") sAllLocations = 'All Locations' if (typeof(sHotelLength) == "undefined") sHotelLength = 'Hotel Name should be at least 3 characters long.' if (typeof(sSelectStar) == "undefined") sSelectStar = 'Please select at least one star rating.' if (typeof(sBadChar) == "undefined") sBadChar = 'Please complete this field using English characters.' arrLoading = new Array("", sLoading) //"loading... " arrData = new Array() arrData["country"] = new Array() arrData["city"] = new Array() arrData["suburb"] = new Array() //set default locations if (typeof(defCountry) == "undefined") defCountry = "" if (typeof(defCity) == "undefined") defCity = "" if (typeof(defSuburb) == "undefined") defSuburb = "" //overwrite default country, city and suburb from cookie, if they are presen there var oSECookie = GetDatesCookie() // populate country and city spans with translated values if ((seType == 'Country') || (seType == 'City')) { //initially fill with english values while loading if (document.all) document.all("sd_v1").innerHTML = defCountry else if (document.getElementById) document.getElementById("sd_v1").innerHTML = defCountry frm.country.value = defCountry if (langCode != 'EN') getLangRow("AffSearchEngineGetCountryLang", defCountry) if (seType == 'City') { if (document.all) document.all("sd_d2").innerHTML = defCity else if (document.getElementById) document.getElementById("sd_d2").innerHTML = defCity frm.city.value = defCity if (langCode != 'EN') getLangRow("AffSearchEngineGetCityLang", defCity) } } fillCountryCitySuburb() frm.searchBy.value = "Criteria" if (typeof(ShowActiveElement) != "undefined") { if (ShowActiveElement == 'Map') SwapSearch('sn', 'sm') else if (ShowActiveElement == 'HotelName') SwapSearch('sd', 'sn') } } //fill the spans with default country and city translated values function fillSpan(type) { if (type == 'Country') id = "sd_v1" else if (type == 'City') id = "sd_d2" if (document.all) document.all(id).innerHTML = arrData[type] else if (document.getElementById) document.getElementById(id).innerHTML = arrData[type] } //fill country, city and suburb select boxes where appropriate function fillCountryCitySuburb() { //wait untill remote script object isnt busy if (objRS.busy) { setTimeout("fillCountryCitySuburb()", 100) return } if (seType == 'Default') countryFill() else if ((seType == 'Country') || (seType == 'CountryMod')) countryChange(defCountry) else if (seType == 'City' && showSub) cityChange(frm.suburb) } //set select box text function setText(ctl, newText) { for (var i=0; i") else document.write("") } //load container with remote data function getData(func, args) { var d = new Date() var params = "f=" + escape(func) + "&o=" + escape(this.objName) + "&u=" + d.getTime() for (var i=0; i "9" || number.charAt(i) < "0") return true } return false } //adds digit grouping to the number function formatNumber(number) { if (number.toString() == "") { if (typeof (Common_Scripts_FuncLib_OnRequest) == "undefined") Common_Scripts_FuncLib_OnRequest = "On Request" return Common_Scripts_FuncLib_OnRequest } if (number < 0) { var sign = "-" number = -number } else{ var sign = "" } number = number.toString() var tmpNumber = "" var dot = false for (var j=0; j=i; j--) { if (stringToTrim.charAt(j) != " ") break } return stringToTrim.substring(i, j + 1) } //validate email address function notEmail(field, fieldName, msg) { var email = trim(field.value) if (email == "") return false var at = false var dot = false for (var i=0; i 5)) { if (msg == null) msg = "The " + fieldName + " you entered is not a valid e-mail address." alert(msg) field.focus() field.select() return true } //check for invalid characters if (invalidChars(field, "E-mail", '%,;|" <>\\/')) return true return false } //validate ASCII Character Set function charCheck(field, message, toASCIIfield) { if (toASCIIfield == null) var txt = field.value else var txt = ToASCII(field) for (var i=0; i= 128) { alert(message) field.focus() return true } } return false } //checks whether selected option has invalid value and selects option with gotoIndex function checkInvalVal(sel, invalVal, gotoIndex) { if (GetSelVal(sel) == invalVal) sel.selectedIndex = gotoIndex } //date validation function validDate(date, ctlDay) { return date.getDate() == GetSelVal(ctlDay) } //set select box value function SetSelVal(ctl, newVal) { for (var i=0; i maxLen) { if (msg == null) msg = "Please limit " + ctlName + " to " + maxLen + " characters. You have used " + ctlLen + " characters." msg = msg.replace(/\[MaxCharactersAllowed\]/, maxLen) msg = msg.replace(/\[NumOfCharacters\]/, ctlLen) alert(msg) ctl.focus() return true } return false } //open new window function openWnd(url, name, height, width, directories, location, menubar, resizable, scrollbars, status, toolbar) { wnd = window.open(url, name, "alwaysRaised=1,height=" + height + ",width=" + width + ",directories=" + directories + ",locaton=" + location + ",menubar=" + menubar + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",status=" + status + ",toolbar=" + toolbar) wnd.focus() } //Web-1146 function openWndRTG(url, name, height, width,directories, location, menubar, resizable, scrollbars, status, toolbar) { var left = 250 var top = 250 wnd = window.open(url, name, "alwaysRaised=1,height=" + height + ",width=" + width + " ,left=" + left + ",top=" + top + " ,directories=" + directories + ",locaton=" + location + ",menubar=" + menubar + ",resizable=" + resizable + ",scrollbars=" + scrollbars + ",status=" + status + ",toolbar=" + toolbar) wnd.focus() } //unencode url-encoded string function URLDecode(urlStr) { return unescape(urlStr.replace(/\+/g, " ")) } //remove all name/value pairs with the passed name from url-encoded querystring function remQStringName(qString, name) { var i var qStringNew = "" if (qString != "") { var curName var arrNameVal = qString.split("&") for (i in arrNameVal) { curName = URLDecode(arrNameVal[i].split("=")[0]) if (curName.toLowerCase() != name.toLowerCase()) qStringNew += "&" + arrNameVal[i] } } return qStringNew.substr(1) } //replace or add name/value pairs in url-encoded querystring function setQStringName(qString, name, arrVal) { var qStringNew = remQStringName(qString, name) var start = qStringNew == "" ? 1 : 0 for (var i in arrVal) qStringNew += "&" + escape(name) + "=" + escape(arrVal[i]) return qStringNew.substr(start) } //extract (first!) value from querystring for the passed name function GetQSVal(qsName) { var qsPair var qString = location.search.substr(1) var arrNameVal = qString.split("&") for (var i in arrNameVal) { qsPair = arrNameVal[i].split("=") if (URLDecode(qsPair[0]).toLowerCase() == qsName.toLowerCase()) return URLDecode(qsPair[1]) } return "" } //convert character to ASCII function ToASCII(field){ var txt = field.value for (var i = 0; i" break } if (sSheets[i].href != "") docStyles += "" } return docStyles } } //set selected date in the return controls function ReturnDate(year, month, day) { this.returnFunc(year, month + 1, day, this.returnParam) //call the calendar return function window.focus() //hide calendar by moving focus to the main window } //show calendar function ShowCal(posCtl, title, startYear, selDate, returnParam) { //do not show calendar in ie4 if (navigator.appVersion.indexOf("MSIE 4") != -1) return this.title = title //calendar titlebar text this.startYear = startYear //first year in the dropdown box this.selDate = selDate //date selected on the calender this.year = selDate.getFullYear() //current calendar year this.month = selDate.getMonth() //current calendar month this.returnParam = returnParam //extra parameter to pass to the return function //open calendar window var calPos = CalcCalCoord() this.win = window.open("", "", "channelmode=0, directories=0, fullscreen=0, hotkeys=0, left=" + calPos.x + ", location=0, menubar=0, resizable=0, status=0, titlebar=1, toolbar=0, top=" + calPos.y + ", width=141, height=133") //draw calendar this.draw() //calculate screen coordinates of the calendar window function CalcCalCoord() { var coord = new Object() if (typeof(window.screenLeft) == "undefined") { coord.x = screen.width / 2 coord.y = screen.height / 2 } else { var docBody = document.body var posTmp = posCtl coord.x = screenLeft + docBody.clientLeft - docBody.scrollLeft - 1 coord.y = screenTop + docBody.clientTop - docBody.scrollTop + posCtl.offsetHeight + 1 while (posTmp != docBody) { coord.x += posTmp.offsetLeft coord.y += posTmp.offsetTop posTmp = posTmp.offsetParent } if (typeof(blnDisplayFlg) != "undefined") { if ((posCtl == getPageObject("inDay")) || (posCtl == getPageObject("outDay"))) { coord.x += 6 coord.y += 8 } } } return coord } } //reload calendar html function DrawCal(monthShift) { //shift calendar's month and year if monthShift passed if (typeof(monthShift) != "undefined") { //year this.year += Math.floor((this.month + monthShift) / 12) //month this.month = (this.month + monthShift) % 12 if (this.month < 0) this.month += 12 } //get day of the week of the 1st day of the month (0 - sun, 1 - mon, etc) var firstMonthDay = new Date(this.year, this.month, 1).getDay() //get first monday before the 1st day of the month var day = 1 - (firstMonthDay + 6) % 7 //get "previous" and "next" link html var prevLnk = (this.year == this.startYear && this.month == 0) ? "     " : " <<" var nextLnk = (this.year == this.startYear + this.years - 1 && this.month == 11) ? "     " : ">> " //get calender html var calHTML = "" + "" + "" + this.title + "" + this.docStyles + "" + "" + '' + "" + "" + "" + "" + "" + "" + "" + "
" + "" + "" + "" + "" + "" + "" + "
" + prevLnk + "" + GetDropdownHTML(this.startYear, this.years, this.year, this.month) + "" + nextLnk + "
" + "
" + "" + "" + "" + "" + "" + "" + "" + "" + "" + "" var calYear, calMonth, calDay, tdClass, aClass var calDate = new Date(this.year, this.month, day) do { calHTML += "" do { calYear = calDate.getFullYear() calMonth = calDate.getMonth() calDay = calDate.getDate() //get cell and link class names if (calDate.getDay() == 0 || calDate.getDay() == 6) { //weekend aClass = "cal-wend" } else { aClass = "cal-wday" } if (calYear == this.selDate.getFullYear() && calMonth == this.selDate.getMonth() && calDay == this.selDate.getDate() && day > 0) { tdClass = "cal-this" aClass = "cal-lthis" } else if (calMonth == this.month && day > 0) { tdClass = "cal-month" } else { tdClass = "cal-date" } calHTML += "" day++ calDate = new Date(this.year, this.month, day) } while (calDate.getDay() != 1) //1 - monday calHTML += "" } while (calDate.getMonth() == this.month) calHTML += "
" + arrShortDay[1] + "" + arrShortDay[2] + "" + arrShortDay[3] + "" + arrShortDay[4] + "" + arrShortDay[5] + "" + arrShortDay[6] + "" + arrShortDay[0] + "
" + calDay + "
" + "
" + "" + "" //write calender html into the window with (this.win.document) { open() write(calHTML) close() } //set reference inside calendar window to the calendar object in the parent window this.win.oCal = this //get html of the calendar's dropdown function GetDropdownHTML(startYear, years, year, month) { var sMask = GetDropdownDateMask() var loopMonth, loopYear var sName, sValue, sSelected var dropdownHTML = "" return dropdownHTML } //returns date mask for month-year drop-down function GetDropdownDateMask() { var arrMask = dateMask.split("|") var sSeparator = arrMask[3] var sTmpMask = "" for (var i=0; i < arrMask.length-1; i++) { if (arrMask[i].indexOf("d") == -1 ) //do not include day in the mask sTmpMask += arrMask[i] + sSeparator } if (sSeparator != "") sTmpMask = sTmpMask.substring(0, sTmpMask.length - 1) return sTmpMask } } var varSEHTML = '' + '' + '' + '' + '
' + '' + '' + '' + '' + '
Hotel Search
' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + ' ' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
Check in:' + '' + '' + '' + '' + '' + '' + '' + '' + '
' + '  ' + '  
' + '
 Length of stay:
night(s)
Check out:' + '' + '' + '' + '' + '' + '' + '' + '' + '
' + '' + '  ' + '  
' + '
Country: Star rating:
' + '
' + '
' + '' + '' + 'and below' + '
City:' + '
Suburb:
' + '' + '' + '' + '' + '' + '
' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '' + '
' + '' + 'Search by:  ' + ' Destination ' + '' + ' Map ' + '' + ' Hotel name ' + ' 
' + '
' + '
' document.write(varSEHTML) //initialise remote scripting objRS = new remScript("RemScript.htm", rsCallBack) objRS.createContainer() window.onload = initSearchEng