var walDebug = false ; var category = new Array('Eco', 'Budget', 'Lux'); var categoryPrice = new Array(new Array(-1, -1), new Array(0, 1500)); var priceRange = 0; var mealplan = new Array('None', 'Breakfast', 'Half', 'Full'); var meal = 0; var correlationId = 0; var expectedCorrelationId = 0; function replaceImageHolder(iUrl){ var theImgNode = document.getElementById("hotelImageThumbNode"); theImgNode.src = iUrl; } var service = new Array(0, 0, 0, 0, 0, 0); // function called when the page has been loaded to initialize the map function initialize() { if (GBrowserIsCompatible()) { hotelMap = new HotelsMapSearch("mapDiv"); hotelMap.initMap(); hotelMap.selectAndFocusSearch(); } } function keyDown(event) { if (event.keyCode == 13) { hotelMap.search(); } } function showFirstTimersTip() { if (dialog != null) { dialog.show(); } } function gup2(iUrl, name) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( iUrl ); if( results == null ) return ""; else { oStr = results[1].replace(/%20/g, " "); //alert("Returning : " + oStr); return oStr; } } function showHotelDetailedInfo(iUrl) { loadHotelDetailedInfo(iUrl); dialog2.show(); } function performChainRestrictedSearch(iValue) { //alert(iValue); if(iValue.length == 2 || iValue.length == 0){ //alert("Chain correct length"); hotelMap.downloadHotels(); } } function advancedPrice() { if(walDebug) GLog.write(">>> advancedPrice "); var price = document.getElementById('price'); if (priceRange == 0) { advanced("slider_cover"); price.style.color = '#2873BF'; } priceRange++; if (priceRange == categoryPrice.length) { priceRange = 0; advanced("slider_cover"); price.style.color = '#FFFFFF'; } MIN = categoryPrice[priceRange][0]; MAX = categoryPrice[priceRange][1]; updateUI(); hotelMap.downloadHotels(); if(walDebug) GLog.write("<<< advancedPrice "); } var svcs = [ [ 'service_R', 0 ], [ 'service_W', 1 ], [ 'service_I', 2 ], [ 'service_P', 3 ], [ 'service_S', 4 ], [ 'service_A', 5 ] ]; function advancedService(func) { if(walDebug) GLog.write(">>> advancedService "+func); for(var i=0; i>> updateService " + index); service[index] = (service[index] == 0)? 1:0; if(walDebug) GLog.write("service[" + index+"]="+service[index]); var as = document.getElementById("adv_" + func); if (as == null) { var div = document.getElementById("adv_search"); var img = document.createElement("img"); img.setAttribute("id", "adv_" + func); img.setAttribute("src", "images/metal/advanced/advanced_" + func + ".png"); img.style.position = "absolute"; img.style.left = "10px"; img.style.top = "60px"; img.style.width = "210px"; img.style.height = "190px"; img.style.zIndex = "1"; img.style.visibility = (service[index] == 1)? "visible" : "hidden"; div.appendChild(img); fixPng(); return; } as.style.visibility = (service[index] == 1)? "visible" : "hidden"; if(walDebug) GLog.write("<<< updateService " + index); } function changeMealPlan(value) { if(walDebug) GLog.write(">>> changeMealPlan " + value); if (meal + value > -1 && meal + value < mealplan.length) { meal = meal + value; } document.getElementById('mealplan').innerHTML = mealplan[meal]; if(walDebug) GLog.write("<<< changeMealPlan " + value); } function changeCount(cellId, count, max) { if(walDebug) GLog.write(">>> changeCount " + count + " "+ value); var cur = parseInt(document.getElementById(cellId).innerHTML); cur = cur + count; if (cur > 0 && cur < max) { document.getElementById(cellId).innerHTML = cur; } if(walDebug) GLog.write("<<< changeCount " + count + " "+ value); } function book(chainCode, propertyId, name, rating) { var url = "displayProperty.action?chainCode=" + chainCode + "&propertyId=" + propertyId + "&Rating=" + rating + "&startDate=" + document.getElementById("checkInDate").value + "&endDate=" + document.getElementById("checkOutDate").value + "&adultCount=2" + "&childCount=0"; var width = 750; var height = 665; var left = (screen.width/2)-(width/2); var top = (screen.height/2)-(height/2); var popup = window.open(url, 'help', 'scrollbars=yes,menubar=0,resizable=1,location=0,toolbar=0,titlebar=0,width=' + width + ',height=' + height + ',top=' + top + ',left=' + left); popup.focus(); } var windowWidth = 0, windowHeight = 0; function resize() { if (typeof(window.innerWidth) == 'number') { //Non-IE windowWidth = window.innerWidth; windowHeight = window.innerHeight; } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) { //IE 6+ in 'standards compliant mode' windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) { //IE 4 compatible windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } if (windowWidth < 1006) { windowWidth = 1006; } document.getElementById('aboutCover').style.left = windowWidth - 503 + "px"; document.getElementById("bannerTable").width = windowWidth + "px"; var banner = document.getElementById("centerBanner"); var centerCell = document.getElementById("centerCell"); centerCell.removeChild(banner); centerCell.innerHTML = ''; var navBase = windowWidth - 180; document.getElementById('navImg').style.left = navBase + "px"; document.getElementById('navImgGif').style.left = navBase + "px"; document.getElementById('mapDiv').style.width = windowWidth + "px"; if (windowHeight < 650) { windowHeight = 650; } var hotelsBase = windowHeight - 410; document.getElementById('hotelsImage').style.top = hotelsBase + "px"; document.getElementById('hotelsTable').style.top = hotelsBase + 25 + "px"; document.getElementById('stats').style.top = hotelsBase + 315 + "px"; var navBase = windowHeight - 122; document.getElementById('navImg').style.top = navBase + "px"; document.getElementById('navImgGif').style.top = navBase + "px"; document.getElementById('mapDiv').style.height = windowHeight - 15 + "px"; fixPng(); } var browser = navigator.appName; var version = 1; if (browser == "Microsoft Internet Explorer") { var b_version = navigator.appVersion.split("MSIE") version = parseFloat(b_version[1]); } var hotelMap = null; google.load("maps", "2.x"); google.setOnLoadCallback(initialize);