hotelIDs = new Array(); function addHotelID (hotelID) { if (document.cookie.length == 0 || (document.cookie.length != 0 && !document.cookie.indexOf("hotelCompare") != -1)) { document.cookie = "hotelCompare=true"; } hotelIDs[hotelIDs.length]=hotelID; } function removeHotelID(hotelID) { var deleteIndex; var size = hotelIDs.length; for (var i=0; i<=size; i++) { hotelIDs[i] = ((hotelIDs[i] == hotelID) ? deleteIndex=i : hotelIDs[i]); } for (var j=deleteIndex; j 0 || validate == 'false' || document.cookie.indexOf("hotelCompare=true") != -1 ) { completeViewCompareSubmit(action); } else { alert("No hotels have been selected to compare.\nPlease select at least one hotel using the\ncheckbox in the bottom right of each listing\nbefore using the \"view & compare selected\" link.".replace("'","\'")); } } function OpenWindow(file, name, width, height) { OpenWindow(file, name, width, height, false); } function OpenWindow(file, name, width, height, showLeftTopScrollbar) { var attr = ""; if(showLeftTopScrollbar) { attr += "top=50,left=50,scrollbars=1,"; } attr += "width=" + width + ",height=" + height + ",resizeable=1"; window.open(file, name, attr); } function openWin(fileName) { thor = window.open(fileName,'thor','top=200,left=220,width=275,height=450,resizable=1,scrollbars=yes'); } function openWindow(fileName) { thor = window.open(fileName,'thor','top=200,left=220,width=275,height=450,resizable=1,scrollbars=yes'); } function MM_openBrWindow(theURL,winName,features) { //v2.0 window.open(theURL,winName,features); } function displayHotel(){ hotelTable.style.visibility='visible'; hotelTable.style.display='block'; //hotelsImage.style.visibility='visible'; //hotelsImage.style.display='block'; indexSelect.hotel.checked='true'; noCar(); noFlight(); //noRental(); noCruise(); } function displayCar(){ carTable.style.visibility='visible'; carTable.style.display='block'; //carsImage.style.visibility='visible'; //carsImage.style.display='block'; indexSelect.car.checked='true'; noHotel(); noFlight(); //noRental(); noCruise(); } function displayFlight(){ flightTable.style.visibility='visible'; flightTable.style.display='block'; //flightsImage.style.visibility='visible'; //flightsImage.style.display='block'; indexSelect.air.checked='true'; //loadDates(); noCar(); noHotel(); //noRental(); noCruise(); } //function displayRental(){ // rentalTable.style.visibility='visible'; /// rentalTable.style.display='block'; // rentalImage.style.visibility='visible'; // rentalImage.style.display='block'; // indexSelect.rental.checked='true'; // noCar(); // noHotel(); // noFlight(); // //noCruise(); //} function displayCruise(){ noCar(); noHotel(); noFlight(); //noRental(); cruiseTable.style.visibility='visible'; cruiseTable.style.display='block'; //cruisesImage.style.visibility='visible'; //cruisesImage.style.display='block'; indexSelect.cruise.checked='true'; } //function noRental(){ //rentalTable.style.display='block'; //rentalTable.style.display='none'; //rentalTable.style.visibility='hidden'; //rentalImage.style.visibility='hidden'; //rentalImage.style.display='none'; //} function noCar(){ //carTable.style.display='block'; carTable.style.display='none'; carTable.style.visibility='hidden'; //carsImage.style.visibility='hidden'; //carsImage.style.display='none'; } function noFlight(){ //flightTable.style.display='block'; flightTable.style.display='none'; flightTable.style.visibility='hidden'; //flightsImage.style.visibility='hidden'; //flightsImage.style.display='none'; } function noHotel(){ //hotelTable.style.display='block'; hotelTable.style.display='none'; hotelTable.style.visibility='hidden'; //hotelsImage.style.visibility='hidden'; //hotelsImage.style.display='none'; } function noCruise(){ //cruiseTable.style.display='block'; cruiseTable.style.display='none'; cruiseTable.style.visiblity='hidden'; //cruisesImage.style.visibility='hidden'; //cruisesImage.style.display='none'; } function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImages() { if (document.images && (preloadFlag == true)) { for (var i=0; i= 4) { if (navigator.appName == "Netscape") { isNav = true } else { isIE = true } } function showLayer(layername) { if (isNav) { document.layers[layername].visibility = 'visible';} else //Must be IE { document.all[layername].style.visibility = 'visible'; } } function hideLayer(layername) { if (isNav) { document.layers[layername].visibility = 'hidden'; } else //Must be IE {document.all[layername].style.visibility = 'hidden';} } function OpenHTU(file,name,width,height) { attr = "width=350,height=300,resizeable=1"; window.open(file, name, attr); } function openPromoDetails(promo,description) { url = '/popups/hotels/hotPromotion.jsp?promo='; escapedPromo = escape(promo); escapedDescription = escape(description); url = url + escapedPromo + '&description=' + escapedDescription; window.open(url, 'test', 'width=350,height=300,resizable=1'); } function openconvert(file,input) { window.open(file, input, 'width=640,height=215,resizable=1'); } function UpdateCityCode() { document.aForm.pickUpCity.value = document.aForm.cityCode.options[document.aForm.cityCode.selectedIndex].value; } function MapPopup(theURL,winName,features) { // should no longer be used after travelnow release // goes live that includes hcom's maporama maps fileWindow = "/popups/maps/mapPopup.jsp?cmd=Find&HotelLyr=Off&ClickMode=Center"; fileWindow += theURL; window.open(fileWindow,winName,features); } function MapPopup2(theURL,winName,features) { // BEGIN MAPORAMA CODE //fileWindow = "http://172.16.84.51/map/map.jsp?"; // END MAPORAMA CODE // BEGIN IMAP CODE fileWindow = "http://www.travelnow.com/popups/maps/mapPopup.jsp?cmd=Find&HotelLyr=Off&ClickMode=Center"; // END IMAP CODE fileWindow += theURL; window.open(fileWindow,winName,features); } function submitRules() { document.rules.submit(); } function openPromo(file,attributes) { thor = window.open(file,'thor',attributes); } function loadPromo(file) { thor2 = window.open(file,'thor2','top=50,left=50,width=620,height=600,resizable=1,status=1,scrollbars=1'); thor2.blur(); } function showPromo(file) { if (thor2 == undefined){ var thor2; thor2 = window.open(file,'thor2','top=50,left=50,resizable=1,status=1,scrollbars=1'); }else{ if (thor2.closed) { thor2 = window.open(file,'thor2','top=50,left=50,resizable=1,status=1,scrollbars=1'); } else { thor2.focus(); } } } function OpenInfo(file,input) { window.open(file, "PropInfo", 'scrollbars=1,width=520,height=100%,resizable=1'); } function OpenRes(theURL) { window.open(theURL, "RES", 'scrollbars=1,width=800,height=600,resizable=1,status=1'); } function OpenRateRules(file) { window.open(file, 'RateRules', 'width=440,height=100%,resizable=1,scrollbars=1'); } function subpop(s) {//DH added this for new popcal addWindow = window.open(s,"myform","width=270,height=150,resizable=1,status=1,menubar=0,scrollbars=0,fullscreen=0"); addWindow.focus(); } function openphotos(file,input,width,height) { attr = "top=5,left=75,width=" + width + ",height=" + height + ",resizable=1"; window.open(file, input, attr); } //check the system date and set the time in advance if is equal to the same day as booking function checkTime(M,D,Y,obj) { var calendar = new Date(); var date = calendar.getDate(); var month = calendar.getMonth(); var year = calendar.getYear(); var hour = calendar.getHours(); var date2 = D.value; var month2 = M.value; var year2 = Y.value; var newTime; if (obj == document.forms['aForm'].dropOffTime) { hour += 3; }else{ hour += 2; } if (month2 == month && date2 == date && year2 == year){ if (hour == 0){ newTime = '12AM'; }else if (hour == 11){ newTime = '12PM'; }else if(hour < 11){ newTime = hour + 'AM'; }else if(hour > 11){ hour -= 11; newTime = hour + 'PM'; } obj.value=newTime; }else{ obj.value='9AM'; } } function openCondoWindow(file,input) { window.open(file, input,'width=300,height=540,resizable=1'); } function openCancellationPolicy(file,input) { window.open(file, input, 'width=300,height=340, scrollbars = yes'); } function checkDoubleSubmit(frm) { if (frm.frmsubmit.value == "Y" || frm.frmsubmit.value == "TWICE") { frm.frmsubmit.value = "TWICE"; alert("You have already submitted this reservation once. Please click 'OK' to continue. "); return(false); } frm.frmsubmit.value = "Y"; return(true); } function OpenFAQ(file) { window.open(file, 'FAQ', 'width=500,height=300,resizable=1'); } function OpenFAQBig(file) { window.open(file, 'FAQBig', 'width=830,height=630,resizable=1,scrollbars=1'); } function OpenRateRules(file) { window.open(file, 'RateRules', 'width=440,height=480,resizable=1,scrollbars=1'); } function OpenFAQ640(file) { window.open(file, 'FAQ', 'width=660,height=480,resizable=1,scrollbars=1'); } function OpenFAQPopUp(file) { window.open(file, 'FAQ', 'width=500,height=275,resizable=1'); } function editReservePage(fieldToJumpTo) { setCookie('reserveField',fieldToJumpTo) history.back(); } function goToAnchor(reserveField) { window.location.hash=reserveField; } function setCookie(name, value, expires, path, domain, secure) { var curCookie = name + "=" + escape(value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); document.cookie = curCookie; } function getCookie(name) { var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf(prefix); if (begin == -1) return null; var end = document.cookie.indexOf(";", begin); if (end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } function deleteCookie(name) { document.cookie = name + '=false; expires=Fri, 27 Jul 2001 02:47:11 UTC;path=/'; }