﻿
function endBtn()
{ document.getElementById("btnBegin").disable = true; setTimeout(benginBtn, 3000); }
function benginBtn()
{ document.getElementById("btnBegin").disable = false; }
function selectPMOReturnValue() {
    var hidType = document.getElementById("hidType"); var url = "../Order/PromotionQuery.aspx?PeriodNum=" + hidType; if (url.indexOf("?") > -1)
    { newUrl = url + "&rt=" + Math.random(); }
    else
    { newUrl = url + "?" + "rt=" + Math.random(); }
    var popwidth = "828px", popheight = "620px", popleft = "60px"; if (screen.width > 1024)
    { popwidth = "1040px"; popheight = "780px"; popleft = (screen.width - 920) / 2; }
    var searchBusnFrndWinParam = "dialogwidth:" + popwidth + ";dialogheight:" + popheight + ";dialogTop:60px;dialogLeft:" + popleft + ";toolbar:no;scrollbars:yes;help:no;resizable:yes;"; var result = window.showModalDialog(url, '编辑', searchBusnFrndWinParam); if (result && result != "")
    { document.getElementById("tbPromotionID").value = result; document.getElementById("btnPromotion").click(); }
}
function show(id) {
    var div1 = document.getElementById("con_two_1"); var div2 = document.getElementById("con_two_2"); var div3 = document.getElementById("con_two_3"); var hidType = document.getElementById("hidType"); if (id == 1) { hidType.value = "1"; document.getElementById("two1").className = "I_hover"; document.getElementById("two2").className = "I_end"; document.getElementById("two3").className = "I_end"; div1.style.display = "block"; div2.style.display = "none"; div3.style.display = "none"; document.getElementById("panelDiv").style.display = "block"; return; }
    if (id == 2) { hidType.value = "2"; document.getElementById("two2").className = "I_hover"; document.getElementById("two1").className = "I_end"; document.getElementById("two3").className = "I_end"; div2.style.display = "block"; div1.style.display = "none"; div3.style.display = "none"; document.getElementById("panelDiv").style.display = "block"; return; }
    if (id == 3) {
        //        hidType.value = "3"; document.getElementById("two3").className = "I_hover"; document.getElementById("two1").className = "I_end"; document.getElementById("two2").className = "I_end";
        window.open("../International/index.aspx");
        //        div3.style.display = "block";
        //        div1.style.display = "none";
        //        div2.style.display = "none";
        //document.getElementById("panelDiv").style.display = "none"; 
        return;
    }
}
function showAgent(id) {
    var div1 = document.getElementById("divMember");
    var div2 = document.getElementById("divFTP");
    var div3 = document.getElementById("divEnt");
    var hidAgent = document.getElementById("hidAgent");
    if (id == 1) { hidAgent.value = "1"; div1.style.display = "block"; div2.style.display = "none"; div3.style.display = "none"; return; }
    if (id == 2) { hidAgent.value = "2"; div2.style.display = "block"; div1.style.display = "none"; div3.style.display = "none"; return; }
    if (id == 3) { hidAgent.value = "3"; div3.style.display = "block"; div1.style.display = "none"; div2.style.display = "none"; return; }
}
function showPeriod(id) {
    var div1 = document.getElementById("divHour"); var div2 = document.getElementById("divDay"); var HidPeriod = document.getElementById("HidPeriod"); if (id == 1) { HidPeriod.value = "1"; div1.style.display = "block"; div2.style.display = "none"; ChangeHelpReturnDate(); return; }
    if (id == 2) { HidPeriod.value = "2"; div2.style.display = "block"; div1.style.display = "none"; ChangeHelpReturnDate(); return; }
}
function checkData() {
    var hidType = document.getElementById("hidType").value; if (hidType == 1) {
        var beginDate = document.getElementById("txtBeginDate"); var endDate = document.getElementById("txtEndDate"); var getCarCityMenDian = document.getElementById("getCarCityMenDian"); var retCarCityMenDian = document.getElementById("retCarCityMenDian"); var Language = $('#hdnLanguage').val(); if (Language == "en-us") {
            if (beginDate.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input pickup time!"; return false; }
            if (endDate.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input return time!"; return false; }
            if (document.getElementById("ddlGetShop").value <= 0) { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please choose pickup location!"; return false; }
            if (document.getElementById("ddlRetShop").value <= 0) { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please choose return location!"; return false; }
            var OD = new Date(beginDate.value.replace(/\-/g, "/")); var today = new Date(); today.setDate(today.getDate() + 359); if (OD > today)
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Date can not be advance more than 360 days"; return false; }
        } else {
            if (beginDate.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "取车时间不能为空！"; return false; }
            if (endDate.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "还车时间不能为空！"; return false; }
            if (document.getElementById("ddlGetShop").value <= 0) { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "请选择租车门店！"; return false; }
            if (document.getElementById("ddlRetShop").value <= 0) { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "请选择还车门店！"; return false; }
            var OD = new Date(beginDate.value.replace(/\-/g, "/")); var today = new Date(); today.setDate(today.getDate() + 359); if (OD > today)
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "上车日期不能超过360天！"; return false; }
        }
    }
    if (hidType == 2) {
        var HelpbeginDate = document.getElementById("txtHelpBeginDate"); var HelpendDate = document.getElementById("txtHelpEndDate"); var getCarCityMenDian = document.getElementById("getOfficCity"); var retCarCityMenDian = document.getElementById("tbReturnCity"); var Day = document.getElementById("txtDay").value; var Language = $('#hdnLanguage').val(); if (Language == "en-us") {
            if (Day == "0" || !(/^\d+$/.test(Day)))
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input invalid days of chauffeur service!"; return false; }
            if (HelpbeginDate.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input start time!"; return false; }
            if (HelpendDate.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input end time!"; return false; }
            if (getCarCityMenDian.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input start location!"; return false; }
            if (retCarCityMenDian.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input return location!"; return false; }
            var OD = new Date(HelpbeginDate.value.replace(/\-/g, "/")); var today = new Date(); today.setDate(today.getDate() + 359); if (OD > today)
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Date can not be advance more than 360 days!"; return false; }
        } else {
            if (Day == "0" || !(/^\d+$/.test(Day)))
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input invalid days of chauffeur service!"; return false; }
            if (HelpbeginDate.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input start time!"; return false; }
            if (HelpendDate.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input end time!"; return false; }
            if (getCarCityMenDian.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input start location!"; return false; }
            if (retCarCityMenDian.value == "") { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input return location!"; return false; }
            var OD = new Date(HelpbeginDate.value.replace(/\-/g, "/")); var today = new Date(); today.setDate(today.getDate() + 359); if (OD > today)
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Date can not be advance more than 360 days!"; return false; }
        }
    }
    if (hidType == 3) {
        var txtInBengDate = document.getElementById("txtInBengDate"); var txtInEndDate = document.getElementById("txtInEndDate"); var Language = $('#hdnLanguage').val(); if (Language == "en-us") {
            if (txtInBengDate.value == "")
            { document.getElementById("diverror2").style.display = "block"; document.getElementById("lblValidateNum2").innerText = "Please input start time!"; return false; }
            if (txtInEndDate.value == "")
            { document.getElementById("diverror2").style.display = "block"; document.getElementById("lblValidateNum2").innerText = "Please input end time!"; return false; }
        }
        else {
            if (txtInBengDate.value == "")
            { document.getElementById("diverror2").style.display = "block"; document.getElementById("lblValidateNum2").innerText = "上车时间不能为空！"; return false; }
            if (txtInEndDate.value == "")
            { document.getElementById("diverror2").style.display = "block"; document.getElementById("lblValidateNum2").innerText = "下车时间不能为空！"; return false; }
        }
    }
    var a = document.getElementById("FTPInput_ddlCompany"); var c = document.getElementById("FTPInput_ddlLevel"); var Language = $('#hdnLanguage').val();
    if (document.getElementById('hidAgent').value == "2") {
        if (Language == "en-us") {
            if (a.selectedIndex != 0 && c.selectedIndex == 0)
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input your card level!"; return false; }
        } else {
            if (a.selectedIndex != 0 && c.selectedIndex == 0)
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "请选择特约商户分类！"; return false; }
        }
    }
    return true;
}
function CancelDay() {
    var beginDate = document.getElementById("txtHelpBeginDate").value; var HelpbeginHours = document.getElementById("ddlHelpBeginHours").value; var HelpbeginMinutes = document.getElementById("ddlHelpBeginMinutes").value; if (beginDate == "") { return false; }
    var Day = document.getElementById("txtDay").value; if (Day != "") {
        if (parseInt(Day) > 0)
        { document.getElementById("txtDay").value = parseInt(Day) - parseInt(1); }
    }
    if (document.getElementById("txtDay").value == "1")
    { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setHours(date.getHours() + parseInt("8")); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
    else if (document.getElementById("txtDay").value == "0" || document.getElementById("txtDay").value == "")
    { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
    else
    { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setDate(date.getDate() + parseInt(document.getElementById("txtDay").value) - 1); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd"); }
    return false;
}
function AddDay() {
    var beginDate = document.getElementById("txtHelpBeginDate").value; var HelpbeginHours = document.getElementById("ddlHelpBeginHours").value; var HelpbeginMinutes = document.getElementById("ddlHelpBeginMinutes").value; var date; if (beginDate == "") { return false; }
    var Day = document.getElementById("txtDay").value; if (Day == "")
    { Day = "0"; }
    document.getElementById("txtDay").value = parseInt(Day) + parseInt(1); if (document.getElementById("txtDay").value == "1")
    { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setHours(date.getHours() + parseInt("8")); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
    else if (document.getElementById("txtDay").value == "0" || document.getElementById("txtDay").value == "")
    { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
    else
    { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setDate(date.getDate() + parseInt(document.getElementById("txtDay").value) - 1); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd"); }
    return false;
}
function pickedFunc(PeriodType) {
    var beginDate = document.getElementById("txtHelpBeginDate").value; var HelpbeginHours = document.getElementById("ddlHelpBeginHours").value; var HelpbeginMinutes = document.getElementById("ddlHelpBeginMinutes").value; var date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); var Language = $('#hdnLanguage').val(); if (PeriodType == "Hour")
    { var Hours = document.getElementById("ddlHourCount").value; date.setHours(date.getHours() + parseInt(Hours)); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
    if (PeriodType == "Day") {
        var daycount = document.getElementById("txtDay").value; if (Language == "en-us") {
            if (daycount == "0")
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input invalid days of chauffeur service!"; document.getElementById("txtDay").focus(); }
        } else {
            if (daycount == "0")
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "请输入有效的带驾租车天数！"; document.getElementById("txtDay").focus(); }
        }
        if (/^\d+$/.test(daycount)) {
            if (document.getElementById("txtDay").value == "1")
            { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setHours(date.getHours() + parseInt("8")); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
            else if (document.getElementById("txtDay").value == "0" || document.getElementById("txtDay").value == "")
            { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
            else
            { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setDate(date.getDate() + parseInt(document.getElementById("txtDay").value) - 1); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd"); }
        }
        else {
            if (Language == "en-us")
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "Please input invalid days of chauffeur service!"; document.getElementById("txtDay").focus(); } else
            { document.getElementById("diverror").style.display = "block"; document.getElementById("lblValidateNum").innerText = "请输入有效的带驾租车天数！"; document.getElementById("txtDay").focus(); }
        }
    }
    return true;
}
function ChangeHelpReturnDate() {
    var HidPeriod = document.getElementById("HidPeriod").value; var beginDate = document.getElementById("txtHelpBeginDate").value; var HelpbeginHours = document.getElementById("ddlHelpBeginHours").value; var HelpbeginMinutes = document.getElementById("ddlHelpBeginMinutes").value; if (beginDate != "") {
        if (HidPeriod == 1)
        { var Hours = document.getElementById("ddlHourCount").value; var date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setHours(date.getHours() + parseInt(Hours)); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
        if (HidPeriod == 2) {
            var Day = document.getElementById("txtDay").value; if (Day == "")
            { Day = "0"; }
            if (document.getElementById("txtDay").value == "1")
            { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setHours(date.getHours() + parseInt("8")); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
            else if (document.getElementById("txtDay").value == "0" || document.getElementById("txtDay").value == "")
            { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd HH:mm"); }
            else
            { date = new Date(beginDate.replace(/\-/g, "/") + " " + HelpbeginHours + ":" + HelpbeginMinutes); date.setDate(date.getDate() + parseInt(document.getElementById("txtDay").value) - 1); document.getElementById("txtHelpEndDate").value = date.format("yyyy-MM-dd"); }
        }
    }
    return true;
}
function ChangeEndDate() {
    var EndDate = document.getElementById("txtEndDate").value; var BeginDate = document.getElementById("txtBeginDate").value; if (BeginDate != "") {
        if (EndDate != "") {
            var dateoff = new Date(BeginDate.replace(/\-/g, "/")); var dateret = new Date(EndDate.replace(/\-/g, "/")); dateoff.setDate(dateoff.getDate() + 2); if (dateoff > dateret)
            { document.getElementById("txtEndDate").value = dateoff.format("yyyy-MM-dd"); }
        }
        if (EndDate == "")
        { var date = new Date(BeginDate.replace(/\-/g, "/")); date.setDate(date.getDate() + 2); document.getElementById("txtEndDate").value = date.format("yyyy-MM-dd"); }
    }
}

function ChangeLongDate() {
    var EndDate = document.getElementById("txtInEndDate").value; var BeginDate = document.getElementById("txtInBengDate").value; if (BeginDate != "") {
        if (EndDate != "") {
            var dateoff = new Date(BeginDate.replace(/\-/g, "/")); var dateret = new Date(EndDate.replace(/\-/g, "/")); if (dateoff > dateret)
            { dateoff.setDate(dateoff.getDate() + 1); document.getElementById("txtInEndDate").value = dateoff.format("yyyy-MM-dd"); }
        }
        if (EndDate == "")
        { var date = new Date(BeginDate.replace(/\-/g, "/")); date.setDate(date.getDate() + 1); document.getElementById("txtInEndDate").value = date.format("yyyy-MM-dd"); }
    }
}
function ShowOfficCity() {
    document.getElementById("getOfficCityLists").style.display = "block"; var obj = document.getElementById("getOfficCityLists"); var obj_LI = obj.getElementsByTagName("LI"); for (var i = 0; i < obj_LI.length; i++) {
        var obj_SPAN = obj_LI[i].getElementsByTagName("SPAN"); for (var j = 0; j < obj_SPAN.length; j++) {
            obj_SPAN[j].className = ""; if (obj_SPAN[j].rel == document.getElementById("getOfficCity").value)
            { obj_SPAN[j].className = "selected_city"; }
        }
    }
}
function ClearCity(obj)
{ }
function OnCRItemSelected(source, eventArgs) {
    if (eventArgs.get_value() != "")
    { document.getElementById("tbReturnCity").value = eventArgs.get_text(); document.getElementById("AutoCompleteRC_Hidden").value = eventArgs.get_value(); document.getElementById("") }
}
function HidOfficCity()
{ document.getElementById("getOfficCityLists").style.display = "none"; }
function SelOfficCity(obj) {
    var obj_LI = obj.getElementsByTagName("LI"); for (var i = 0; i < obj_LI.length; i++) {
        var obj_SPAN = obj_LI[i].getElementsByTagName("SPAN"); for (var j = 0; j < obj_SPAN.length; j++) {
            if (obj_SPAN[j].className == "current_city")
            { document.getElementById("getOfficCity").value = obj_SPAN[j].rel; }
        }
    }
    if (document.getElementById("getOfficCity").value != null)
    { document.getElementById("tbReturnCity").value = document.getElementById("getOfficCity").value; }
}
window.onload = function() { var hidType = document.getElementById("hidType").value; var hidAgent = document.getElementById("hidAgent").value; var HidPeriod = document.getElementById("HidPeriod").value; show(hidType); showAgent(hidAgent); showPeriod(HidPeriod); }
function openMap(cityName, obj)
{ window.open("test1.aspx?CityName=上海&StoreIndex=8", "", "width=200,height=100,top=130,left=630,toolbar=no,resizable=no") } $(function() {
    var getCarCityLists = $('#getCarCityLists'); var getCarCity = $('input[name="getCarCity"]'); var retCarCity = $('input[name="retCarCity"]'); var getCarCityMenDian = $('input[name="getCarCityMenDian"]'); var retCarCityMenDian = $('input[name="retCarCityMenDian"]'); var getCarMenDianList = $('#getCarMenDianList'); var retCarMenDianList = $('#retCarMenDianList'); var gett = $('input[name="getCarCityMenDian"]'); var rett = $('input[name="retCarCityMenDian"]'); var Language = $('#hdnLanguage').val(); var getCityListsSH = false; var getMendianListSH = false; var retMendianListSH = false; var wnh1 = false; var wnh2 = false; var checkeds = [false, false]; var selecteds = [0, 0]; getCarCity.click(function() { ehaiYDK.cites.show(this, getCarCityLists); $(this).focus(); }); retCarCity.click(function() { ehaiYDK.cites.show(this, getCarCityLists); $(this).focus(); }); $('#getMendianBox').click(function() { var value = getCarCityMenDian.val(); ehaiYDK.cites.mendian('get', this, getCarMenDianList); ehaiYDK.ajax('get', getCarCity.val(), 'city', ehaiYDK.fnO); getCarMenDianList.find('li .swfulds[rel="' + value + '"]').addClass('selected_city'); }); $('#retMendianBox').click(function() { var value = retCarCityMenDian.val(); ehaiYDK.cites.mendian('ret', this, retCarMenDianList); ehaiYDK.ajax('ret', retCarCity.val(), 'city', ehaiYDK.fnO); retCarMenDianList.find('li .swfulds[rel="' + value + '"]').addClass('selected_city'); }); $('.city-list li span, .city-list li span').hover(function() { $(this).addClass('current_city'); }, function() { $(this).removeClass('current_city'); }).click(function() {
        var type = ehaiYDK.cites._cs == 'getCarCity' ? 'get' : 'ret'; $('input[name="' + ehaiYDK.cites._cs + '"]').val($(this).text()); if (Language == "en-us")
        { $('input[name="' + type + 'CarCityMenDian"]').val('Please select location.'); }
        else
        { $('input[name="' + type + 'CarCityMenDian"]').val('请选择' + (type == 'get' ? '租车' : '还车') + '门店'); }
        ehaiYDK.ajax(type, $(this).text(), 'city', ehaiYDK.fnO); if (type == 'get') {
            $('.quick-order input[type="checkbox"]').each(function(i) { this.checked = false; }); $('input[name="retCarCity"]').val($(this).text()); if (Language == "en-us")
            { retCarCityMenDian.val('Please select location.'); }
            else
            { retCarCityMenDian.val('请选择还车门店'); }
            $('.wnh').hide(); $('.mendianGet').show();
        } else { $('.quick-order input[type="checkbox"]').each(function(i) { if (i == 1) { this.checked = false; } }); $('#retMendianBox').parent().show(); $('.r').hide(); }
        ehaiYDK.cites.hide(getCarCityLists);
        GetShop(type); //获取门店
    }); getCarCityLists.mouseover(function() { getCityListsSH = true; }).mouseout(function() { getCityListsSH = false; }); $('#getCarCityLists ul.city-cat>li').click(function() { ehaiYDK.cites.changeCat(this); }); $('#wnhget').click(function() { ehaiYDK.ajax('get', getCarCity.val(), 'area', ehaiYDK.fnO, $('#wnh1')); ehaiYDK.cites.area('get', this, $('#wnh1')); $('#wnh1').find('li[rel="' + $('input[name="getWNH"]').val() + '"]').addClass('selected_city'); }); $('#wnhret').click(function() { ehaiYDK.ajax('ret', retCarCity.val(), 'area', ehaiYDK.fnO, $('#wnh2')); ehaiYDK.cites.area('ret', this, $('#wnh2')); $('#wnh2').find('li[rel="' + $('input[name="retWNH"]').val() + '"]').addClass('selected_city'); }); $('#wnh1').hover(function() { wnh1 = true }, function() { wnh1 = false; }); $('#wnh2').hover(function() { wnh2 = true }, function() { wnh2 = false; }); var ehaiYDK = { version: 1.2, cites: { show: function(source, target) {
        var type = source.name == 'getCarCity' ? 'get' : 'ret'; this.position(type, source, 'city'); var selected = false; if (!this._cs) { target.css(this.xyOpts[type + 'city']).show(); this._cs = source.name; selected = true; } else {
            if (this._cs == source.name) { target.toggle(); } else { target.css(this.xyOpts[type + 'city']).show(); selected = true; }
            this._cs = undefined;
        }
        if (selected) this.select($(source).val(), ['.city-list li span', '.city-list li span'], 'selected_city');
    }, hide: function(target) { target.hide(); this._cs = undefined; }, select: function(value, target, className) { $(target[0] + '.' + className + ',' + target[1] + '.' + className).removeClass(className); $(target[0] + '[rel="' + value + '"]' + ', ' + target[1] + '[rel="' + value + '"]').addClass(className); $(target[0] + '.' + 'current_city' + ',' + target[1] + '.' + 'current_city').removeClass('current_city'); }, reset: function(fbID) { this.changeCat($('#' + fbID)[0]); }, changeCat: function(target) { if ($(target).hasClass('curr-cat')) return; $('.city-cat li.curr-cat').removeClass('curr-cat'); $(target).addClass('curr-cat'); var id = target.id == 'clr' ? 'cll' : 'clr'; $(target).removeClass(target.id); $('#' + id).addClass(id); $('.city-list').toggle(); $('.city-list02').toggle(); return false; }, xyOpts: {}, position: function(type, source, cma) { var xy = $(source).position(); if (!this.xyOpts[type + cma]) { this.xyOpts[type + cma] = { left: xy.left + 'px', top: xy.top + 24 + 'px', position: 'absolute'} } }, mendian: function(type, source, target) { this.position(type, source, 'mendian'); target.css(this.xyOpts[type + 'mendian']).toggle(); }, area: function(type, source, target) { this.position(type, source, 'area'); target.css(this.xyOpts[type + 'area']).toggle(); }
    }, fnO: { city: function(data, type) {
        var mendian = type == 'get' ? 'getCarMenDianList' : 'retCarMenDianList'; var cityName = type == 'get' ? getCarCity : retCarCity; if (data.city_get == 'Y') { $('#city_' + type).show(); if (type == 'get') $('#city_ret').show(); }
        else { $('#city_' + type).hide(); if (type == 'get') $('#city_ret').hide(); }
        $('#' + mendian + ' ul.swfu').html(''); var i = 0; while (data.storehouses[i]) { var hl = '<li class="swful"><div class="swfuld"><span class="swfulds" rel="' + data.storehouses[i]['briefname'] + '" _id="' + data.storehouses[i]['id'] + '" time="' + data.storehouses[i]['to_time'] + '">' + data.storehouses[i]['briefname'] + '</span><div class="swfuldd"><div class="swfulddd"><h4>' + data.storehouses[i]['briefname'] + '</h4><p>数据载入中...</p><p><a href=' + ehaiYDK.urls['zhinan'] + 'sid=' + data.storehouses[i]['id'] + '&c=' + cityName.val() + ' target="_self">查看地图和路线</a></p></div></div></div></li>'; $('#' + mendian + ' ul.swfu').append(hl).find('.swfulds'); i++; }
        var j = 0; $('#' + mendian + ' ul.swfu .swfulds').mousedown(function(event) { var value = $(this).attr('rel'); var time = $(this).attr('time'); $('input[name="' + type + 'CarCityMenDian"]').val(value); ehaiYDK.cites.timeSelect(type, Number(time)); if (type == 'get' && getCarCity.val() == retCarCity.val()) { $('input[name="retCarCityMenDian"]').val(value); ehaiYDK.cites.timeSelect('ret', Number(time)); } }).parent().hover(function() { $(this).find('.swfulds').addClass('sw_current').css('margin-bottom', ($.browser.version == '6.0' || $.browser.version == '7.0' ? '-4px' : 0)); $(this).find('.swfuldd').show(); if (type == 'get') $('#hbh-box').hide(); var id = $(this).find('.swfulds').attr('_id'); ehaiYDK.ajax(type, id, 'mendian', ehaiYDK.fnO, this); }, function() { $(this).find('.swfulds').removeClass('sw_current').css('margin-bottom', '0px'); $(this).find('.swfuldd').hide(); }).find('.swfulddd').mousedown(function(event) { event = window.event || event; var target = event.target || event.srcElement; if (target.nodeName == 'A' && j == 0) { window.open(target.href, "mendianzhinan"); j++; } else { return false; } });
    }, mendian: function(data, type, o) { $(o).find('.swfuldd img').attr('src', ehaiYDK.urls.images + data.storehouses[0]['image_path']); $(o).find('.swfulddd p:first').html(data.storehouses[0]['complet_ename']); }, area: function(data, type, o) { $(o).find('ul').html(''); var m = type == 'get' ? 1 : 2; var i = 0; while (data.areas[i]) { $(o).find('ul').append('<li value="' + data.areas[i]['price'].toString() + '" rel="' + data.areas[i]['area_name'] + '">' + data.areas[i]['area_name'] + '</li>').find('li').hover(function() { $(this).addClass('current_city'); }, function() { $(this).removeClass('current_city'); }).click(function() { $('input[name="' + type + 'WNH"]').val($(this).html()); $('input[name="' + type + 'Price"]').val($(this).attr('value')); $('#wnh' + m).hide(); }); i++; } }
    }, ajax: function(type, value, urlType, fnO, v) {
        value = escape(value); var _self = this; var mendian = (type == 'get' ? 'getCarMenDianList' : 'retCarMenDianList'); var area = (type == 'get' ? 1 : 2); if (value in _self.data[urlType]) { fnO[urlType].call(_self, _self.data[urlType][value], type, v); }
        else { $.ajax({ url: _self.urls[urlType] + value, type: 'get', beforeSend: function(data) { if (urlType == 'city') $('#' + mendian + ' ul.swfu').html('<li><span class="liouter">Loading...</span></li>'); else if (urlType == 'mendian') $(v).find('.swfu').html('<div class="mm">Loading...</div>'); else if (urlType == 'area') $('#wnh' + area + ' .swfu').html('<li><span class="liouterarea">Loading...</span></li>'); }, success: function(data) { $('#' + mendian + ' ul.swfu').html(data); $('#' + mendian + ' ul.swfu .swfulds').mousedown(function(event) { var value = $(this).attr('rel'); var time = $(this).attr('time'); $('input[name="' + type + 'CarCityMenDian"]').val(value); if (type == 'get' && getCarCity.val() == retCarCity.val() && (retCarCityMenDian.val() == "请选择还车门店" || retCarCityMenDian.val() == "Please select location.")) { $('input[name="retCarCityMenDian"]').val(value); } }).parent().hover(function() { $(this).find('.swfulds').addClass('sw_current').css('margin-bottom', ($.browser.version == '6.0' || $.browser.version == '7.0' ? '-4px' : 0)); $(this).find('.swfuldd').show(); if (type == 'get') $('#hbh-box').hide(); var id = $(this).find('.swfulds').attr('_id'); }, function() { $(this).find('.swfulds').removeClass('sw_current').css('margin-bottom', '0px'); $(this).find('.swfuldd').hide(); }).find('.swfulddd').mousedown(function(event) { event = window.event || event; var target = event.target || event.srcElement; if (target.nodeName == 'A') { window.open(target.href, "mendianzhinan"); } else { return false; } }); } }); }
    }, data: { city: {}, mendian: {}, area: {} }, urls: { city: '../Order/AsyncData.aspx?action=getbstore&city=', mendian: '../Order/AsyncData.aspx?action=getcstore&cityid=', area: '../Order/AsyncData.aspx?action=getarea&city=', images: '', zhinan: 'storeguide.aspx?' }
    }
    $(document).mousedown(function(event) {
        event = window.event || event; var target = event.target || event.srcElement; if (!getCityListsSH && target != getCarCity[0] && target != retCarCity[0]) { ehaiYDK.cites.hide(getCarCityLists); }
        if (!getMendianListSH && target != getCarCityMenDian[0] && target != gett[0]) { getCarMenDianList.hide(); }
        if (!retMendianListSH && target != retCarCityMenDian[0] && target != rett[0]) { retCarMenDianList.hide(); }
        if (!wnh1) $('#wnh1').hide(); if (!wnh2) $('#wnh2').hide();
    });
}); function showtab(btnid, tabid, tabnumber) {
    for (i = 1; i <= tabnumber; i++) { document.getElementById(tabid + "_btn" + i).className = "title_after"; document.getElementById(tabid + "_sub" + i).style.display = "none"; }
    document.getElementById(tabid + "_btn" + btnid).className = "title_now"; document.getElementById(tabid + "_sub" + btnid).style.display = "block";
}

function LoadItem() {
    $("select[name$=Country1]").append("<option value='AL0'>Albania</option>");
    $("select[name$=Country1]").append("<option value='AO0'>Angola</option>");
    $("select[name$=Country1]").append("<option value='AI0'>Anguilla</option>");
    $("select[name$=Country1]").append("<option value='AG0'>Antigua</option>");
    $("select[name$=Country1]").append("<option value='AR0'>Argentina</option>");
    $("select[name$=Country1]").append("<option value='AB0'>Aruba</option>");
    $("select[name$=Country1]").append("<option value='AU0'>Australia</option>");

    $("select[name$=Country1]").append("<option value='AT0'>Austria</option>");
    $("select[name$=Country1]").append("<option value='AZ0'>Azerbaijan</option>");
    $("select[name$=Country1]").append("<option value='PT2'>Azores</option>");
    $("select[name$=Country1]").append("<option value='BS0'>Bahamas</option>");
    $("select[name$=Country1]").append("<option value='BH0'>Bahrain</option>");
    $("select[name$=Country1]").append("<option value='BB0'>Barbados</option>");

    $("select[name$=Country1]").append("<option value='BA0'>Belarus</option>");
    $("select[name$=Country1]").append("<option value='BE0'>Belgium</option>");
    $("select[name$=Country1]").append("<option value='BZ0'>Belize</option>");
    $("select[name$=Country1]").append("<option value='BP0'>Benin</option>");
    $("select[name$=Country1]").append("<option value='YE0'>Bonaire</option>");
    $("select[name$=Country1]").append("<option value='QB0'>Bosnia &amp; Herzegovina</option>");

    $("select[name$=Country1]").append("<option value='BW0'>Botswana</option>");
    $("select[name$=Country1]").append("<option value='BR0'>Brazil</option>");
    $("select[name$=Country1]").append("<option value='BN0'>Brunei</option>");
    $("select[name$=Country1]").append("<option value='BG0'>Bulgaria</option>");
    $("select[name$=Country1]").append("<option value='UV0'>Burkina Faso</option>");
    $("select[name$=Country1]").append("<option value='CM0'>Cameroon</option>");

    $("select[name$=Country1]").append("<option value='CA'>Canada -all states-</option>");
    $("select[name$=Country1]").append("<option value='CAAB'>Canada Alberta</option>");
    $("select[name$=Country1]").append("<option value='CABC'>Canada British Columbia</option>");
    $("select[name$=Country1]").append("<option value='CAMB'>Canada Manitoba</option>");
    $("select[name$=Country1]").append("<option value='CANB'>Canada New Brunswick</option>");
    $("select[name$=Country1]").append("<option value='CANF'>Canada Newfoundland</option>");

    $("select[name$=Country1]").append("<option value='CANT'>Canada Northwest Territories</option>");
    $("select[name$=Country1]").append("<option value='CANS'>Canada Nova Scotia</option>");
    $("select[name$=Country1]").append("<option value='CAON'>Canada Ontario</option>");
    $("select[name$=Country1]").append("<option value='CAPE'>Canada Prince Edward Island</option>");
    $("select[name$=Country1]").append("<option value='CAPQ'>Canada Quebec</option>");
    $("select[name$=Country1]").append("<option value='CASK'>Canada Saskatchewan</option>");

    $("select[name$=Country1]").append("<option value='CAYT'>Canada Yukon Territory</option>");
    $("select[name$=Country1]").append("<option value='CB0'>Cape Verdi</option>");
    $("select[name$=Country1]").append("<option value='CC0'>Cayman Brac</option>");
    $("select[name$=Country1]").append("<option value='CF0'>Central African Republic</option>");
    $("select[name$=Country1]").append("<option value='CD0'>Chad</option>");
    $("select[name$=Country1]").append("<option value='CL0'>Chile</option>");

    $("select[name$=Country1]").append("<option value='CN0'>China</option>");
    $("select[name$=Country1]").append("<option value='CO0'>Colombia</option>");
    $("select[name$=Country1]").append("<option value='CJ0'>Comores</option>");
    $("select[name$=Country1]").append("<option value='ZM0'>Congo D.R</option>");
    $("select[name$=Country1]").append("<option value='CK0'>Cook Islands (Raratonga)</option>");
    $("select[name$=Country1]").append("<option value='CR0'>Costa Rica</option>");

    $("select[name$=Country1]").append("<option value='HR0'>Croatia</option>");
    $("select[name$=Country1]").append("<option value='AN0'>Curacao</option>");
    $("select[name$=Country1]").append("<option value='CY0'>Cyprus</option>");
    $("select[name$=Country1]").append("<option value='CS0'>Czech Republic</option>");
    $("select[name$=Country1]").append("<option value='DK0'>Denmark</option>");
    $("select[name$=Country1]").append("<option value='DO0'>Dominican Republic</option>");

    $("select[name$=Country1]").append("<option value='EC0'>Ecuador</option>");
    $("select[name$=Country1]").append("<option value='EG0'>Egypt</option>");
    $("select[name$=Country1]").append("<option value='EL0'>El Salvador</option>");
    $("select[name$=Country1]").append("<option value='EQ0'>Equatorial Guinea</option>");
    $("select[name$=Country1]").append("<option value='EE0'>Estonia</option>");
    $("select[name$=Country1]").append("<option value='ET0'>Ethiopia</option>");

    $("select[name$=Country1]").append("<option value='FO0'>Faroe Isles</option>");
    $("select[name$=Country1]").append("<option value='FJ0'>Fiji Islands</option>");
    $("select[name$=Country1]").append("<option value='FI0'>Finland</option>");
    $("select[name$=Country1]").append("<option value='FR1'>France Corse</option>");
    $("select[name$=Country1]").append("<option value='FR0'>France Mainland</option>");
    $("select[name$=Country1]").append("<option value='FG0'>French Guiana</option>");

    $("select[name$=Country1]").append("<option value='TA0'>French Polynesia (Tahiti)</option>");
    $("select[name$=Country1]").append("<option value='GA0'>Gabon</option>");
    $("select[name$=Country1]").append("<option value='GM0'>Gambia</option>");
    $("select[name$=Country1]").append("<option value='GE0'>Georgia</option>");
    $("select[name$=Country1]").append("<option value='DE0'>Germany</option>");
    $("select[name$=Country1]").append("<option value='GH0'>Ghana</option>");

    $("select[name$=Country1]").append("<option value='GI0'>Gibraltar</option>");
    $("select[name$=Country1]").append("<option value='CT0'>Grand Cayman</option>");
    $("select[name$=Country1]").append("<option value='GR3'>Greece Aegean Islands</option>");
    $("select[name$=Country1]").append("<option value='GR1'>Greece Corfu</option>");
    $("select[name$=Country1]").append("<option value='GR2'>Greece Crete</option>");
    $("select[name$=Country1]").append("<option value='GR4'>Greece Ionian Islands</option>");

    $("select[name$=Country1]").append("<option value='GR0'>Greece Mainland</option>");
    $("select[name$=Country1]").append("<option value='GR6'>Greece Rhodes</option>");
    $("select[name$=Country1]").append("<option value='GD0'>Grenada</option>");
    $("select[name$=Country1]").append("<option value='GP0'>Guadaloupe</option>");
    $("select[name$=Country1]").append("<option value='GU0'>Guam</option>");
    $("select[name$=Country1]").append("<option value='GT0'>Guatemala</option>");

    $("select[name$=Country1]").append("<option value='GN0'>Guinea</option>");
    $("select[name$=Country1]").append("<option value='HT0'>Haiti</option>");
    $("select[name$=Country1]").append("<option value='HD0'>Honduras</option>");
    $("select[name$=Country1]").append("<option value='HK0'>Hongkong</option>");
    $("select[name$=Country1]").append("<option value='HU0'>Hungary</option>");
    $("select[name$=Country1]").append("<option value='IS0'>Iceland</option>");

    $("select[name$=Country1]").append("<option value='IN0'>India</option>");
    $("select[name$=Country1]").append("<option value='ID0'>Indonesia</option>");
    $("select[name$=Country1]").append("<option value='IE0'>Ireland</option>");
    $("select[name$=Country1]").append("<option value='IL0'>Israel</option>");
    $("select[name$=Country1]").append("<option value='IT0'>Italy Mainland</option>");
    $("select[name$=Country1]").append("<option value='IT2'>Italy Sardinia</option>");

    $("select[name$=Country1]").append("<option value='IT1'>Italy Sicily</option>");
    $("select[name$=Country1]").append("<option value='CI0'>Ivory Coast</option>");
    $("select[name$=Country1]").append("<option value='JO0'>Jordan</option>");
    $("select[name$=Country1]").append("<option value='KZ0'>Kazakhstan</option>");
    $("select[name$=Country1]").append("<option value='KE0'>Kenya</option>");
    $("select[name$=Country1]").append("<option value='KP0'>Korea</option>");

    $("select[name$=Country1]").append("<option value='KW0'>Kuwait</option>");
    $("select[name$=Country1]").append("<option value='LV0'>Latvia</option>");
    $("select[name$=Country1]").append("<option value='LB0'>Lebanon</option>");
    $("select[name$=Country1]").append("<option value='LS0'>Lesotho</option>");
    $("select[name$=Country1]").append("<option value='LT0'>Lithuania</option>");
    $("select[name$=Country1]").append("<option value='LU0'>Luxembourg</option>");

    $("select[name$=Country1]").append("<option value='MK0'>Macau</option>");
    $("select[name$=Country1]").append("<option value='QM0'>Macedonia</option>");
    $("select[name$=Country1]").append("<option value='MG0'>Madagascar</option>");
    $("select[name$=Country1]").append("<option value='PT1'>Madeira Madeira</option>");
    $("select[name$=Country1]").append("<option value='MW0'>Malawi</option>");
    $("select[name$=Country1]").append("<option value='MY0'>Malaysia</option>");

    $("select[name$=Country1]").append("<option value='ML0'>Mali</option>");
    $("select[name$=Country1]").append("<option value='MT0'>Malta &amp; Gozo</option>");
    $("select[name$=Country1]").append("<option value='MQ0'>Martinique</option>");
    $("select[name$=Country1]").append("<option value='MU0'>Mauritius</option>");
    $("select[name$=Country1]").append("<option value='MX0'>Mexico</option>");

    $("select[name$=Country1]").append("<option value='MD0'>Moldova</option>");
    $("select[name$=Country1]").append("<option value='MA0'>Morocco</option>");
    $("select[name$=Country1]").append("<option value='MZ0'>Mozambique</option>");
    $("select[name$=Country1]").append("<option value='SW0'>Namibia</option>");
    $("select[name$=Country1]").append("<option value='NE0'>Nepal</option>");
    $("select[name$=Country1]").append("<option value='NL0'>Netherlands</option>");

    $("select[name$=Country1]").append("<option value='NC0'>New Caledonia</option>");
    $("select[name$=Country1]").append("<option value='NZ0'>New Zealand</option>");
    $("select[name$=Country1]").append("<option value='NG0'>Nigeria</option>");
    $("select[name$=Country1]").append("<option value='NO0'>Norway</option>");
    $("select[name$=Country1]").append("<option value='OM0'>Oman</option>");
    $("select[name$=Country1]").append("<option value='PK0'>Pakistan</option>");

    $("select[name$=Country1]").append("<option value='PA0'>Panama</option>");
    $("select[name$=Country1]").append("<option value='NU0'>Papua New Guinea</option>");
    $("select[name$=Country1]").append("<option value='PE0'>Peru</option>");
    $("select[name$=Country1]").append("<option value='PH0'>Philippines</option>");
    $("select[name$=Country1]").append("<option value='PL0'>Poland</option>");
    $("select[name$=Country1]").append("<option value='PT0'>Portugal Mainland</option>");

    $("select[name$=Country1]").append("<option value='PR0'>Puerto Rico</option>");
    $("select[name$=Country1]").append("<option value='QA0'>Qatar</option>");
    $("select[name$=Country1]").append("<option value='RI0'>Reunion Island</option>");
    $("select[name$=Country1]").append("<option value='RO0'>Romania</option>");
    $("select[name$=Country1]").append("<option value='RU0'>Russia</option>");
    $("select[name$=Country1]").append("<option value='AS0'>Samoa</option>");

    $("select[name$=Country1]").append("<option value='SA0'>Saudi Arabia</option>");
    $("select[name$=Country1]").append("<option value='SN0'>Senegal</option>");
    $("select[name$=Country1]").append("<option value='SC0'>Seychelles</option>");
    $("select[name$=Country1]").append("<option value='SG0'>Singapore</option>");
    $("select[name$=Country1]").append("<option value='QV0'>Slovak Republic</option>");
    $("select[name$=Country1]").append("<option value='QS0'>Slovenia</option>");

    $("select[name$=Country1]").append("<option value='SI0'>Solomon Islands</option>");
    $("select[name$=Country1]").append("<option value='ZA0'>South Africa</option>");
    $("select[name$=Country1]").append("<option value='ES1'>Spain Balearic Islands</option>");
    $("select[name$=Country1]").append("<option value='ES2'>Spain Canary Islands</option>");
    $("select[name$=Country1]").append("<option value='ES0'>Spain Mainland</option>");
    $("select[name$=Country1]").append("<option value='LK0'>Sri Lanka</option>");

    $("select[name$=Country1]").append("<option value='BY0'>St.Barthelemy</option>");
    $("select[name$=Country1]").append("<option value='JN0'>St. John</option>");
    $("select[name$=Country1]").append("<option value='LC0'>St. Lucia</option>");
    $("select[name$=Country1]").append("<option value='ZY0'>St. Maarten</option>");
    $("select[name$=Country1]").append("<option value='VC0'>St. Vincent</option>");
    $("select[name$=Country1]").append("<option value='SR0'>Suriname</option>");

    $("select[name$=Country1]").append("<option value='SZ0'>Swaziland</option>");
    $("select[name$=Country1]").append("<option value='SE0'>Sweden</option>");
    $("select[name$=Country1]").append("<option value='CH0'>Switzerland</option>");
    $("select[name$=Country1]").append("<option value='SY0'>Syria</option>");
    $("select[name$=Country1]").append("<option value='TZ0'>Tanzania</option>");
    $("select[name$=Country1]").append("<option value='TH0'>Thailand</option>");

    $("select[name$=Country1]").append("<option value='TG0'>Togo</option>");
    $("select[name$=Country1]").append("<option value='TO0'>Tonga</option>");
    $("select[name$=Country1]").append("<option value='TL0'>Tortola</option>");
    $("select[name$=Country1]").append("<option value='TN0'>Tunisia</option>");
    $("select[name$=Country1]").append("<option value='TR0'>Turkey</option>");
    $("select[name$=Country1]").append("<option value='TC0'>Turks &amp; Caicos Islands</option>");

    $("select[name$=Country1]").append("<option value='UA0'>Ukraine</option>");
    $("select[name$=Country1]").append("<option value='UE0'>United Arab Emirates</option>");
    $("select[name$=Country1]").append("<option value='GB2'>United Kingdom Guernsey</option>");
    $("select[name$=Country1]").append("<option value='GB4'>United Kingdom Isle Of Man</option>");
    $("select[name$=Country1]").append("<option value='GB1'>United Kingdom Jersey</option>");
    $("select[name$=Country1]").append("<option value='GB0'>United Kingdom Mainland</option>");

    $("select[name$=Country1]").append("<option value='GB3'>United Kingdom Northern Ireland</option>");
    $("select[name$=Country1]").append("<option value='GB5'>United Kingdom Orkney Isles</option>");
    $("select[name$=Country1]").append("<option value='GB6'>United Kingdom Shetland Isles</option>");
    $("select[name$=Country1]").append("<option value='US'>United States - all states -</option>");
    $("select[name$=Country1]").append("<option value='USAL'>United States Alabama</option>");
    $("select[name$=Country1]").append("<option value='USAK'>United States Alaska</option>");

    $("select[name$=Country1]").append("<option value='USAZ'>United States Arizona</option>");
    $("select[name$=Country1]").append("<option value='USAR'>United States Arkansas</option>");
    $("select[name$=Country1]").append("<option value='USCA'>United States California</option>");
    $("select[name$=Country1]").append("<option value='USCO'>United States Colorado</option>");
    $("select[name$=Country1]").append("<option value='USCT'>United States Conneticut</option>");
    $("select[name$=Country1]").append("<option value='USDE'>United States Delaware</option>");

    $("select[name$=Country1]").append("<option value='USDC'>United States District Of Columbia</option>");
    $("select[name$=Country1]").append("<option value='USFL'>United States lorida</option>");
    $("select[name$=Country1]").append("<option value='USGA'>United States Georgia</option>");
    $("select[name$=Country1]").append("<option value='USHI'>United States Hawaii</option>");
    $("select[name$=Country1]").append("<option value='USID'>United  States Idaho</option>");
    $("select[name$=Country1]").append("<option value='USIL'>United States Illinois</option>");

    $("select[name$=Country1]").append("<option value='USIN'>United States Indiana</option>");
    $("select[name$=Country1]").append("<option value='USIA'>UnitedStates Iowa</option>");
    $("select[name$=Country1]").append("<option value='USKS'>United States Kansas</option>");
    $("select[name$=Country1]").append("<option value='USKY'>United States Kentucky</option>");
    $("select[name$=Country1]").append("<option value='USLA'>United States Louisiana</option>");
    $("select[name$=Country1]").append("<option value='USME'>United States Maine</option>");

    $("select[name$=Country1]").append("<option value='USMD'>United States Maryland</option>");
    $("select[name$=Country1]").append("<option value='USMA'>United States Massachusetts</option>");
    $("select[name$=Country1]").append("<option value='USMI'>United States Michigan</option>");
    $("select[name$=Country1]").append("<option value='USMN'>United States Minnesota</option>");
    $("select[name$=Country1]").append("<option value='USMS'>United States Mississippi</option>");
    $("select[name$=Country1]").append("<option value='USMO'>United States Missouri</option>");

    $("select[name$=Country1]").append("<option value='USMT'>United States Montana</option>");
    $("select[name$=Country1]").append("<option value='USNE'>United States Nebraska</option>");
    $("select[name$=Country1]").append("<option value='USNV'>United States Nevada</option>");
    $("select[name$=Country1]").append("<option value='USNH'>United States New Hampshire</option>");
    $("select[name$=Country1]").append("<option value='USNJ'>United States New Jersey</option>");
    $("select[name$=Country1]").append("<option value='USNM'>United States New Mexico</option>");

    $("select[name$=Country1]").append("<option value='USNY'>United States New York</option>");
    $("select[name$=Country1]").append("<option value='USNC'>United States North Carolina</option>");
    $("select[name$=Country1]").append("<option value='USND'>United States North Dakota</option>");
    $("select[name$=Country1]").append("<option value='USOH'>United States Ohio</option>");
    $("select[name$=Country1]").append("<option value='USOK'>United States Oklahoma</option>");
    $("select[name$=Country1]").append("<option value='USOR'>United States Oregon</option>");

    $("select[name$=Country1]").append("<option value='USPA'>United States Pennsylvania</option>");
    $("select[name$=Country1]").append("<option value='USRI'>United States Rhode Island</option>");
    $("select[name$=Country1]").append("<option value='USSC'>United States South Carolina</option>");
    $("select[name$=Country1]").append("<option value='USSD'>United States South Dakotana</option>");
    $("select[name$=Country1]").append("<option value='USTN'>United States Tennessee</option>");
    $("select[name$=Country1]").append("<option value='USTX'>United States Texas</option>");

    $("select[name$=Country1]").append("<option value='USUT'>United States Utah</option>");
    $("select[name$=Country1]").append("<option value='USVT'>United States Vermont</option>");
    $("select[name$=Country1]").append("<option value='USVA'>UnitedStates Virginia</option>");
    $("select[name$=Country1]").append("<option value='USWA'>United States Washington</option>");
    $("select[name$=Country1]").append("<option value='USWV'>United States West Virginia</option>");
    $("select[name$=Country1]").append("<option value='USWI'>United States Wisconsin</option>");

    $("select[name$=Country1]").append("<option value='USWY'>United States Wyoming</option>");
    $("select[name$=Country1]").append("<option value='UY0'>Uruguay</option>");
    $("select[name$=Country1]").append("<option value='NH0'>Vanuata</option>");
    $("select[name$=Country1]").append("<option value='VE0'>Venezuela</option>");
    $("select[name$=Country1]").append("<option value='WS0'>Western Samoa</option>");
    $("select[name$=Country1]").append("<option value='YU0'>Yugoslavia</option>");

    $("select[name$=Country1]").append("<option value='ZB0'>Zambia</option>");
    $("select[name$=Country1]").append("<option value='KF0'>Zimbabwe</option>");
}
 
