function EmbedBookingRequest_OnLoad() { $(function() { $("#date_from").datepicker({dateFormat:'yy-mm-dd',beforeShowDay: checkDate}); }); } var WinPointer; function orrs_popup_window(window_name,url,width,height,xpos,ypos) { if (!window_name) window_name = 'NewWindow'; if (!width) width=300; if (!height) height=300; if (!xpos) xpos=20; if (!ypos) ypos=20; if (WinPointer != null) { WinPointer.close(); WinPointer = null; } var winStats = 'width='+ width +',height='+ height +',scrollbars=yes,menubar=yes,status=yes,menubar=yes,toolbar=no,location=no,resizable=yes'; if (xpos > 0) { winStats += ",left=" + xpos; } if (ypos > 0) { winStats += ",top=" + ypos; } WinPointer = window.open(url,'window_name',winStats); return false; } //function EmbedBookingRequest(hotel_id,max_adults,max_children) function EmbedBookingRequest_ReturnHTML() { document.writeln(''); document.writeln(''); document.writeln(''); document.writeln('
'); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(' '); document.writeln(' '); document.writeln(''); document.writeln(''); document.writeln(' '); document.writeln(''); document.writeln(''); document.writeln(' '); document.writeln(' '); document.writeln(' '); document.writeln(''); document.writeln(''); document.writeln(' '); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln(''); document.writeln('
Arrival Date
Nights
Adults
Children
9 or under
'); document.writeln('
'); } function CheckUnitStyleSearchButtons(flag) { var form = document.searchform; if (flag) form.turn_on_unitstyle_in_search_all.checked = false; if (form.turn_on_unitstyle_in_search_all.checked) { form.turn_on_unitstyle_in_search_bit0.checked = false; form.turn_on_unitstyle_in_search_bit1.checked = false; form.turn_on_unitstyle_in_search_bit2.checked = false; } else if (form.turn_on_unitstyle_in_search_bit0.checked || form.turn_on_unitstyle_in_search_bit1.checked || form.turn_on_unitstyle_in_search_bit2.checked) { form.turn_on_unitstyle_in_search_all.checked = false; } } function HotelIDSelected(form) { var hotel_id = form.select_hotel_id.value; var url = form.action; url = url.replace(/hotel\/.+/,"hotel\/" + hotel_id); form.action = url; } function checkDate(date) { var cur = new Date(); cur.setFullYear(2017,5-1,12); //alert(date + ', ' + cur); if (cur.getYear() < date.getYear()) return [true, '']; if (cur.getYear() == date.getYear() && cur.getMonth() < date.getMonth()) return [true, '']; if (cur.getYear() == date.getYear() && cur.getMonth() == date.getMonth() && cur.getDate() <= date.getDate()) return [true, '']; return [false, '']; }