var xmlHttp;
function JS_Pr()
{
	//alert(document.Form1.ddlType1.value);
	var Pid = document.getElementById("ddlType1").value;
	var url="/cacs/anjian/test.aspx?id="+Pid;
	if(window.ActiveXObject)
	{
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if(window.XMLHttpRequest)
	{
		xmlHttp=new XMLHttpRequest();
	}
	
	xmlHttp.onreadystatechange = showCity;	
	xmlHttp.open("get",url,true);
	xmlHttp.send(null);
	return false;
}
function JS_Pr1()
{
	var Pid = document.getElementById("ddlType1CY").value;
	var url="/cacs/anjian/test.aspx?id="+Pid;
	if(window.ActiveXObject)
	{
		xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");
	}
	else if(window.XMLHttpRequest)
	{
		xmlHttp=new XMLHttpRequest();
	}
	
	xmlHttp.onreadystatechange = showCity1;	
	xmlHttp.open("get",url,true);
	xmlHttp.send(null);
	return false;
}
function showCity()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
		
			var str=new String();
			str=xmlHttp.responseText;
			document.getElementById("ddlType2").options.length = 0;
			document.getElementById("ddltype2").options[0]=new Option("ÇëÑ¡Ôñ",0);		
			var city=str.split("*");
			for(i=0;i<city.length;i++)
			{
				var city1=city[i].split("/");
				if(city1 != '')
				{
					//document.getElementById("ddlType2").options.length =city.length;
					document.getElementById("ddlType2").options[i]=new Option(city1[0],city1[1]);			
				}
			}
		}
	}
}
function showCity1()
{
	if(xmlHttp.readyState==4)
	{
		if(xmlHttp.status==200)
		{
		
			var str=new String();
			str=xmlHttp.responseText;
			document.getElementById("ddlType2CY").options.length = 0;
			document.getElementById("ddlType2CY").options[0]=new Option("ÇëÑ¡Ôñ",0);		
			var city=str.split("*");
			for(i=0;i<city.length;i++)
			{
				var city1=city[i].split("/");
				if(city1 != '')
				{
					document.getElementById("ddlType2CY").options[i]=new Option(city1[0],city1[1]);			
				}
			}
		}
	}
}
function JS_Ci()
{
	for(i=0;i<document.forms[0].ddlType2.options.length;i++)
	{
		if(document.forms[0].ddlType2.options[i].selected)
		{		
			document.getElementById("hcid").value=document.forms[0].ddlType2.options[i].value
		}
	}
}
function JS_Ci1()
{
	for(i=0;i<document.forms[0].ddlType2CY.options.length;i++)
	{
		if(document.forms[0].ddlType2CY.options[i].selected)
		{		
			document.getElementById("hcid1").value=document.forms[0].ddlType2CY.options[i].value
		}
	}
}
