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.
132 lines
3.8 KiB
JavaScript
132 lines
3.8 KiB
JavaScript
6 years ago
|
function changePanel(o){
|
||
|
$("#product-search-nav li a").removeClass();
|
||
|
$("#product-search-nav li a").eq(0).addClass("tour");
|
||
|
$("#product-search-nav li a").eq(1).addClass("cruise");
|
||
|
$("#product-search-nav li a").eq(2).addClass("hotel");
|
||
|
$("#product-search-nav li a").eq(3).addClass("flight");
|
||
|
o.className=$(o).html().substr(0,$(o).html().length-1).toLowerCase() + " "+$(o).html().substr(0,$(o).html().length-1).toLowerCase()+"Selected";
|
||
|
$("div.productBox.roundCornerBottom").hide();
|
||
|
$("div.productBox.roundCornerBottom").eq($("#product-search-nav li a").index($(o))).fadeIn(500);
|
||
|
|
||
|
}
|
||
|
|
||
|
function findShipName(o){
|
||
|
var cfrom = o.value.split("-")[0];
|
||
|
var cto = o.value.split("-")[1];
|
||
|
$.post("/include/ajax.asp",
|
||
|
{strtemp:"change-cruise-option",cfrom:cfrom,cto:cto},
|
||
|
function(data){
|
||
|
$("#shipname").children().remove();
|
||
|
var arri = new Array();
|
||
|
arri = data.split(",");
|
||
|
$.each(arri,function(arriIndexOf,arriValue){
|
||
|
if(arriValue != "")
|
||
|
{
|
||
|
var objOption = $("<option></option>").val(arriValue).text(arriValue);
|
||
|
$("#shipname").prepend(objOption);
|
||
|
}
|
||
|
});
|
||
|
});
|
||
|
}
|
||
|
|
||
|
function selectFType(o){
|
||
|
if (parseInt(o.value) != 1){
|
||
|
$("#returntime").slideDown(260);
|
||
|
}else{
|
||
|
$("#returntime").slideUp(260);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
|
||
|
function checkd()
|
||
|
{
|
||
|
var obj=document.getElementsByName("sc");
|
||
|
var cl =obj.length;
|
||
|
var sc ="";
|
||
|
for(var ii=0;ii<cl;ii++){
|
||
|
if(obj[ii].checked)sc=sc+obj[ii].value+", ";
|
||
|
}
|
||
|
document.toursearchpanelform.city.value=sc;
|
||
|
}
|
||
|
|
||
|
$(function(){
|
||
|
|
||
|
$("#cruisestarttime").datepicker({
|
||
|
showAnim: "fadeIn",
|
||
|
duration: 0,
|
||
|
minDate: 0,
|
||
|
maxDate: "2y",
|
||
|
numberOfMonths: 2,
|
||
|
showButtonPanel: true
|
||
|
})
|
||
|
|
||
|
$("#cruiseendtime").datepicker({
|
||
|
showAnim:"fadeIn",
|
||
|
duration:0,
|
||
|
minDate: 0,
|
||
|
maxDate:"2y",
|
||
|
numberOfMonths: 2,
|
||
|
showButtonPanel: true
|
||
|
})
|
||
|
$("#hotelstarttime").datepicker({
|
||
|
showAnim:"fadeIn",
|
||
|
duration:0,
|
||
|
minDate: 0,
|
||
|
maxDate:"2y",
|
||
|
numberOfMonths: 2,
|
||
|
showButtonPanel: true
|
||
|
})
|
||
|
$("#hotelendtime").datepicker({
|
||
|
showAnim:"fadeIn",
|
||
|
duration:0,
|
||
|
minDate: 0,
|
||
|
maxDate:"2y",
|
||
|
numberOfMonths: 2,
|
||
|
showButtonPanel: true
|
||
|
});
|
||
|
$("#flightstarttime").datepicker({
|
||
|
showAnim:"fadeIn",
|
||
|
duration:0,
|
||
|
minDate: 0,
|
||
|
maxDate:"2y",
|
||
|
numberOfMonths: 2,
|
||
|
showButtonPanel: true
|
||
|
})
|
||
|
$("#flightendtime").datepicker({
|
||
|
showAnim:"fadeIn",
|
||
|
duration:0,
|
||
|
minDate: 0,
|
||
|
maxDate:"2y",
|
||
|
numberOfMonths: 2,
|
||
|
showButtonPanel: 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(){
|
||
|
if(typeof Date.dayNames != "object"){
|
||
|
var oHead = document.getElementsByTagName('HEAD').item(0);
|
||
|
var oScript= document.createElement("script");
|
||
|
oScript.type = "text/javascript";
|
||
|
oScript.src="/js/ui.date.js";
|
||
|
oHead.appendChild(oScript);
|
||
|
}
|
||
|
var NowDate = new Date();
|
||
|
$("#cruisestarttime").val(NowDate.addDays(10).asString());
|
||
|
$("#cruiseendtime").val(NowDate.addDays(4).asString());
|
||
|
$("#hotelstarttime").val(NowDate.addDays(-12).asString());
|
||
|
$("#hotelendtime").val(NowDate.addDays(2).asString());
|
||
|
$("#flightstarttime").val(NowDate.asString());
|
||
|
$("#flightendtime").val(NowDate.addDays(1).asString());
|
||
|
});
|