﻿//机票查询功能块验证
function flightVal(){
    if($.trim($("#txtFromCity").val()).length==0){
        UTG.ShowMsg("Please enter your city of departure","txtFromCity");return !1;
    }
    if($.trim($("#txtEndCity").val()).length==0){
        UTG.ShowMsg("Please enter a destination","txtEndCity");return !1;
    }
    if($.trim($("#txtSDate").val()).length==0||$("#txtSDate").val()=="mm-dd-yyyy"){
        UTG.ShowMsg("Please select your date of departure","txtSDate");return !1;
    }
    var ft=$("#ddlFType").val();
    if(ft=="2"){
        if($.trim($("#txtEDate").val()).length==0||$("#txtEDate").val()=="mm-dd-yyyy"){
            UTG.ShowMsg("Please select a return date","txtEDate");return !1;
        }
    }
}
function searchForm(from){
    var ft = $(":radio[name=rdoType]").val();//DOMESTIC OR INTERNATIONAL
    var ac = ft=="1" ? from==0 ? "FlightLoading.aspx" : "DomFlight/FlightLoading.aspx" : "";
    $("#form1").attr("action",ac);
    return flightVal();
}
$(function(){
    $("#ddlFType").click(function(){
        if($(this).val()=="1"){
            $(".rd").css("display","none");
        }else if($(this).val()=="2"){
            $(".rd").css("display","");
        }
    });
    $(":radio[name=rdoType]").click(function(){
        
    });
});