function cityidChange(cityid) {
    if (cityid != "-1") {
        cityChange(cityid);
    }
}
function cityChange(cityid) {
    var countryid = document.getElementById("countryid_").innerHTML;
    var provinceid = document.getElementById("provinceid_").innerHTML;
    send_cityid("/member/getdistrict.aspx?provinceid=" + provinceid + "&cityid=" + cityid);
    document.getElementById("cityid_").innerHTML = cityid;
}
var http_cityid = false;
function send_cityid(url) {
    http_cityid = false;
    if (window.XMLHttpRequest) {
        http_cityid = new XMLHttpRequest();
        if (http_cityid.overrideMimeType) {
            http_cityid.overrideMimeType("text/html");
        }
    }
    else if (window.ActiveXObject) {
        try {
            http_cityid = new ActiveXObject("Xsxml2.XMLHTTP");
            http_cityid.setRequestHeader("Content-Type", "text/xml");
            http_cityid.setRequestHeader("Content-Type", "utf-8");
        }
        catch (e) {
            try {
                http_cityid = new ActiveXObject("Microsoft.XMLHTTP");
                http_cityid.setRequestHeader("Content-Type", "text/xml");
                http_cityid.setRequestHeader("Content-Type", "utf-8");
            } catch (e) { }
        }
    }
    if (!http_cityid) { return false; alert('false.'); }
    http_cityid.onreadystatechange = cityidprocessRequest;
    http_cityid.open("get", url, true); http_cityid.send(null);
}
function cityidprocessRequest() {
    if (http_cityid.readyState == 4) {
        if (http_cityid.status == 200) {
            var ret = http_cityid.responseText;
            var ret_array, city_array;
            document.getElementById("districtid").options.length = 0;
            if (ret.indexOf('∨') != -1) {
                ret_array = ret.split("∨");
                for (var i = 0; i < ret_array.length; i++) {
                    city_array = ret_array[i].split("∧");
                    document.getElementById("districtid").options.add(new Option(city_array[1], city_array[0]));
                }
            }
        }
        else {
            alert("程序调用失败!");
        }
    }
}
function provinceidChange(provinceid) {
    if (provinceid != "-1") {
        provinceChange(provinceid);
    }
}
function provinceChange(provinceid) {
    var countryid = document.getElementById("countryid_").innerHTML;
    send_provinceid("/member/getcity.aspx?provinceid=" + provinceid);
    document.getElementById("provinceid_").innerHTML = provinceid;
}
var http_provinceid = false;
function send_provinceid(url) {
    http_provinceid = false;
    if (window.XMLHttpRequest) {
        http_provinceid = new XMLHttpRequest();
        if (http_provinceid.overrideMimeType) {
            http_provinceid.overrideMimeType("text/html");
        }
    }
    else if (window.ActiveXObject) {
        try {
            http_provinceid = new ActiveXObject("Xsxml2.XMLHTTP");
            http_provinceid.setRequestHeader("Content-Type", "text/xml");
            http_provinceid.setRequestHeader("Content-Type", "utf-8");
        }
        catch (e) {
            try {
                http_provinceid = new ActiveXObject("Microsoft.XMLHTTP");
                http_provinceid.setRequestHeader("Content-Type", "text/xml");
                http_provinceid.setRequestHeader("Content-Type", "utf-8");
            } catch (e) { }
        }
    }
    if (!http_provinceid) { return false; alert('false.'); }
    http_provinceid.onreadystatechange = provinceidprocessRequest;
    http_provinceid.open("get", url, true); http_provinceid.send(null);
}
function provinceidprocessRequest() {
    if (http_provinceid.readyState == 4) {
        if (http_provinceid.status == 200) {
            var ret = http_provinceid.responseText;
            var ret_array, province_array;
            document.getElementById("cityid").options.length = 0;
            document.getElementById("districtid").options.length = 0;
            if (ret.indexOf('∨') != -1) {
                ret_array = ret.split("∨");
                for (var i = 0; i < ret_array.length; i++) {
                    province_array = ret_array[i].split("∧");
                    document.getElementById("cityid").options.add(new Option(province_array[1], province_array[0]));
                }
            }
        }
        else {
            alert("程序调用失败!");
        }
    }
}
function countryidChange(countryid) {
    if (countryid != "-1") {
        countryChange(countryid);
    }
}
function countryChange(countryid) {
    send_countryid("/member/getprovince.aspx?countryid=" + countryid);
    document.getElementById("countryid_").innerHTML = countryid;
}
var http_countryid = false;
function send_countryid(url) {
    http_countryid = false;
    if (window.XMLHttpRequest) {
        http_countryid = new XMLHttpRequest();
        if (http_countryid.overrideMimeType) {
            http_countryid.overrideMimeType("text/html");
        }
    }
    else if (window.ActiveXObject) {
        try {
            http_countryid = new ActiveXObject("Xsxml2.XMLHTTP");
            http_countryid.setRequestHeader("Content-Type", "text/xml");
            http_countryid.setRequestHeader("Content-Type", "utf-8");
        }
        catch (e) {
            try {
                http_countryid = new ActiveXObject("Microsoft.XMLHTTP");
                http_countryid.setRequestHeader("Content-Type", "text/xml");
                http_countryid.setRequestHeader("Content-Type", "utf-8");
            } catch (e) { }
        }
    }
    if (!http_countryid) { return false; alert('false.'); }
    http_countryid.onreadystatechange = countryidprocessRequest;
    http_countryid.open("get", url, true); http_countryid.send(null);
}
function countryidprocessRequest() {
    if (http_countryid.readyState == 4) {
        if (http_countryid.status == 200) {
            var ret = http_countryid.responseText;
            var ret_array, province_array;
            document.getElementById("provinceid").options.length = 0;
            document.getElementById("cityid").options.length = 0;
            document.getElementById("districtid").options.length = 0;
            if (ret.indexOf('∨') != -1) {
                ret_array = ret.split("∨");
                for (var i = 0; i < ret_array.length; i++) {
                    province_array = ret_array[i].split("∧");
                    document.getElementById("provinceid").options.add(new Option(province_array[1], province_array[0]));
                }
            }
        }
        else {
            alert("程序调用失败!");
        }
    }
}