
var selectTitle="选择省份";var areaObj=null;var provinceId=0;var cityId=0;function initAreaObj(changeEvent,className1,className2,mark,midHtml)
{if(mark==1)
{if(changeEvent!=null)
document.write("<select id=\"selProvince\" onchange=\"getCityInfo1();"+changeEvent+"();\" class=\""+className1+"\">");else
document.write("<select id=\"selProvince\" onchange=\"getCityInfo1();\" class=\""+className1+"\">");document.write("<option value=\"0\">选择省份</option>");document.write("</select>");document.write(midHtml);if(changeEvent!=null)
document.write("<select id=\"selCity\" onchange=\""+changeEvent+"();\" class=\""+className2+"\">");else
document.write("<select id=\"selCity\" class=\""+className2+"\">");document.write("<option value=\"0\">选择城市</option>");document.write("</select>");}
else if(mark==2)
{if(changeEvent!=null)
document.write("<select id=\"selProvince\" onchange=\"getCityInfo2();"+changeEvent+"();\" class=\""+className1+"\">");else
document.write("<select id=\"selProvince\" onchange=\"getCityInfo2();\" class=\""+className1+"\">");document.write("<option value=\"0\">选择省份</option>");document.write("</select>");document.write(midHtml);if(changeEvent!=null)
document.write("<select id=\"selCity\" onchange=\""+changeEvent+"();\" class=\""+className2+"\">");else
document.write("<select id=\"selCity\" class=\""+className2+"\">");document.write("<option value=\"0\">选择城市</option>");document.write("</select>");}
else
{if(changeEvent!=null)
document.write("<select id=\"selProvince\" onchange=\"getCityInfo3();"+changeEvent+"();\" class=\""+className1+"\">");else
document.write("<select id=\"selProvince\" onchange=\"getCityInfo3();\" class=\""+className1+"\">");document.write("<option value=\"0\">Province</option>");document.write("</select>");document.write(midHtml);if(changeEvent!=null)
document.write("<select id=\"selCity\" onchange=\""+changeEvent+"();\" class=\""+className2+"\">");else
document.write("<select id=\"selCity\" class=\""+className2+"\">");document.write("<option value=\"0\">--Select City--</option>");document.write("</select>");}}
function loadAreaInfo(mark)
{areaObj=$("selProvince");selectTitle="选择省份";if(mark==1)
Show.Web.Main.AjaxRequestPage.GetExProvinceInfo(callbackGetAreaInfo1);else if(mark==2)Show.Web.Main.AjaxRequestPage.GetProvinceInfo(callbackGetAreaInfo2);else
{selectTitle="--Select Province--"
Show.Web.Main.AjaxRequestPage.GetEnglishProvinceInfo(callbackGetAreaInfo3);}}
function getCityInfo1()
{var provinceValue=$("selProvince").value.split(":");if(provinceValue[1]+""!="6")
{areaObj=$("selCity");selectTitle="选择城市";Show.Web.Main.AjaxRequestPage.GetProvinceOrCityInfo(provinceValue[0]+"",callbackGetAreaInfo1);}}
function getCityInfo2()
{var provinceValue=$("selProvince").value;if(provinceValue>=0)
{areaObj=$("selCity");selectTitle="选择城市";Show.Web.Main.AjaxRequestPage.GetProvinceOrCityInfo(provinceValue+"",callbackGetAreaInfo2);}}
function getCityInfo3()
{var provinceValue=$("selProvince").value;if(provinceValue>=0)
{areaObj=$("selCity");selectTitle="--Selected City--";Show.Web.Main.AjaxRequestPage.GetEnglishProvinceOrCityInfo(provinceValue+"",callbackGetAreaInfo3);}}
function callbackGetAreaInfo1(res)
{if(areaObj==null||res.value==null)
return;areaObj.options.length=0;areaObj.options.add(new Option(selectTitle,"0"));var value="0";var arrArea=res.value.split(",");for(var i=0;i<arrArea.length;i++)
{var optArr=arrArea[i].split("|");if(optArr.length>1)
{areaObj.options.add(new Option(optArr[0],optArr[1]));if(selectTitle=="选择省份")
{areaObj.options[i].value+=":"+optArr[2];if(optArr[1]+""==provinceId)
{areaObj.options[areaObj.options.length-1].selected=true;value=provinceId;}}
else if(selectTitle=="选择城市")
{if(optArr[1]+""==cityId)
{areaObj.options[areaObj.options.length-1].selected=true;value=cityId;}}}}
if(selectTitle=="选择省份")
getCityInfo1();}
function callbackGetAreaInfo2(res)
{if(areaObj==null||res.value==null)
return;areaObj.options.length=0;areaObj.options.add(new Option(selectTitle,"0"));var value="0";var arrArea=res.value.split(",");for(var i=0;i<arrArea.length;i++)
{var optArr=arrArea[i].split("|");if(optArr.length>1)
{areaObj.options.add(new Option(optArr[0],optArr[1]));if(selectTitle=="选择省份")
{if(optArr[1]+""==provinceId)
{areaObj.options[areaObj.options.length-1].selected=true;value=provinceId;}}
else if(selectTitle=="选择城市")
{if(optArr[1]+""==cityId)
{areaObj.options[areaObj.options.length-1].selected=true;value=cityId;}}}}
if(selectTitle=="选择省份")
getCityInfo2();}
function callbackGetAreaInfo3(res)
{if(areaObj==null||res.value==null)
return;areaObj.options.length=0;areaObj.options.add(new Option(selectTitle,"0"));var value="0";var arrArea=res.value.split(",");for(var i=0;i<arrArea.length;i++)
{var optArr=arrArea[i].split("|");if(optArr.length>1)
{areaObj.options.add(new Option(optArr[0],optArr[1]));if(selectTitle=="--Select Province--")
{if(optArr[1]+""==provinceId)
{areaObj.options[areaObj.options.length-1].selected=true;value=provinceId;}}
else if(selectTitle=="--Selected City--")
{if(optArr[1]+""==cityId)
{areaObj.options[areaObj.options.length-1].selected=true;value=cityId;}}}}
if(selectTitle=="--Select Province--")
getCityInfo3();}