/***
*首页：显示游戏列表
*参数：flag(标识) objDiv(层对象)
*/
function getGameList(flag, objDiv,obj)
{
	if (flag == "" || !$(objDiv) || obj == "" )
		return ;
	
	for(i=1;i<=8;i++)
	{
		if ( obj.indexOf(i) != -1)
			
			$(obj).className = "game_sel";
		else{
			if ($('FenLei_'+i))
				$('FenLei_'+i).className = "game_unsel";
		}
	}
	

	var url = "../include/FenLei2_"+flag+".htm";
	var pars = "";
	var myAjax = new Ajax.Updater(objDiv, url, {method: "get", parameters: pars,  evalScripts: true} );
	$(objDiv).style.display = "";
	
}

function showDownRank(obj,obj1, objDiv,objDiv1)
{
	if (obj == "" || obj1 == "" || !$(objDiv) || !$(objDiv1))
		return ;
		
	$(obj).className = "selected";	
	$(objDiv).style.display = "";
	
	$(obj1).className = "unselected" ;
	$(objDiv1).style.display = "none";
	return;
}

/***
*首页：显示游戏列表
*参数：flag(标识) objDiv(层对象)
*/
function getListZiMu(flag, objDiv,obj,fenlei1id)
{
	if (flag == "" || !$(objDiv) || obj == "" )
		return ;
	
	for(i=1;i<=8;i++)
	{
		if ( obj.indexOf(i) != -1)
			
			$(obj).className = "game_sel";
		else{
			if ($('FenLei_'+i))
				$('FenLei_'+i).className = "game_unsel";
		}
	}
	

	var url = "../include/FenLei1_"+fenlei1id+"/"+flag+".htm";
	var pars = "";
	var myAjax = new Ajax.Updater(objDiv, url, {method: "get", parameters: pars,  evalScripts: true} );
	$(objDiv).style.display = "";
	
}


/***
*首页：显示游戏列表分页
*参数：flag(标识) objDiv(层对象)
*/
function getFenLei2GameList(fenlei2id,jiye, objDiv)
{
	if (fenlei2id == "" || !$(objDiv)||jiye=="")
		return ;
	
	var url = "/include/FenLei2Page/FenLei2_"+fenlei2id+"/FenLei2_Page_"+jiye+".htm";
	var pars = "";
	var myAjax = new Ajax.Updater(objDiv, url, {method: "get", parameters: pars,  evalScripts: true} );
	$(objDiv).style.display = "";
	
}

function getTuiJianList(jiye, objDiv)
{
	if (!$(objDiv)||jiye=="")
		return ;
	
	var url = "/include/TuiJianPage/"+jiye+".htm";
	var pars = "";
	var myAjax = new Ajax.Updater(objDiv, url, {method: "get", parameters: pars,  evalScripts: true} );
	$(objDiv).style.display = "";
	
}


function SoftList(SoftName,SoftTime,SoftSize,Hits,SoftReadme)
{
	document.writeln("<TABLE width='100%' bgcolor='#CFCFCF' cellSpacing=1 cellPadding=0 align=center onmouseover=\"this.style.backgroundColor='#6699ff';this.style.color='black'\" onmouseout=\"this.style.backgroundColor='';this.style.color=''\">")
	document.writeln("<TR onmouseover=\"this.style.backgroundColor='#FFFFD9';this.style.color='red'\" onmouseout=\"this.style.backgroundColor='';this.style.color=''\" class=Border1>");
	document.writeln("<TD width='70%' height=23 class='ListName'>&nbsp;"+SoftName+"</TD>");
	document.writeln("<TD width='15%' noWrap align=center>"+SoftTime+"</TD><TD width='15%' noWrap align=center>"+SoftSize+"</TD>");
	document.writeln("</TR>");
	document.writeln("<TR class=Border2 colSpan=3>");
	document.writeln("   <TD height=25 style=LINE-HEIGHT: 150%;table-layout:fixed;word-break:break-all colSpan=3>&nbsp;&nbsp;"+SoftReadme+"</TD>");
	document.writeln("</TR>");
	document.writeln("<TR>");
	document.writeln("   <TD height=2 class=Border2 colSpan=3></TD>");
	document.writeln("</TR>");
	document.writeln("</TABLE>")
}
 
function  XianShiTuPian(o){  
var  m=document.getElementById("m")  
m.style.pixelLeft=getL(o)  
m.style.pixelTop=getT(o)+o.offsetHeight  
m.style.visibility=''  
}  
 
function  hide(){  
document.getElementById("m").style.visibility='hidden'  
}  
 
function  getL(e){  
var  l=e.offsetLeft;  
while(e=e.offsetParent){  
l+=e.offsetLeft;  
}  
return  l  
}  
 
function  getT(e){  
var  t=e.offsetTop;  
while(e=e.offsetParent){  
t+=e.offsetTop;  
}  
return  t  
}  

