var checkHotelRate_isFirst = true; function include_js(file,callBack) { var _doc = document.getElementsByTagName('head')[0]; var js = document.createElement('script'); js.setAttribute('type', 'text/javascript'); js.setAttribute('src', file); _doc.appendChild(js); if (!/*@cc_on!@*/0) { //if not IE //Firefox2、Firefox3、Safari3.1+、Opera9.6+ support js.onload js.onload = function () { callBack(); } } else { //IE6、IE7 support js.onreadystatechange js.onreadystatechange = function () { if (js.readyState == 'loaded' || js.readyState == 'complete') { callBack(); } } } return false; } function tzsearch() { document.apLogin.submit(); } function displayCMI(o){ tmpobj = "win"+o; $("div.windowHotelRoom").hide(); $("#"+tmpobj).fadeIn(800); } function hideCMI(o){ $("#"+"win"+o).fadeOut(800); } //新优化使用tsign区别 true function checkHotelRate2(n, tsign, sinoid){ //document.writeln("/hotel/ajax-room-rate.asp?hotelid="+n+"&starttime="+document.getElementById("starttime").value+"&endtime="+document.getElementById("endtime").value); var t = parseInt(Math.random() * 200000); if(checkHotelRate_isFirst){ checkHotelRate_isFirst = false; }else{ var t1 = $("#changeDate #starttime").val(), t2 = $("#changeDate #endtime").val() $("#changeDate #hotelnight").html(Math.ceil((new Date(t2) - new Date(t1))/86400000)); $("#changeDate #TxtSdate").html(t1); $("#changeDate #TxtEdate").html(t2); $("#changeDate>div").toggle(); } if(tsign) { $.get("/hotel/ajax-room-rate.asp?hotelid="+n+"&starttime="+$("#starttime").val()+"&endtime="+$("#endtime").val()+"&opt=new&sinoid="+sinoid+"&t="+t,function(ajaxdata){ $("#hotelRate").html(ajaxdata); if ($("#hotelRate").css("display")=="block"){ $("#hotelRate").fadeOut(350); $("#hotelRate").fadeIn(380); }else{ $("#hotelRate").slideDown(380); } }); } else { $.get("/hotel/ajax-room-rate.asp?sinoid="+sinoid+"&hotelid="+n+"&starttime="+document.getElementById("starttime").value+"&endtime="+document.getElementById("endtime").value+"&t="+t,function(ajaxdata){ $("#hotelRate").html(ajaxdata); if ($("#hotelRate").css("display")=="block"){ $("#hotelRate").fadeOut(350); $("#hotelRate").fadeIn(380); }else{ $("#hotelRate").slideDown(380); } }); } } function displayRateCalendar(o){ tmphtml1 = "Hide Rate Calendar" tmphtml2 = "Show Hotel Rate Calendar" if ($("#rateCalendar").css("display")=="block"){ $("#rateCalendar").slideUp(1000); $(o).html(tmphtml2); }else{ $("#rateCalendar").slideDown(1000); $(o).html(tmphtml1); } } //预定酒店是机票搜索函数 function hotelSearchFlights(){ var c1 = getCityAirCode(document.sflight.startCode1.value); var c2 = getCityAirCode(document.sflight.destinationCode1.value); if(c1 && c2) { document.sflight.startCode1.value = c1; document.sflight.destinationCode1.value = c2; document.sflight.submit(); } else { alert('Error City Airport');return false; } } function closeFlightTable(o){ o.checked?$("#tableResultid").hide():$("#tableResultid").show(); } function displayPackinfo(o){ o.checked?$("#packinfoTable").show():$("#packinfoTable").hide(); } function getHotelListText(o){ $("#listhotel").html("test"); //postget("/hotel/hotellist-all.asp?city=shanghai&s=21"); $.get("/hotel/hotellist-all.asp?city=shanghai", function(data){ $("#listhotel").html(data); }) } function postget(theurl) { var xmlHttp = new XMLHttpRequest(); xmlHttp.open("POST", theurl, true); xmlHttp.send(null); xmlHttp.onreadystatechange = function() { if (xmlHttp.readyState == 4) { if (xmlHttp.status == 200) return xmlHttp.responseText; } } } function closeThis(Obj){ var hotelid = $(Obj).attr("val"); var NewCK = $.cookie("hotelHistory").split("|"); for(i=0;i