// JavaScript Document
function city1(x){	
   if(x==""){
   	  document.getElementById("chu_shi_id").options.length=0;
      return;
   }
   //alert(x);
   var xmlhttp;
   
   if (window.ActiveXObject) {//IE浏览器
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   else if(window.XMLHttpRequest) {//非IE浏览器
      xmlhttp=new XMLHttpRequest();
   }
   if (xmlhttp) {
        xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
		 		if(xmlhttp.status==200){
					var str=unescape(xmlhttp.responseText);
					//清空原下拉框
              		document.getElementById("chu_shi_id").options.length=0;           
              		 //str为返回的是一个字符串
              		//将该字符串分割为数组形式
               		var strs=str.split(",");
               		for(var i=0;i<strs.length;i++)
               		{
						//获取value值
						var a=strs[i].substring(0,strs[i].lastIndexOf("/"));
                		//获取绑定内容
                		var b=strs[i].substring(strs[i].lastIndexOf("/")+1,strs[i].length);
                		//绑定到下拉框
                		document.getElementById("chu_shi_id").options.add(new Option(b,a));
						//if(b=<%=chu_shi_id%>)
							//document.getElementById("chu_shi_id").options[i].selected;
					}
				}
				else{
					alert("error");
                }
          	}
   }  
   xmlhttp.open("post","city1.asp?sheng_id="+x,false);//为什么不管用POST还是GET都好像没区别.
   //xmlhttp.open("post","page.asp?page="+y);不带第三个参数表示使用默认值,这样写好像效果一样
   xmlhttp.send(null);
   }          
}





function city5(x){	
   if(x==""){
   	  document.getElementById("jiudian_shi_id").options.length=0;
      return;
   }
   //alert(x);
   var xmlhttp;
   
   if (window.ActiveXObject) {//IE浏览器
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   else if(window.XMLHttpRequest) {//非IE浏览器
      xmlhttp=new XMLHttpRequest();
   }
   if (xmlhttp) {
        xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
		 		if(xmlhttp.status==200){
					var str=unescape(xmlhttp.responseText);
					//清空原下拉框
              		document.getElementById("jiudian_shi_id").options.length=0;           
              		 //str为返回的是一个字符串
              		//将该字符串分割为数组形式
               		var strs=str.split(",");
               		for(var i=0;i<strs.length;i++)
               		{
						//获取value值
						var a=strs[i].substring(0,strs[i].lastIndexOf("/"));
                		//获取绑定内容
                		var b=strs[i].substring(strs[i].lastIndexOf("/")+1,strs[i].length);
                		//绑定到下拉框
                		document.getElementById("jiudian_shi_id").options.add(new Option(b,a));
						//if(b=<%=chu_shi_id%>)
							//document.getElementById("chu_shi_id").options[i].selected;
					}
				}
				else{
					alert("error");
                }
          	}
   }  
   xmlhttp.open("post","city1.asp?sheng_id="+x,false);//为什么不管用POST还是GET都好像没区别.
   //xmlhttp.open("post","page.asp?page="+y);不带第三个参数表示使用默认值,这样写好像效果一样
   xmlhttp.send(null);
   }          
}




function city6(x){	
   if(x==""){
   	  document.getElementById("jipiao_chu_shi_id").options.length=0;
      return;
   }
   //alert(x);
   var xmlhttp;
   
   if (window.ActiveXObject) {//IE浏览器
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   else if(window.XMLHttpRequest) {//非IE浏览器
      xmlhttp=new XMLHttpRequest();
   }
   if (xmlhttp) {
        xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
		 		if(xmlhttp.status==200){
					var str=unescape(xmlhttp.responseText);
					//清空原下拉框
              		document.getElementById("jipiao_chu_shi_id").options.length=0;           
              		 //str为返回的是一个字符串
              		//将该字符串分割为数组形式
               		var strs=str.split(",");
               		for(var i=0;i<strs.length;i++)
               		{
						//获取value值
						var a=strs[i].substring(0,strs[i].lastIndexOf("/"));
                		//获取绑定内容
                		var b=strs[i].substring(strs[i].lastIndexOf("/")+1,strs[i].length);
                		//绑定到下拉框
                		document.getElementById("jipiao_chu_shi_id").options.add(new Option(b,a));
						//if(b=<%=chu_shi_id%>)
							//document.getElementById("chu_shi_id").options[i].selected;
					}
				}
				else{
					alert("error");
                }
          	}
   }  
   xmlhttp.open("post","city1.asp?sheng_id="+x,false);//为什么不管用POST还是GET都好像没区别.
   //xmlhttp.open("post","page.asp?page="+y);不带第三个参数表示使用默认值,这样写好像效果一样
   xmlhttp.send(null);
   }          
}




function city7(x){	
   if(x==""){
   	  document.getElementById("jipiao_dao_shi_id").options.length=0;
      return;
   }
   //alert(x);
   var xmlhttp;
   
   if (window.ActiveXObject) {//IE浏览器
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   else if(window.XMLHttpRequest) {//非IE浏览器
      xmlhttp=new XMLHttpRequest();
   }
   if (xmlhttp) {
        xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
		 		if(xmlhttp.status==200){
					var str=unescape(xmlhttp.responseText);
					//清空原下拉框
              		document.getElementById("jipiao_dao_shi_id").options.length=0;           
              		 //str为返回的是一个字符串
              		//将该字符串分割为数组形式
               		var strs=str.split(",");
               		for(var i=0;i<strs.length;i++)
               		{
						//获取value值
						var a=strs[i].substring(0,strs[i].lastIndexOf("/"));
                		//获取绑定内容
                		var b=strs[i].substring(strs[i].lastIndexOf("/")+1,strs[i].length);
                		//绑定到下拉框
                		document.getElementById("jipiao_dao_shi_id").options.add(new Option(b,a));
						//if(b=<%=chu_shi_id%>)
							//document.getElementById("chu_shi_id").options[i].selected;
					}
				}
				else{
					alert("error");
                }
          	}
   }  
   xmlhttp.open("post","city1.asp?sheng_id="+x,false);//为什么不管用POST还是GET都好像没区别.
   //xmlhttp.open("post","page.asp?page="+y);不带第三个参数表示使用默认值,这样写好像效果一样
   xmlhttp.send(null);
   }          
}
















function city2(x){	
   if(x==""){
   	  document.getElementById("dao_shi_id").options.length=0;
      return;
   }
   //alert(x);
   var xmlhttp;
   
   if (window.ActiveXObject) {//IE浏览器
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   else if(window.XMLHttpRequest) {//非IE浏览器
      xmlhttp=new XMLHttpRequest();
   }
   if (xmlhttp) {
        xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
		 		if(xmlhttp.status==200){
					var str=unescape(xmlhttp.responseText);
					//清空原下拉框
              		document.getElementById("dao_shi_id").options.length=0;           
              		 //str为返回的是一个字符串
              		//将该字符串分割为数组形式
               		var strs=str.split(",");
               		for(var i=0;i<strs.length;i++)
               		{
						//获取value值
						var a=strs[i].substring(0,strs[i].lastIndexOf("/"));
                		//获取绑定内容
                		var b=strs[i].substring(strs[i].lastIndexOf("/")+1,strs[i].length);
                		//绑定到下拉框
                		document.getElementById("dao_shi_id").options.add(new Option(b,a));
						//if(a=<%=dao_shi_id%>)
							//document.getElementById("dao_shi_id").options[i].selected;
					}
				}
				else{
					alert("error");
                }
          	}
   }  
   xmlhttp.open("post","city1.asp?sheng_id="+x,false);//为什么不管用POST还是GET都好像没区别.
   //xmlhttp.open("post","page.asp?page="+y);不带第三个参数表示使用默认值,这样写好像效果一样
   xmlhttp.send(null);
   }          
}

function city3(x){	
   if(x==""){
   	  document.getElementById("shi_id").options.length=0;
      return;
   }
   //alert(x);
   var xmlhttp;
   
   if (window.ActiveXObject) {//IE浏览器
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
   }
   else if(window.XMLHttpRequest) {//非IE浏览器
      xmlhttp=new XMLHttpRequest();
   }
   if (xmlhttp) {
        xmlhttp.onreadystatechange=function(){
			if(xmlhttp.readyState==4){
		 		if(xmlhttp.status==200){
					var str=unescape(xmlhttp.responseText);
					//清空原下拉框
              		document.getElementById("shi_id").options.length=0;           
              		 //str为返回的是一个字符串
              		//将该字符串分割为数组形式
               		var strs=str.split(",");
               		for(var i=0;i<strs.length;i++)
               		{
						//获取value值
						var a=strs[i].substring(0,strs[i].lastIndexOf("/"));
                		//获取绑定内容
                		var b=strs[i].substring(strs[i].lastIndexOf("/")+1,strs[i].length);
                		//绑定到下拉框
                		document.getElementById("shi_id").options.add(new Option(b,a));
						//if(a=<%=dao_shi_id%>)
							//document.getElementById("dao_shi_id").options[i].selected;
					}
				}
				else{
					alert("error");
                }
          	}
   }  
   xmlhttp.open("post","city1.asp?sheng_id="+x,false);//为什么不管用POST还是GET都好像没区别.
   //xmlhttp.open("post","page.asp?page="+y);不带第三个参数表示使用默认值,这样写好像效果一样
   xmlhttp.send(null);
   }          
}

function change(){
	var y=document.getElementById("jingnei").value;
	//alert(y);
	if(y==1){
		//alert("1");
		document.getElementById("guole").style.display="none";
		document.getElementById("guowai").style.display="block";
	}
	if(y==0){
		//alert("2");
		document.getElementById("guole").style.display="block";
		document.getElementById("guowai").style.display="none";
	}
}
