
	  var xmlHttp9;
	  function createXMLHttpRequest9() 
      {
        if(window.XMLHttpRequest)
		{
				xmlHttp9 = new XMLHttpRequest();
				xmlHttp9.onload = handleStateChange9;
				xmlHttp9.onerror = handleStateChange9;
		}
		else if(window.ActiveXObject)
		{
				try
				{
				  xmlHttp9 = new ActiveXObject("Msxml2.XMLHTTP"); 
				}
				catch(e)
				{
				  try
				  {
				      xmlHttp9 = new ActiveXObject("Microsoft.XMLHTTP");
				  }
				  catch(e)
				  {
				  }                        
				}
				xmlHttp9.onreadystatechange = handleStateChange9;
		}
      }	
	  function changebrandmodel()
	  {

				var provi9 = document.getElementById("brand").value;
				var vehicle9 =provi9.split("---");
		        createXMLHttpRequest9(); 
		        var urlString9 = "changebrandmodel.mb";
		        var dataString9 = "id="+vehicle9[0];
		        xmlHttp9.onreadystatechange=handleStateChange9;
			    xmlHttp9.open("POST",urlString9,true);
			    xmlHttp9.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
			    xmlHttp9.send(dataString9);
	  }
	  
	function handleStateChange9()
	{
	   if(xmlHttp9.readyState==4)
	   {
	      if(xmlHttp9.status==200)
	      {    

                
				 if(xmlHttp9.responseText=="")
			     {
					document.getElementById("brandmodel").style.display="none";
				 }
				 else
			     {  
					  clearbrandmodeleList();
					  var mtSelect9 = document.getElementById("brandmodel");
					  var mtnames9 = xmlHttp9.responseXML.getElementsByTagName("mtname"); 
					  var mtnos9 =   xmlHttp9.responseXML.getElementsByTagName("mtno");       
					  var option9 = null;
					  for(var i=0;i< mtnames9.length;i++)
					  {
						  option9 = document.createElement("option");
						  option9.appendChild(document.createTextNode(mtnames9[i].firstChild.nodeValue));
						  option9.setAttribute("value",mtnos9[i].firstChild.nodeValue);
						  
						  mtSelect9.appendChild(option9);   
					  }
					 document.getElementById("brandmodel").style.display="";
				 }
	            
                 
	           
               
	      }
	   }
	}
	//清除所有的商品类别
	function clearbrandmodeleList()
	{
	  var cities9 = document.getElementById("brandmodel");
	  while(cities9.childNodes.length > 0)
	  {
		  cities9.removeChild(cities9.childNodes[0]);
	  }
	} 
