function GetResult1(str,classid)
{
/*
*--------------- GetResult(str,classid) -----------------
* GetResult(str) 
* 功能:通过XMLHTTP发送请求,返回结果.
* 参数:str,字符串,发送条件;classid,数字,菜单级别
* 实例:GetResult(document.all.userid.value,1);
*--------------- GetResult(str,classid) -----------------
*/
//定义菜单级数，菜单ID数组，菜单对应字段数组
var MenuIdArr,MenuFieldArr,MenuClass
MenuIdArr= new Array()
MenuFieldArr=new Array()
MenuClass=3

MenuIdArr[1]="class_1"
MenuIdArr[2]="class_2"
MenuIdArr[3]="class_3"

MenuFieldArr[1]="name"
MenuFieldArr[2]="name"
MenuFieldArr[3]="name"


if (window.XMLHttpRequest) { // Mozilla, Safari, ...
    http_request = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
}


var linkurl="ajax_server.asp?classid="+classid+"&sel="+str+"&fieldname="+MenuFieldArr[classid+1]
http_request.open("GET",linkurl,false);
http_request.send(null);

//服务器端处理返回的是经过escape编码的字符串.
//在页面显示服务器查询结果

var returntxt=unescape(http_request.responseText)
if(returntxt.length>0)
{document.all,ajax.innerHTML=""}
else
{document.all,ajax.innerHTML=""}


		var mubiaostr="";
		var arrstr = new Array();
		arrstr = returntxt.split(",");
		if(returntxt.length>0){
			mubiaostr=mubiaostr+"<table width='100%' border='0'><tr>";
			var ii=0;
			for(var i=0;i<arrstr.length;i++){
				ii=ii+1;
				var subarrstr=new Array();
				subarrstr=arrstr[i].split("|");
				mubiaostr=mubiaostr+"<td width='180' height='30'>";
				mubiaostr=mubiaostr+"<a href='#' title='"+subarrstr[1]+"' onclick=\"SelectGame1("+subarrstr[0]+",'"+subarrstr[1]+"')\";> |　";
				mubiaostr=mubiaostr+"<font style='FONT-SIZE: 10pt'>";
				if(subarrstr[1].length>10){
					mubiaostr=mubiaostr+subarrstr[1].substr(0,10);
				}else{
					mubiaostr=mubiaostr+subarrstr[1];
				}
				mubiaostr=mubiaostr+"</font></a>";
				mubiaostr=mubiaostr+"</td>";
				if(ii%5==0){
					mubiaostr=mubiaostr+"</tr>";
				}
			}
			mubiaostr=mubiaostr+"</table>"
			
		}else{
			mubiaostr=mubiaostr+"<a href='#'> |　";
			mubiaostr=mubiaostr+"<span style='color:#666662;font-size:12px;line-height:30px;padding:10px;'>";
			mubiaostr=mubiaostr+"暂无相关信息";
			mubiaostr=mubiaostr+"</span></a>"
		}	
		//document.write(mubiaostr);
		document.getElementById("selgamequ").innerHTML=mubiaostr;


//通过XMLHTTP返回数据,开始构建Select.
//BuildSel(returntxt,eval("document.all."+MenuIdArr[classid+1]))
//BuildSel(returntxt,document.getElementById(MenuIdArr[classid+1]))

//============更改下下级以下菜单为空==============
/**
var kkk
for(kkk=classid+2;kkk<=MenuClass;kkk++)
	{		
	submenu=document.getElementById(MenuIdArr[kkk])	
	submenu.length=1
	submenu.options[0].selected=true
	}
**/	
	
	
}


function GetResult2(str,classid)
{
/*
*--------------- GetResult(str,classid) -----------------
* GetResult(str) 
* 功能:通过XMLHTTP发送请求,返回结果.
* 参数:str,字符串,发送条件;classid,数字,菜单级别
* 实例:GetResult(document.all.userid.value,1);
*--------------- GetResult(str,classid) -----------------
*/
//定义菜单级数，菜单ID数组，菜单对应字段数组
var MenuIdArr,MenuFieldArr,MenuClass
MenuIdArr= new Array()
MenuFieldArr=new Array()
MenuClass=3

MenuIdArr[1]="class_1"
MenuIdArr[2]="class_2"
MenuIdArr[3]="class_3"

MenuFieldArr[1]="name"
MenuFieldArr[2]="name"
MenuFieldArr[3]="name"


if (window.XMLHttpRequest) { // Mozilla, Safari, ...
    http_request = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE
    http_request = new ActiveXObject("Microsoft.XMLHTTP");
}


var linkurl="ajax_server.asp?classid="+classid+"&sel="+str+"&fieldname="+MenuFieldArr[classid+1]
http_request.open("GET",linkurl,false);
http_request.send(null);

//服务器端处理返回的是经过escape编码的字符串.
//在页面显示服务器查询结果

var returntxt=unescape(http_request.responseText)
if(returntxt.length>0)
{document.all,ajax.innerHTML=""}
else
{document.all,ajax.innerHTML=""}

		var mubiaostr="";
		var arrstr = new Array();
		arrstr = returntxt.split(",");
		mubiaostr=mubiaostr+"<table width='100%' border='0'><tr>";
		var ii=0;
		if(returntxt.length>0){
			for(var i=0;i<arrstr.length;i++){
				ii=ii+1;
				var subarrstr=new Array();
				subarrstr=arrstr[i].split("|");
				mubiaostr=mubiaostr+"<td width='200' height='30'>";
				mubiaostr=mubiaostr+"<a href='#' title='"+subarrstr[1]+"' onclick=\"SelectGame2("+subarrstr[0]+",'"+subarrstr[1]+"')\";> |　";
				mubiaostr=mubiaostr+"<font style='FONT-SIZE: 10pt'>";
				if(subarrstr[1].length>12){
					mubiaostr=mubiaostr+subarrstr[1].substr(0,12);
				}else{
					mubiaostr=mubiaostr+subarrstr[1];
				}
				mubiaostr=mubiaostr+"</font></a>"
				mubiaostr=mubiaostr+"</td>";
				if(ii%3==0){
					mubiaostr=mubiaostr+"</tr>";
				}
			}
			mubiaostr=mubiaostr+"</table>"
		}else{
			mubiaostr=mubiaostr+"<a href='#'> |　";
			mubiaostr=mubiaostr+"<span style='color:#666662;font-size:12px;line-height:30px;padding:10px;'>";
			mubiaostr=mubiaostr+"暂无相关信息";
			mubiaostr=mubiaostr+"</span></a>"
		}	

		document.getElementById("selgameserver").innerHTML=mubiaostr;

}





function BuildSel(str,sel)
{
/*
*--------------- BuildSel(str,sel) -----------------
* BuildSel(str,sel) 
* 功能:通过str构建Select.
* 参数:str,字符串,由服务端返回的.有特定结构"字符串1|,字符串2,字符串3"
*          也可为"字符串1序号|字符串1文本,字符串2序号|字符串2文本,字符串3序号|字符串3文本",如本例
* 参数:sel,要构建的Select
* 实例:BuildSel(unescape(oBao.responseText),document.all.sel2)
*--------------- BuildSel(str,sel) -----------------
*/
//先清空原来的数据.
sel.options.length=0;
var arrstr = new Array();
arrstr = str.split(",");
//开始构建新的Select.
sel.options.add(new Option( "-----请选择-----",""));  
if(str.length>0)   
{
for(var i=0;i<arrstr.length;i++)
{
//分割字符串
var subarrstr=new Array
subarrstr=arrstr[i].split("|")
//生成下级菜单
sel.options.add(new Option(subarrstr[1],subarrstr[0])); 
}
sel.options[0].selected=true
}

}