var hotels = new Array("xx", "Sheraton Arlington", "Hilton Arlington", "Hawthorn Suites Arlington", "Fairfield Inn"); var monthWords = new Array('', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'); var prompts = { selectChoice: function(choice) { return 'Please select your ' + choice + '-choice hotel'; }, first: 'first', second: 'second', room: 'ROOM', arrival: 'Expected Arrival', departure: 'Departure', company: 'Company', yes: 'Yes', no: 'No', selectdate: 'Select a date', smoking: 'Smoking Preference', bed: 'Bed Preference', bedking: 'King Bed', beddouble: '2 Double Beds', specialrequests: 'Special Requests', guestprompt: 'Names of guest(s) for this room', rate: 'Room Type', ratesingle: 'Single', ratedouble: 'Double', ratetriple: 'Triple', ratequad: 'Quad', attendeeLabel: 'I am an', attendee: 'Attendee', exhibitor: 'Exhibitor' }; var errorMsg = { choice1: "- select a first hotel choice\n", choice2: "- select a second hotel choice in case your first choice is not available\n", diffChoice: "- select a different hotel for your second choice\n", rates: function(roomNumber){ return "- which rate you need for room " + roomNumber + "\n"; }, guests: function(roomNumber){ return "- provide us with the name(s) of the guest(s) in room " + roomNumber + "\n"; }, dates: function(roomNumber){ return "- select a date other than your arrival date for your departure for room " + roomNumber + "\n"; }, dates2: "- select a departure date after your arrival date\n", contactInfo: "- provide your mailing information, home phone number, and e-mail address\n", altContact: "- provide your business or another phone number in case we need to contact you\n", exhibitInfo: "- identify the exhibiting company that you work for\n", company: "- provide the name of the business where you will be receiving the confirmation\n", bedType: function(roomNumber) { return "- tell us what kind of bed you would like to reserve for room " + roomNumber + "\n"; }, cardType: "- indicate what kind of of credit card you will be using to secure this reservation\n", cardNeeded: "- provide a credit card to secure this reservation\n", cardHolder: "- provide the cardholder's name\n", cardNumber: "- confirm that you entered all the account numbers as they appear on your charge card\n", cardExpired: "- ensure that your credit card is not expired\n", pleaseTxt: "Please:\n" }; var calDate = { startDate: new Date('May 2, 2012'), stopDate: new Date('May 9, 2012'), htmlOptions: function() { var html = ''; for (var i = calDate.startDate.getDate(); i <= calDate.stopDate.getDate(); i++) { var d = new Date(calDate.startDate.getFullYear(), calDate.startDate.getMonth(), i) var dValue = d.getFullYear() + '/' + (d.getMonth() + 1) + '/' + d.getDate(); var dLabel = monthWords[(d.getMonth() + 1)] + ' ' + d.getDate() + ', ' + d.getFullYear(); html += ''; } return html; } }; function showRates(selectId, selectedIndex) { var html = new String(); var hotel = new String(); var area = new String(); area = selectId + "options"; switch ($F(selectId)) { case "Sheraton Arlington": hotel = "sheraton"; break; case "Hilton Arlington": hotel = "hilton"; break; case "Hawthorn Suites Arlington": hotel = "hawthorn"; break; case "Fairfield Inn": hotel = "fairfield"; break; } var a = { h: hotel, s: selectId, x: selectedIndex }; var params = $H(a); var uri = new String("/includes/hotel/include.rates.php"); var myAjax = new Ajax.Request(uri, { // leave asynch false to ensure that the rates appear asynchronous: false, method: "get", parameters: params.toQueryString(), onComplete: function(originalRequest){ $(area).innerHTML = originalRequest.responseText; } } ); }