﻿function GetCityName(obj,cityid)
				{   
					var objs=$(obj);
					var strpost = "{'cityId':'"+cityid+"'}";
					var ajaxCity = new Ajax(objs,"","/WebService/JSON/WsPosition.asmx/GetCityName",2,strpost,function(rexm){CtiyCallBack(objs, rexm)});
					ajaxCity.post();
				}
				function CtiyCallBack(obj,rexm)
				{
					 
					 var data = eval("(" + rexm + ")");
					 SetCookie('city', data.CityId);
					 obj.innerHTML=data.Name;
				}
				function GetDistricts(obj, cityId)
				{   
					var objs = $(obj);
					var strpost = "{'cityId':'"+cityId+"'}";
					var ajaxdistrict = new Ajax(null,"","/WebService/WsPieceSelect.asmx/GetDistrictsByCityId",2,strpost,function(rexm){GetDistrictsSuccessCallBack(objs, rexm)});
					ajaxdistrict.post();
				}

				function GetDistrictsSuccessCallBack(obj, rexm){
					var data = eval("(" + rexm + ")");
					var arealist = "";
					obj.options[0] = new Option("区县", -1);
					for(var i=0;i<data.length;i++){
						obj.options[i+1] = new Option(data[i].Key, data[i].Value);
					}
				}
				function GetPieceSections(obj, districtId)
				{   
					var objs = $(obj);
					var strpost = "{'districtId':'"+districtId+"'}";
					var ajaxpiece = new Ajax(null,"","/WebService/WsPieceSelect.asmx/GetSectionByDistrictId",2,strpost,function(rexm){GetPieceSectionsSuccessCallBack(objs, rexm)});
					ajaxpiece.post();
				}

				function GetPieceSectionsSuccessCallBack(obj, rexm){
					var data = eval("(" + rexm + ")");
					obj.options.length=0;
					obj.options[0] = new Option("片区", -1);
					for(var i=0;i<data.length;i++){
					obj.options[i+1] = new Option(data[i].Key, data[i].Value);
					}
				}
				function _out() {
					var context = 'eval(result.LoginUrl)';
					AsynData(null,'','/HtmlContent/House/Out.aspx', '',2,'',context);
				}
