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.
25 lines
4.6 KiB
JavaScript
25 lines
4.6 KiB
JavaScript
|
|
document.write("<script language=\"javascript\" src=\"/js/inland.js\"></script>");$(function(){function getAirPortCode(m_HTML1,m_HTML2,m_cityName,m_Hide){var airport_split=citystr.split(",");var airportCode_split=citystrcode.split(",");var m_cityName_temp=m_cityName.toUpperCase();for(i=0;i<airport_split.length-1;i++){if(airport_split[i]==m_cityName_temp){$("#"+m_Hide).val(airportCode_split[i]);break;}}}
|
|
$("#js_search_flights_button").click(function(){$("#flightsform").attr("action","/china-flights/postquery.asp");$("#flightsform").submit();});$(".triptype").click(function(){$(".getFromCity").hide();if($(this).val()=="1"){$("#tReturn").css("display","none");$("#flightFromTo").html(" To: ");$("#StrseCity").css("display","none");$("#Depart").html("Depart: ");$("#aReturn").html("To");}
|
|
else if($(this).val()=="2"){$("#tReturn").css("display","");$("#flightFromTo").html(" To: ");$("#StrseCity").css("display","none");$("#Depart").html("Depart: ");$("#Return").html("Return");$("#aReturn").html("To");}
|
|
else if($(this).val()=="3"){$("#flightFromTo").html(" Fst Arrival: ");$("#StrseCity").css("display","");$("#Return").html("Sec Depart: ");$("#Depart").html("Fst Depart:");$("#tReturn").css("display","");$("#aReturn").html("Fst Arrival");}});});function getCityList(cityText,cityDiv,cityCode){$("#"+cityDiv).css("display","");var w=$("#"+cityText).val();var ajax_url="/include/ajax-getcity.asp?w="+w+"&cityText="+cityText+"&cityCode="+cityCode+"&cityDiv="+cityDiv
|
|
postget(ajax_url,cityDiv);}
|
|
function SelectCity(cc,cn,cityText,cityCode,cityDiv){$("#"+cityText).val(cn);$("#"+cityCode).val(cc);$("#"+cityDiv).css("display","none");}
|
|
function CancelDiv(strDiv){$("."+strDiv).hide();}
|
|
$(function(){$("#startCode1Text").focus(function(){$(".getFromCity").hide();$("#getFromCity1").show();})});$(function(){$("#destinationCode1Text").focus(function(){$(".getFromCity").hide();$("#getFromCity2").show();})});$(function(){$("#destinationCode2Text").focus(function(){$(".getFromCity").hide();$("#getFromCity3").show();})});$(document).ready(function(){var oLabel=$("#typeSelect input");oLabel.eq(0).attr("checked","checked");function hideAll(){$("#frame2 label").hide();$("#frame3 label").hide();}
|
|
oLabel.each(function(i){switch(i){case 0:this.onclick=function(){hideAll();$("#fromWhere").show();$("#toWhere").show();$("#startDate").show();$("#textTo").html("<strong>Going to:</strong");$("#takeoffDate1").bind("click",'', function(){showCalendar('dateImage1',false,'takeoffDate1')});}
|
|
break;
|
|
case 1:this.onclick=function(){hideAll();$("#fromWhere").show();$("#toWhere").show();$("#startDate").show();$("#endDate").show();$("#textTo").html("<strong>Going to:</strong>");$("#textRetuenDate").html(" <strong>Return:</strong>");$("#takeoffDate1").bind("click",'', function(){showCalendar('dateImage1',false,'takeoffDate1', 'dateImage2', 'takeoffDate2')});}
|
|
break
|
|
case 2:this.onclick=function(){hideAll();$("#fromWhere").show();$("#toWhere").show();$("#startDate").show();$("#endDate").show();$("#textTo").html(" <strong>Fst Arrival:</strong>");$("#arrival").show();$("#textRetuenDate").html(" <strong>Sec Depart:</strong>")}
|
|
break}});$(".tableResult .allclass").click(function(){var strtmp=$(this).attr("name");var arrstrtmp=strtmp.split("_");var cstar=arrstrtmp[0];var cdest=arrstrtmp[1];var id=arrstrtmp[2];var queryId=arrstrtmp[3];var blsave=arrstrtmp[4];var datapag;var js_Cache="<tr class='js_openClass'><td colspan='7'><img src='/pic/ajax-loader-1.gif' /></td></tr>";if($(this).attr("id")=="js_openClass")
|
|
{$(this).parents("tr").after(js_Cache);$(this).text("Hide Classes").attr("id","js_closeClass").parents("tr").attr("id",$(this).parents("tr").attr("class")).removeClass().addClass("openClass");if($(".tr"+id).length>0)
|
|
{$(".js_openClass").remove();$(".tr"+id).show();return;}
|
|
$.post("/include/ajax.asp",{strtemp:"get-other-flight-price",id:id,queryId:queryId,cstar:cstar,cdest:cdest,blsave:blsave},function(data){$(".js_openClass").remove();$(".allclass[name="+strtmp+"]").parents("tr").after(data);});}
|
|
else
|
|
{$(this).text("All Classes").attr("id","js_openClass").parents("tr").removeClass().addClass($(this).parents("tr").attr("id"));$(".tr"+id).hide();}});$(".ParamSort").click(function(){if($(this).attr("id")=="OrderByTime")
|
|
{$("#orderBy_Price").val("");$("#orderBy_Time").val($(this).attr("name"));}
|
|
else
|
|
{$("#orderBy_Time").val("");$("#orderBy_Price").val($(this).attr("name"));}
|
|
$("#flightForm").submit();});$.each($(".flightSort input:visible"),function(){$(this).click(function(){if($(this).attr("checked"))
|
|
{$("#flightForm").submit();return;}});});$("#js_chooseLowPrice").click(function(){$(this).parents("form").submit();});}) |