 var isMaster=0;
 var bbspath = "/club/";
 //贴子管理
if(document.getElementById('topicman')!=null)
{
 if(login_uname!="")
  {
   if(login_usergrade >= 20) 
			{				isMaster = 2;			}
	 else 
			{				
				if(boardarray[boardid][1]=="" || boardarray[boardid][1]==null)
				{					isMaster = 0;				}		
				else
				{
					if (boardarray[boardid][1].indexOf(login_uname)>=0)
					 {   isMaster = 1;      }		
				}
     }
   } 
  // alert(isMaster);
 	   var spantags = document.getElementsByTagName("span");
		 
	
 	if (isMaster >=1) 
		 { document.getElementById('topicman').style.visibility='visible';	 
		   for (j=0;j<spantags.length;j++)
		     {  if(spantags[j].className =="bbsman")
		          { spantags[j].style.visibility='visible';	  }
		     }
 	    if (isMaster ==2) 
			   {document.getElementById('topicman1').style.visibility='visible';			   
			    }		
		 }		 
		 //可否修改
		// alert(spantags[12].getAttribute("name"));
	  for (j=0;j<spantags.length;j++)
		     { 
		      if(spantags[j].className =="bbsedit" && (isMaster==2 || spantags[j].getAttribute("name")==login_uname) )
		          {  
		           spantags[j].style.visibility='visible';	  }
		     }
	                      
			//栏目导航信息
		var navinfo = "" + classarray[boardarray[boardid][5]] + " → <a href="+bbspath+"list.aspx?classid=" + boardarray[boardid][5] + "&boardid=" + boardid + ">『 " + boardarray[boardid][0] + " 』</a>";
	  
}	 	
 //顶部登陆信息
	  var infostr; 
    infostr = ''; 
	 
  if ( login_uname!=null && login_uname!="" && login_uname!="undefined" ) 
    { 
    	infostr =login_uname + " <a href="+bbspath+"useradmin.aspx>我的联商</a> <a href="+bbspath+"logout.aspx>退出</a>";
    	if(document.getElementById("fastann_login")!=null)
        { document.getElementById("fastann_login").innerHTML=infostr; }
      
    }
  else {
    infostr  = " <a href="+bbspath+"login.aspx>登陆</a> | <a href="+bbspath+"reg.shtml>注册</a> "; 
      } 
  if(document.getElementById('usertop')!=null) document.getElementById('usertop').innerHTML=infostr;	   
	 
	//弹出登陆层	
document.write("<div id='FloatLoginLayer' style='POSITION:absolute;LEFT:350px;TOP:350px;z-index:8; visibility:hidden; background-color:#efeffe '></div>");
   
    
function floatlogin(comeurl, isreturn)
{ // alert(login_uname);
	if(login_uname=="")
   {    
		FloatLoginLayer.style.visibility='visible';	
    // alert(FloatLoginLayer.style.visibility);	
     var floginstr ="<form name=\"loginform1\" onsubmit=\"return fastcheck(document.loginform1);\" action=\"/club/login.aspx?action=fastlogin&home=1\" method=post target=\"_parent\"><table cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\" align=\"center\" border=\"0\"><tr><td><IMG src=\"/club/images/top_1_left.jpg\" width=\"5\"></td><td width=100% background=\"/club/images/top_1_mid.jpg\" align=\"center\" height=26>";	
	 
	 floginstr +=" <b>快速登录</b> </td><td background=\"/club/images/top_1_mid.jpg\" height=26><a title='关闭' href='javascript:void(0)' onclick=FloatLoginLayer.style.visibility='hidden'><font face=Wingdings style='font-Color:#000000 font-size:14px'>x</font></a></td><td><IMG src=\"/club/images/top_1_right.jpg\" width=\"4\"></td></tr></table><table width=100% Height=100% cellSpacing=\"0\" cellPadding=\"0\" style=\"BORDER: #dddddd 1px solid\"><tr><td Height=30 colspan=3 align=center>小编提示：登录之后再发表，会获赠金币和积分哦！</td></tr><tr><td Height=30 colspan=\"3\" style=\"padding-left:20px;\">用户名： <input type=\"text\" name=\"userid\" size=\"25\"></td></tr><tr><td Height=30 colspan=\"3\" style=\"padding-left:20px;\">密&nbsp; 码： <input type=\"password\" name=\"userpassword\" size=\"25\"></td></tr><tr><td Height=30 align=\"center\" colspan=\"3\"><input id=\"submit1\" type=\"submit\" value=\"登 录\" name=\"submit\"> &nbsp;&nbsp; <a target=_blank href=\"/club/register.aspx\">免费注册</a> <Input type=hidden name=comeurl value=\""+comeurl+"\"> </td></tr> </table></form>";
  var cHeight, cWidth;
    if(document.documentElement.clientHeight==0)
    { cHeight=document.body.clientHeight; }
     else {cHeight=document.documentElement.clientHeight;} 
    if(document.documentElement.clientWidth==0)
    { cWidth=document.body.clientWidth; }
     else  {cWidth=document.documentElement.clientWidth;  } 
 	
   //alert(cWidth + "," +cHeight + "," + document.body.scrollTop);
	  FloatLoginLayer.style.left = cWidth/2-200;
	  FloatLoginLayer.style.top = cHeight/2+document.body.scrollTop-180;
	  FloatLoginLayer.style.width=320;
	  FloatLoginLayer.style.height=160;
	  
     FloatLoginLayer.innerHTML=floginstr; 
   document.loginform1.userid.focus();
    if(isreturn==1)   return false;
  }
else
	 {  if(isreturn==0)
	 		{  window.location.href=comeurl; 			}
			else 
			{return true; }
  }	
} 


function floatloginsimp(comeurl)
{  //alert(login_uname);
	if(login_uname=="")
   {    
			var floatstr="<div id=\'login_form\' style=\'width:200px; height:100px;border:#9a9a9a 1px solid; background-color:#efefef; POSITION: absolute;text-align:center;\'><form name=\'loginform1\' action=\'/club/login.aspx?action=fastlogin&home=1\' method=post>";
		 floatstr = floatstr+"<table align=\'center\' width=\'100%\' border=\'0\' cellspacing=\'0\' cellpadding=\'2\'><tr><td height=\'25\'>用户名：<input name=\'userid\' type=\'text\' size=\'12\' maxlength=\'20\' ></td></tr><tr><td height=\'25\'>密　码：<input name=\'userpassword\' type=\'password\' size=\'12\' maxlength=\'20\' /></td></tr><tr><td height=\'25\'>　<input type=\'checkbox\' name=\'saveuserpassword\' value=\'30\' checked>记住密码 &nbsp; <input name=\'login\' type=\'submit\' value=\'登录\' > &nbsp; <a href=/club/reg.shtml target=_blank>注册</a> <input type=hidden name=comeurl value="+comeurl+"></td></tr></table></form></div>";
		
		if(document.getElementById('pop_login')!=null)
		{   
	   	document.getElementById('pop_login').innerHTML= floatstr; 		
   	  document.loginform1.userid.focus(); 
    }
       return false;
  }
else
	 {  
		 return true;  
  }	
} 
