function showsubmenu(sid)
{
whichEl = eval("submenu" + sid);
if (whichEl.style.display == "none")
{
eval("submenu" + sid + ".style.display=\"\";");
}
else
{
eval("submenu" + sid + ".style.display=\"none\";");
}
}
//****************************复选框
function CheckAll(form)
  {
  for (var i=0;i<form.elements.length;i++)
    {
    var e = form.elements[i];
    if (e.Name != "chkAll"&&e.disabled==false)
       e.checked = form.chkAll.checked;
    }
  }
 //****************************显示表格
  
function viewonline(TbName,iframe,ReLocation)
{
   if (TbName.style.display=='none') {
        TbName.style.display='';
	}
   else {
        TbName.style.display='none';
   }
   iframe.location.href=ReLocation;
}
//************************************** + -　文本框行
function ObjectRows(Str,ObjectName,DefaultNum) {
// ObjectRows(+ or -,对像名,对像默认行数)
   var StrName=document.all(ObjectName)
   if (Str=="+") {
       StrName.rows=StrName.rows+5
   }
   if (Str=="-") {   
       if (StrName.rows>DefaultNum) {
	       StrName.rows=StrName.rows-5
	   }
   }
}
function OpenScript(FileName,Title,Width,Height) {
   window.open(FileName,Title,'scrollbars=yes,width='+Width+',height='+Height)
}
//**************************************等级名特殊标题
function usercolor(UserGroupID,UserName){
		  UserGroupID = parseInt(UserGroupID);
		  var UserNameStyle=GroupUserName[UserGroupID].split("|||");
		  return(UserNameStyle[0]+UserName+UserNameStyle[1]);
} 
//HTML过滤函数 用于编辑
function HTML(text)
{
	text = text.replace(/&/g, "&amp;") ;
	text = text.replace(/"/g, "&quot;") ;
	text = text.replace(/</g, "&lt;") ;
	text = text.replace(/>/g, "&gt;") ;
	text = text.replace(/'/g, "&#146;") ;
	text = text.replace(/&lt;BR&gt;/g, "<BR>") ;
	text = text.replace(/&lt;P&gt;/g, "<P>") ;
	text = text.replace(/&lt;\/P&gt;/g, "<P>") ;
	return text ;
}
//图片放大缩小
function bbimg(o){
	var zoom=parseInt(o.style.zoom, 10)||100;zoom+=event.wheelDelta/12;if (zoom>0) o.style.zoom=zoom+'%';
	return false;
}
//用于用于隐藏用户菜单
function Menuout(str)
{
var Menu=eval("Menu"+str)
if(window.event.toElement.id!="Menu"+str&& window.event.toElement.id!="UserSet")
  Menu.style.visibility="hidden";
}

//显示用户资料
function ExportUserDate(UserFace,GradePic,UserTitle,UserPw,GradeName,PostTopic,UserIG,UserAddTime){
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;"+UserFace+"<br>")
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;<img src='Images/Grade/"+GradePic+"'><br>")
	if (UserTitle!=""){document.write("&nbsp;&nbsp;&nbsp;&nbsp;头街："+UserTitle+"<br>")}
	if (parseInt(UserPw)>1){document.write("&nbsp;&nbsp;&nbsp;&nbsp;威望：<b><font color='#FF0000'> + "+UserPw+"</font></b><br>")}
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;等级："+GradeName+"<br>") 
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;文章："+PostTopic+"<br>")
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;积分："+UserIG+"<br>")
	document.write("&nbsp;&nbsp;&nbsp;&nbsp;注册："+UserAddTime)
}

//**************************************分页
function Pages(requestpage,MaxPage,RecordCount,PageName){
// Pages(当前页,总页数,主题总数,传递的参数)
var p,ii;
if((requestpage-1)%10==0) 
	p=(requestpage-1)/10;
else
	p=parseInt((requestpage-1)/10);
if(requestpage==1)
   document.write('<font face=webdings color="#FF0066">9</font>  <b>  ');
else
   document.write('<a href=?'+PageName+'=1 title=首页><font face=webdings>9</font></a>  <b>');

if(p*10>0)
   document.write('<a href=?'+PageName+'='+p*10+' title=上十页><font face=webdings>7</font></a> ');

for(ii=p*10+1;ii<=p*10+10;ii++)
 {
  if(ii==requestpage)
	 document.write ('<font color="#CC0033">'+ii+'</font>  ');
  else
     document.write ('<a href=?'+PageName+'='+ii+'>'+ii+'</a>  ');
  if(ii==MaxPage)
    break;
 }
 document.write('</b>');

if(ii<MaxPage)
document.write('<a href=?'+PageName+'='+ii+' title=下十页><font face=webdings>8</font></a>   ');
if(requestpage==MaxPage)
	document.write('<font face=webdings color="#FF0099">:</font>   ');
else
	document.write('<a href=?'+PageName+'='+MaxPage+' title=尾页><font face=webdings>:</font></a>   ');


document.write('&nbsp;&nbsp;页次：'+requestpage+'/'+MaxPage+'页 &nbsp;&nbsp;共'+RecordCount+'记录');
}

