
	  var xmlHttp8;
	  function createXMLHttpRequest8() 
      {
        if(window.XMLHttpRequest)
		{
				xmlHttp8 = new XMLHttpRequest();
				xmlHttp8.onload = handleStateChange8;
				xmlHttp8.onerror = handleStateChange8;
		}
		else if(window.ActiveXObject)
		{
				try
				{
				  xmlHttp8 = new ActiveXObject("Msxml2.XMLHTTP"); 
				}
				catch(e)
				{
				  try
				  {
				      xmlHttp8 = new ActiveXObject("Microsoft.XMLHTTP");
				  }
				  catch(e)
				  {
				  }                        
				}
				xmlHttp8.onreadystatechange = handleStateChange8;
		}
      }	
	  function changebrand(id)
	  {
		        createXMLHttpRequest8(); 
		        var urlString8 = "changebrand.mb";
		        var dataString8 = "id="+id
		        xmlHttp8.onreadystatechange=handleStateChange8;
			    xmlHttp8.open("POST",urlString8,true);
			    xmlHttp8.setRequestHeader("Content-Type","application/x-www-form-urlencoded;");
			    xmlHttp8.send(dataString8);
	  }
	  
	function handleStateChange8()
	{
	   if(xmlHttp8.readyState==4)
	   {
	      if(xmlHttp8.status==200)
	      {    
				 if(xmlHttp8.responseText=="")
			     {
					document.getElementById("brandandmo").style.display="none";
				 }
				 else
			     {
					  clearbrandList();
					  var mtSelect8 = document.getElementById("brand");
					  var mtnames8 = xmlHttp8.responseXML.getElementsByTagName("mtname"); 
					  var mtnos8 =   xmlHttp8.responseXML.getElementsByTagName("mtno");       
					  var option8 = null;
					  for(var i=0;i< mtnames8.length;i++)
					  {
						  option8 = document.createElement("option");
						  option8.appendChild(document.createTextNode(mtnames8[i].firstChild.nodeValue));
						  option8.setAttribute("value",mtnos8[i].firstChild.nodeValue);
						  
						  mtSelect8.appendChild(option8);   
					  }
					  document.getElementById("brandandmo").style.display="";
				 }
	            
                 
	           
               
	      }
	   }
	}
	//清除所有的商品类别
	function clearbrandList()
	{
	  var cities8 = document.getElementById("brand");
	  while(cities8.childNodes.length > 0)
	  {
		  cities8.removeChild(cities8.childNodes[0]);
	  }
	} 
