function displayboard(BoardID,BoardAssort,BoardName,BoardIntro,LastWriter,LastWriteTime,TopicNum,AnnounceNum,ForumPass,LastAnnounceID,LastTopicName,MasterList,BoardLimit,AssortName,TodayAnnounce,GoodNum,BoardImgUrl,BoardImgWidth,BoardImgHeight,onlineUser,LowerBoard)
{
 var Temp = 0;
 if(CurrentAssosrt!=BoardAssort)
 {
  CurrentAssosrt = BoardAssort
  if(Flag == 1)
  { document.write("</table>");
   if(GBL_TableBottomString != "")document.write("<table width=" + DEF_BBS_ScreenWidth + " border=0 cellspacing=0 cellpadding=0 align=center><tr><td>" + GBL_TableBottomString + "</td></tr></table><br><br>");
   document.write("<br><br>");
  }
  if(GBL_TableHeadString != "")document.write("<table width=" + DEF_BBS_ScreenWidth + " border=0 cellspacing=0 cellpadding=0 align=center><tr><td>" + GBL_TableHeadString + "</td></tr></table>");
           document.write("<table width=" + DEF_BBS_ScreenWidth + " border=0 cellspacing=0 cellpadding=0 align=center><tr><td><table width=98% border=0 align=center cellpadding=0 cellspacing=0></table></td></tr></table><table width=" + DEF_BBS_ScreenWidth + " border=0 cellspacing=1 cellpadding=5 align=center bgcolor=#cccccc class=TBone><tr bgcolor=#666699><td colspan=6 class=TBHead><a href=Boards.asp?Assort=" + BoardAssort + "><b><font color=white class=HeadFont>" + AssortName + "</font></b></a></td></tr><tr align=center class=TBHead3><td class=TBHead3> </td><td width=45% class=TBHead3>论坛</td><td width=8% class=TBHead3>主题</td><td width=8% class=TBHead3>贴数</td><td width=17% class=TBHead3>最后发表</td><td width=18% class=TBHead3>版主</td></tr>");
           Flag = 1;
     }
 document.write("<tr bgcolor=#f7f7f7 align=center class=TBBG9><td width=5% bgcolor=eeeeee class=TBBG1><img src=images/BoardTopic/");
 if(TodayAnnounce > 0)document.write("_");
 if(ForumPass!="")
 {
  document.write("lock.gif title=保密论坛");
 }
 else
 {
  if(BoardLimit&(1<<(7-1)))
  {
   document.write("lock3.gif title=版主专区");
  }
  else
  {
   if((BoardLimit&(1<<(4-1))) && (BoardLimit&(1<<(3-1))) && (BoardLimit&(1<<(6-1))))
   {
    document.write("readonly.gif title=只读论坛");
   }
   else
   {
    if(BoardLimit&(1<<(2-1)))
    {
     document.write("lock2.gif title=认证会员论坛");
    }
    else
    {
     if(BoardLimit&(1<<(1-1)))
     {
      document.write("lock1.gif title=注册认证论坛");
     }
     else
     {
      if(BoardLimit&(1<<(9-1)))
      {
       document.write("open.gif title=开放论坛");
      }
      else
      {
       document.write("1.gif title=常规论坛");
      }
     }
    }
   }
  }
 }
document.write("  ></td>");
     document.write("<td align=center class=smalltxt><table width=100% border=0 cellspacing=0 cellpadding=0 ><tr>");

 if(BoardImgUrl != "" && BoardImgUrl != null)document.write("<td rowspan=4 width=" + BoardImgWidth + "><a href=Board/Board.asp?BoardID=" + BoardID + "><img src=" + BoardImgUrl + " width=" + BoardImgWidth + " height=" + BoardImgHeight + " border=0></a></td><td width=4 rowspan=4><img src=images/null.gif width=2 height=2></td>");
     
document.write("<td><b><a href=Board/Board.asp?BoardID=" + BoardID + ">" + BoardName + "</a><a href=announce/announce2.asp?BoardID=" + BoardID + "></b></td>");
//document.write("<td rowspan=4 width=10><a href=announce/announce2.asp?BoardID=" + BoardID + "><img src=images/BoardTopic/post.gif height=13 width=12 border=0 title=在此论坛发表新帖子></a><br><br><a href=Board/EBoard.asp?BoardID=" + BoardID + "><img src=images/BoardTopic/elist.gif height=13 width=12 border=0 title=查看精华区内容(共" + GoodNum + "精华贴子)></a></td>");
     document.write("</tr><tr><td>");
     document.write(BoardIntro);
     document.write("</td></tr>");

     document.write("</table>");
     document.write("<td width=6% align=center valign=middle class=TBbg1><img src=images/null.gif height=2 width=2>" + TopicNum + "</td><td width=6% align=center valign=middle><img src=images/null.gif height=2 width=2>" + AnnounceNum + "</td>");
     document.write("<td width=18% align=right valign=middle class=TBbg1><img src=images/null.gif height=2 width=2>");
     Temp = 0;
     if(LastTopicName == "" || LastTopicName==null)
     {
           
     }
     else
     {
           if(LastTopicName.length>12)
           {
                 LastTopicName = LastTopicName.substring(0,12-1);
                 LastTopicName = htmlencode(LastTopicName) + "..."
           }
           else
           {
                 LastTopicName = htmlencode(LastTopicName);
           }
           if(ForumPass != "" || (BoardLimit&(1<<(2-1))))
           {
                 
                 Temp = 1;
           }
           else
           {
                 
           }
     }
     document.write("<img src=images/null.gif width=2>");
     if(LastWriter == "")
     {
           
     
           
     }
     else
     {
           
           if(LastWriter!="游客")
           {
                 if(Temp == 1)
                 {
                       
                 }
                 else
                 {
                       
                 }
           }
           else
           {
                 
           }
           if(LastWriteTime.length==14)
           {
                 LastWriteTime = LastWriteTime.substr(0,4) + "-" + LastWriteTime.substr(4,2) + "-" + LastWriteTime.substr(6,2) + " " + LastWriteTime.substr(8,2) + ":" + LastWriteTime.substr(10,2)
           }
           else
           {
                 LastWriteTime = "无"
           }
           document.write("<table border=0 cellspacing=0 cellpadding=0><tr><td align=right class=smalltxt title=主题:" + htmlencode(LastTopicName) + ">");
           document.write("" + LastWriteTime);
                document.write("<br>by <a href=User/LookUserInfo.asp?Name=" + htmlencode(LastWriter) + ">" + htmlencode(LastWriter) + "</a>");       
                document.write("</td><td width=16 align=right><a href=announce/announce.asp?BoardID=" + BoardID + "&ID=" + LastAnnounceID + "&upflag=1&num=1><img src=images/icon_latest_reply.gif border=0></a>")
           document.write("</td></tr></table>")
           document.write("</td>");
                document.write("<td class=smalltxt width=18% align=center valign=middle>")
DisplayBoardMastList(MasterList,5);
document.write("</td>")
document.write("</tr>");
 }
}

function DisplayBoardMastList(s,num)
{
 if("?LeadBBS?" == s)
 {
  document.write("全体版主");
 }
 else
 {
  if(s == "" || s == null)document.write("无");
  var ss,n;
  ss = s.split(",");
  for(n=0;n<ss.length;n++)
  {
   if(n>=num)break;
   document.write("<a href=\"User/LookUserinfo.asp?name=" + htmlencode(ss[n]) + "\">" + htmlencode(ss[n]) + "</a> ");
  }
  if(n>=num && n<ss.length)
  {
   document.write("<span style=\"cursor:hand\" title=\"更多版主: " + ss[n]);
   for(n=n+1;n<ss.length;n++){document.write(" " + ss[n]);}
   document.write("\">...</span>");
  }
 }
}
function htmlencode(str)
{
 var re = /(<)/gi;
 var rv = str.replace(re,"&lt;");
 re = /(>)/gi;
 rv = rv.replace(re,"&gt;");
 re = /(\")/gi;
 rv = rv.replace(re,"&quot;");
 return(rv);
}
function LeftTrue(str,n)
{
 var mx=String.fromCharCode(127);
 if(str.length<=n/2)
 {
  return(str);
 }
 else
 {
  var TStr="";
  var l,t=0;
  var i;
  l=str.length;
  for(i=0;i<l;i++)
  {
   if(str.charAt(i)>mx)
   {
    t=t+2;
   }
   else
   {
    t=t+1;
   }
   if(t>n)break;
   TStr=TStr+str.charAt(i);
  }
  return(TStr);
 }
}

function strlength(str)
{
 var mx=String.fromCharCode(255);
 if(str.length==0)
 {
  return(0);
 }
 else
 {
  var TStr="";
  var l,t,c;
  var i;
  l=str.length;
  t=l;
  for(i=0;i<l;i++)
  {
   if(str.charAt(i)>mx)
   {
    t+=1;
   }
  }
  return(t);
 }
}

function DisplayBoardMastList(s,num)
{
 if("?LeadBBS?" == s)
 {
  document.write("全体版主");
 }
 else
 {
  if(s == "" || s == null)document.write("无");
  var ss,n;
  ss = s.split(",");
  for(n=0;n<ss.length;n++)
  {
   if(n>=num)break;
   document.write("<a href=\"User/LookUserinfo.asp?name=" + htmlencode(ss[n]) + "\">" + htmlencode(ss[n]) + "</a> ");
  }
  if(n>=num && n<ss.length)
  {
   document.write("<span style=\"cursor:hand\" title=\"更多版主: " + ss[n]);
   for(n=n+1;n<ss.length;n++){document.write(" " + ss[n]);}
   document.write("\">...</span>");
  }
 }
}
function htmlencode(str)
{
 var re = /(<)/gi;
 var rv = str.replace(re,"&lt;");
 re = /(>)/gi;
 rv = rv.replace(re,"&gt;");
 re = /(\")/gi;
 rv = rv.replace(re,"&quot;");
 return(rv);
}
function LeftTrue(str,n)
{
 var mx=String.fromCharCode(127);
 if(str.length<=n/2)
 {
  return(str);
 }
 else
 {
  var TStr="";
  var l,t=0;
  var i;
  l=str.length;
  for(i=0;i<l;i++)
  {
   if(str.charAt(i)>mx)
   {
    t=t+2;
   }
   else
   {
    t=t+1;
   }
   if(t>n)break;
   TStr=TStr+str.charAt(i);
  }
  return(TStr);
 }
}

function strlength(str)
{
 var mx=String.fromCharCode(255);
 if(str.length==0)
 {
  return(0);
 }
 else
 {
  var TStr="";
  var l,t,c;
  var i;
  l=str.length;
  t=l;
  for(i=0;i<l;i++)
  {
   if(str.charAt(i)>mx)
   {
    t+=1;
   }
  }
  return(t);
 }
}