		var xmlHttp1;
	  function createXMLHttpRequest1() 
      {
        if(window.XMLHttpRequest)
		{
				xmlHttp1 = new XMLHttpRequest();
				xmlHttp1.onload = handleStateChange1;
				xmlHttp1.onerror = handleStateChange1;
		}
		else if(window.ActiveXObject)
		{
				try
				{
				  xmlHttp1 = new ActiveXObject("Msxml2.XMLHTTP"); 
				}
				catch(e)
				{
				  try
				  {
				      xmlHttp1 = new ActiveXObject("Microsoft.XMLHTTP");
				  }
				  catch(e)
				  {
				  }                        
				}
				xmlHttp1.onreadystatechange = handleStateChange1;
		}
      }	
	  function changetoptypeinfo(id)
	  {
		        createXMLHttpRequest1(); 
		        var urlString1 = "tops.mb";
		        var dataString1 = "id="+id
		        xmlHttp1.onreadystatechange=handleStateChange1;
			    xmlHttp1.open("POST",urlString1,true);
			    xmlHttp1.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
			    xmlHttp1.send(dataString1);
	  }
	  
	function handleStateChange1()
	{
	   if(xmlHttp1.readyState==4)
	   {
	      if(xmlHttp1.status==200)
	      {    
				 if(xmlHttp1.responseText=="")
			     {
			     
				 }
				 else
			     {
					  clearbrandList();
					  var mtSelect1 = document.getElementById("toptypeid");
					  var mtnames1 = xmlHttp1.responseXML.getElementsByTagName("mtname"); 
					  var mtnos1 =   xmlHttp1.responseXML.getElementsByTagName("mtno");       
					  var option1 = null;
					  for(var i=0;i< mtnames1.length;i++)
					  {
						  option1 = document.createElement("option");
						  option1.appendChild(document.createTextNode(mtnames1[i].firstChild.nodeValue));
						  option1.setAttribute("value",mtnos1[i].firstChild.nodeValue);
						  
						  mtSelect1.appendChild(option1);   
					  }
				 }
       
	      }
	   }
	}
	//清除所有的类别
	function clearbrandList()
	{
	  var cities1 = document.getElementById("toptypeid");
	  while(cities1.childNodes.length > 0)
	  {
		  cities1.removeChild(cities1.childNodes[0]);
	  }
	} 
