var xml;
function getxml(classid)
{
	if (classid=="")
	{
		document.getElementById("nclassid").length=0;
		document.getElementById("nclassid").options[0]= new   Option("未指定条件","")
		return ;
	}
	url="index_ajax_xml.php?classid=" + classid;
	//alert (url);
	xml = new initXmlHttp();	//初始化xmlhttprequest
	xml.xmlhttp.onreadystatechange=processRequest_getxml;
	xml.xmlhttp.open("GET",url,true);
	xml.xmlhttp.send(null);
}
function processRequest_getxml()
{
	if(!(xmldom=checkRequest(xml)))
		return ;
	//alert(xml.xmlhttp.responseText);
	root=xmldom.getElementsByTagName("root");	//取得root根节点
	if (root.length==0)
	{
		//changeHTML(tableid,"<font color='#FF0000'>xml格式错误！</font>");
		alert ("xml格式错误");
		return ;
	}
	var attrib=root(0).getAttribute("errcode");	//取得root 的errcode属性
	if (attrib>0)
	{
		//changeHTML(tableid,"<br /><br /><font color='#FF0000'>出现错误:"+root(0).getAttribute("errmsg")+"</font><br /><br />");
		alert ("<br /><br /><font color='#FF0000'>出现错误:"+root(0).getAttribute("errmsg")+"</font><br /><br />");
		return ;
	}
	document.getElementById("nclassid").length=0;
	items=xmldom.documentElement.childNodes;
	document.getElementById("nclassid").options[0]= new   Option("未指定条件","")
	for (aaa=0;aaa<items.length;aaa++)
	{
		if (items.item(aaa).tagName=="anclass")
		{
			//alert ("ok!");
			id=items.item(aaa).getAttribute("id");
			name1=items.item(aaa).getAttribute("name");
			document.getElementById("nclassid").options[aaa+1]= new   Option(name1,id);
		}
	}
}