<script language="javascript" type="text/javascript">
var template=new Array();
var piclist=new Array();
var Strings=new Array();
var mainsetting=new Array();
var Selectlist;
var page=1;
var PageSize=60
var myid=0
var Count
var nowbodarid=0
var pageCount=0
var username=''
var parentDIV=parent.document.getElementById("onlinetr")
var parentshow=parent.document.getElementById("showstr")
var master=0
function reshow(boardid)
{      
	if(parentDIV.style.display=='none')
	{
		parentDIV.style.display='block';
		parentDIV.innerHTML='<span style="width:240px;margin-left:18px;border:1px solid black;background-color:lightyellow;color:black;padding:2px">正在读取在线信息，请稍侯……</span>'
		parentshow.innerHTML='<a href="Online.asp?action=0&Boardid='+boardid+'" target="hiddenframe">'+Strings[1]+'</a>';
	}
	else
	{
		parentDIV.style.display='none';	
		parentshow.innerHTML='<a href="Online.asp?action=1&Boardid='+boardid+'" target="hiddenframe">'+Strings[2]+'</a>';
		parentDIV.innerHTML=''
	}
}
//id,username,UserGroupID,userhidden,userid,userclass,//stats,startime,lastimebk,browser,actCome,IP
function showonlist(str)
{
	var parentstr='<table width="98%" border="0" cellspacing="0" cellpadding="0">'
	var tmpstr=''
	var addlist=Selectlist.split(",")
	var aa=6
	var tmpcount=new Array();
	tmpcount[0]=0
	tmpcount[1]=0
	tmpcount[2]=0
	tmpcount[3]=0
	tmpcount[4]=0
	tmpcount[5]=0
	if(addlist.length>0)
	{
		if(Selectlist.indexOf("stats",1)!=-1){tmpstr+=Strings[5]+'{$stats}<br>';tmpcount[0]=aa;aa++}
		if(Selectlist.indexOf("startime",1)!=-1){tmpstr+=Strings[6]+'{$startime}<br>';tmpcount[1]=aa;aa++}
		if(Selectlist.indexOf("lastimebk",1)!=-1){tmpstr+=Strings[7]+'{$lastimebk}<br>';tmpcount[2]=aa;aa++}
		if(Selectlist.indexOf("browser",1)!=-1){
			tmpstr+=Strings[8]+'{$browser0}<br>'
			tmpstr+=Strings[9]+'{$browser1}<br>'
			tmpcount[3]=aa;aa++
		}
		if(Selectlist.indexOf("actCome",1)!=-1){tmpstr+=Strings[11]+'{$actCome}<br>';tmpcount[5]=aa;aa++}
		if(Selectlist.indexOf("IP",1)!=-1){tmpstr+=Strings[10]+'{$ip}<br>';tmpcount[4]=aa;aa++}
			
		
	}
	var k=0
	str=str.split("%#!&")
	for (i=0;i<str.length-1;i++)
	{
		k++
		if (k==1)(parentstr+='<tr>')
		str[i]=str[i].split("^&%&")
		var showstring=tmpstr
		if(tmpcount[0]!=0){showstring=showstring.replace(/{\$stats}/gi,str[i][tmpcount[0]]);}
		if(tmpcount[1]!=0){showstring=showstring.replace(/{\$startime}/gi,str[i][tmpcount[1]]);}
		if(tmpcount[2]!=0){showstring=showstring.replace(/{\$lastimebk}/gi,str[i][tmpcount[2]]);}
		if(tmpcount[3]!=0){
		str[i][tmpcount[3]]=str[i][tmpcount[3]].split("|")
		showstring=showstring.replace(/{\$browser0}/gi,str[i][tmpcount[3]][0]);
		showstring=showstring.replace(/{\$browser1}/gi,str[i][tmpcount[3]][1]);
		}
		if(tmpcount[5]!=0){showstring=showstring.replace(/{\$actCome}/gi,str[i][tmpcount[5]]);}
		
		if(tmpcount[4]!=0){showstring=showstring.replace(/{\$ip}/gi,str[i][tmpcount[4]]);}
		if ((username!=''&&(str[i][4])!=0&&str[i][3]=='2')||(master==1&&(str[i][4])!=0))
		{
			//showstring+='<a href=dispuser.asp?name='+str[i][1]+' target=_blank >查看资料</a>&nbsp;&nbsp;<a href="#" onclick="DvWnd.open(\'给'+str[i][1]+'发送短信\',\'messanger.asp?action=new&amp;touser='+str[i][1]+'\',800,600,1,{bgc:\'black\',opa:0.5});">给他留言</a>';
			showstring+='<a href=dispuser.asp?name='+str[i][1]+' target=_blank >查看资料</a>&nbsp;&nbsp;<a href=messanger.asp?action=new&touser='+str[i][1]+' target=_blank >给他留言</a>';
		}
		showstring = "<div class=menuitems>"+showstring+"<\/div>";
		if (((myid)==(str[i][0]) && username=='')||((myid)==0 && username==str[i][1]))
		{
			parentstr+='<td width="14%" colspan="+k+">&nbsp;'+showonline_face((str[i][2]),str[i][5],str[i][3])+'<a  title="您自己" ><font color="#0000ff">'+str[i][1]+'</font></a></td>'
		}
		else
		{
			if (master==1)
			{	
				parentstr+='<td width="14%" colspan='+k+' >&nbsp;'+showonline_face((str[i][2]),str[i][5],str[i][3])+'<a  onmouseover="showmenu(event,\''+showstring+'\');" onmouseout="delayhidemenu()" class="navlink" style="CURSOR:hand" >'+str[i][1]+'</a></td>';
			}
			else
			{
				if(str[i][3]=='1')
				{parentstr+='<td width="14%" colspan='+k+' >&nbsp;'+showonline_face((str[i][2]),str[i][5],str[i][3])+'<a  onmouseover="showmenu(event,\''+showstring+'\');" onmouseout="delayhidemenu()" class="navlink" style="CURSOR:hand" >'+Strings[3]+'</a></td>'}
				else
				{
					parentstr+='<td width="14%" colspan='+k+' >&nbsp;'+showonline_face((str[i][2]),str[i][5],str[i][3])+'<a  onmouseover="showmenu(event,\''+showstring+'\');" onmouseout="delayhidemenu()" class="navlink" style="CURSOR:hand" >'+str[i][1]+'</a></td>';
				}
				
			}
			
		}
		if(k==6)
		{
			k=0
			parentstr+='</tr>'
		}
	}
	if (k!=0)
	{
		for(i=0;i<6-k;i++)
		{
			parentstr+='<td width="14%" colspan='+(k+i)+'>&nbsp;&nbsp;</td>'
		}
		parentstr+='</tr>'
	}
	parentstr+='</table>'
	if (Count>PageSize)	
	{
		parentstr+='<table width="100%" border="0" cellspacing="0" cellpadding="0" >'
		parentstr+='<tr><td><hr size=1 color=#6595D6 >'
		parentstr+='<tr><td>&nbsp;&nbsp;共有在线记录 '+Count+' 条,每页显示 '+PageSize+' 条,共 '+pageCount+' 页,当前为第 '+page+' 页。转到：'
		if (page!=1)
		{
			parentstr+='<a href="Online.asp?action=3&Boardid='+nowbodarid+'&page=1" target="hiddenframe" >[首页]</a> '
		}
		if (page>2)
		{
			parentstr+='<a href="Online.asp?action=3&Boardid='+nowbodarid+'&page='+(page-1)+'" target="hiddenframe" >[上一页]</a> '
		}
		if (page<(pageCount-1))
		{
			parentstr+='<a href="Online.asp?action=3&Boardid='+nowbodarid+'&page='+(page+1)+'" target="hiddenframe" >[下一页]</a> '
		}
		if(page!=pageCount)
		{
			parentstr+='<a href="Online.asp?action=3&Boardid='+nowbodarid+'&page='+pageCount+'" target="hiddenframe" >[尾页]</a> '
		}
		parentstr+='</td></tr>'
		parentstr+='</table>'
	}
	parentDIV.innerHTML='';
	parentDIV.innerHTML=parentstr
}
function showonline_face(GroupID,Group,hideen)
{
	
	if (hideen=='1')
	{
		Group=Strings[3]
		return('<img src="'+piclist[4]+'" alt="'+Group+'" width="12" height="11">&nbsp;&nbsp;')
	}
	else
	{
		return('<img src="'+piclist[GroupID]+'" alt="'+Group+'" width="12" height="11">&nbsp;&nbsp;')
	}
}
</script>