
//判断浏览器
function createXMLHttp()
{
    var request = false;
    if (window.XMLHttpRequest){ request = new XMLHttpRequest(); }
    else if (window.ActiveXObject) 
    {
       try{ request = new ActiveXObject("MSXML2.XMLHTTP"); } 
       catch (e1) 
       {
         try{ request = new ActiveXObject("Microsoft.XMLHTTP"); } 
         catch (e2){ request = false; }
       }
    }
    return request;
}

	//以XML求取ddl_HomePlaceCity的数据
	function XmlPost_HomePlaceCity(obj)
    {
		var svalue = obj.value;
		var webFileUrl = "?homeplaceid=" + svalue;
		var resulthome = "";
		var xmlHttp2 = createXMLHttp();
		xmlHttp2.open("POST", webFileUrl, false);
		xmlHttp2.send("");
		resulthome = xmlHttp2.responseText;
				　　
		if(resulthome != "")
		{
			document.getElementById("ddl_HomePlaceCity").length=0;
			var piArray = resulthome.split(",");
			for(var i=0;i<piArray.length;i++)
			{
				var ary = piArray[i].toString().split("|");
				document.getElementById("ddl_HomePlaceCity").options.add(new Option(ary[1].toString(),ary[0].toString()));
			}
			document.getElementById("hid_HomePlaceCity").value = document.getElementById("ddl_HomePlaceCity").options[document.getElementById("ddl_HomePlaceCity").selectedIndex].value
		}
		else
		{
			alert(resulthome);
		}
	}
	
	 //以XML求取ddl_WishJob的数据
	function XmlPost_WishJob(obj)
    {
		var svalue = obj.value;
		var webFileUrl = "?wishjobid=" + svalue;
		var result = "";
		var xmlHttp = createXMLHttp();
		xmlHttp.open("POST", webFileUrl, false);
		xmlHttp.send("");
		result = xmlHttp.responseText;		　　
		if(result != "")
		{
			document.getElementById("ddl_WishJob").length=0;
			var piArray = result.split(",");
			for(var i=0;i<piArray.length;i++)
			{
				var ary = piArray[i].toString().split("|");
				document.getElementById("ddl_WishJob").options.add(new Option(ary[1].toString(),ary[0].toString()));
			}
			document.getElementById("hid_WishJob").value = document.getElementById("ddl_WishJob").options[document.getElementById("ddl_WishJob").selectedIndex].value;
		}
		else
		{ alert(result);}
	}
	
	//以XML求取ddl_WishWorkPlaceCity的数据
	function XmlPost_WishWorkPlaceCity(obj)
    {
		var svalue = obj.value;
		var webFileUrl = "?provinceid=" + svalue;
		var result = "";
		var xmlHttp = createXMLHttp();
		xmlHttp.open("POST", webFileUrl, false);
		xmlHttp.send("");
		result = xmlHttp.responseText;
				　　
		if(result != "")
		{
			document.getElementById("ddl_WishWorkPlaceCity").length=0;
			var piArray = result.split(",");
			for(var i=0;i<piArray.length;i++)
			{
				var ary = piArray[i].toString().split("|");
				document.getElementById("ddl_WishWorkPlaceCity").options.add(new Option(ary[1].toString(),ary[0].toString()));
			}
			document.getElementById("hid_WishWorkPlaceCity").value = document.getElementById("ddl_WishWorkPlaceCity").options[document.getElementById("ddl_WishWorkPlaceCity").selectedIndex].value;
		}
		else
		{
			alert(result);
		}
	}
