You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.7 KiB
JavaScript

TrunMenu("js_ChangeCartHead","active","li","js_ChangeCartBody");
TrunMenu("citySwitch","active","li","dealHotels");
TrunMenu("js_ChangeCartHead","active","li","js_ChangeCartBody",2, true);
function GetLength(str) {
var realLength = 0, len = str.length, charCode = -1;
for (var i = 0; i < len; i++) {
charCode = str.charCodeAt(i);
if (charCode >= 0 && charCode <= 128) realLength += 1;
else realLength += 2;
}
return realLength;
};
$(function(){
var sdates = $("#hotelstarttime,#hotelendtime").datepicker({showAnim:"fadeIn",duration:0,minDate: 0, maxDate:"2y",numberOfMonths: 3,showButtonPanel: true});
var shcity= $("input[name='city']");
shcity.click(function(){
$("#hotelcities").fadeIn(200);
});
$(".closeIt").click(function(){
$("#hotelcities").fadeOut(200);
});
$("#hotelcities a").click(function(){
shcity.val($(this).text());
$("#hotelcities").hide();
});
});
function GetLength(str) {
var realLength = 0, len = str.length, charCode = -1;
for (var i = 0; i < len; i++) {
charCode = str.charCodeAt(i);
if (charCode >= 0 && charCode <= 128) realLength += 1;
else realLength += 2;
}
return realLength;
};
function more_option(a)
{ //a=0关闭city,1打开city
var obj = document.getElementById("showmoreOption");
switch(a){
case 0:
obj.style.display="none";
obj=document.getElementById("show");
obj.style.display="";
obj=document.getElementById("hide");
obj.style.display="none";
break;
case 1:
document.getElementById("otherPromo").style.display = "";
obj.style.display="";
obj=document.getElementById("show");
obj.style.display="none";
break;
}
}