var i=0;
var ii=3;

newDate=new Date()
newDate=""+newDate.getYear()+"-"+[newDate.getMonth()+1]+"-"+newDate.getDate()+""

//读取COOKIE
function getCookie (CookieName) { 
var CookieString = document.cookie; 
var CookieSet = CookieString.split (';'); 
var SetSize = CookieSet.length; 
var CookiePieces 
var ReturnValue = ""; 
var x = 0; 
for (x = 0; ((x < SetSize) && (ReturnValue == "")); x++) { 
CookiePieces = CookieSet[x].split ('='); 

if (CookiePieces[0].substring (0,1) == ' ') { 
CookiePieces[0] = CookiePieces[0].substring (1, CookiePieces[0].length); 
}

if (CookiePieces[0] == CookieName) {
ReturnValue = CookiePieces[1];
var value =ReturnValue
}


}
return value;
}


//跳出确认
function checkclick(msg){if(confirm(msg)){event.returnValue=true;}else{event.returnValue=false;}}


//显示帖子
function ShowPost(flag,id,username,content,posttime,honor,userface,sex,birthday,experience,membercode,faction,consort,money,postcount,regtime,userlife,usermail,userhome,sign,goodtopic,addscore,teacher,yuanchuang,yueshou,province,district,replyscore,showaddscore,myshow,editflag,doneflag,hero,heronow,sumhero,postman,flower,showdel)
{
document.write("<table class=a1 style=TABLE-LAYOUT:fixed cellPadding=5 width=97% align=center border=0 cellSpacing=1>");
ii++
if(ii==5){ii=3}
document.write("<tr class=a"+ii+"><td width=156 align=center valign=top>");
document.write("<table border=0 width=90%><tr><td><font style=font-size:10pt><a href='Profile.asp?username="+username+"'><b>"+username+"</b></a></font><br>"+honor+"</td><td align=right valign=top>");

if (""+sex+""!=''){
document.write("<img src=images/"+sex+".gif>　")
}

document.write(astro(""+birthday+""));
document.write("</td></tr></table>");

if(onlinelist.indexOf("|"+username+"|") == -1 ){
if (getCookie('showface')!='0'){
document.write("<img src='"+userface+"' alt='"+username+" 离线' onload='javascript:if(this.width>140)this.width=140;if(this.height>180)this.height=180;'>")
}
}else{
if (getCookie('showface')!='0'){
document.write("<img src='"+userface+"' alt='"+username+" 在线' onload='javascript:if(this.width>100)this.width=100;if(this.height>100)this.height=100;'>")
} 
}

document.write("<br><br><table border=0 width=90%><tr><td>"+level(experience,membercode,username,moderated,supermoderated)+levelimage+"<br>等级:"+levelname+"<br>");
if (""+faction+"" !="") {document.write("门　　派:"+faction+"<br>");}
if (""+consort+"" !="") {document.write("配　　偶:"+consort+"<br>");}
document.write("社区金币:<font color=red size='4px'><b>"+money+"</b></font><br>");
document.write("总发贴数:"+postcount+"<br>");
document.write("拥有鲜花:<font color=red size='4px'><b>"+sumhero+"</b></font><br>");
document.write("注册时间:"+regtime.split(" ")[0]+"<br>");
document.write("来自地域:"+province+" "+district+"<br>");

if(onlinelist.indexOf("|"+username+"|") == -1 ){document.write("在线状态:离线<br>");}
else{document.write("在线状态:<font color=red>在线</font><br>");}

//if (blogflag!=''){
//document.write("<a href='http://blog.zgyyzs.com/"+blogflag+"/default.aspx' target='_blank'><font color=blue>我的个人音乐主页</font></a><br>");
//}
if (teacher!=''){
document.write("<a href='http://www.zgyyzs.com/study/show_stutea_info.asp?id="+teacher+"' target='_blank'><font color=blue>我的音乐家教主页</font></a><br>");
}
if (yuanchuang!=''){
document.write("<a href='http://www.zgyyzs.com/yuanchuang/user_show.asp?username="+yuanchuang+"' target='_blank'><font color=blue>我的原创翻唱主页</font></a><br>");
}
if (yueshou!=''){
document.write("<a href='http://www.zgyyzs.com/act/show_bandman_info.asp?id="+yueshou+"' target='_blank'><font color=blue>我的演艺合作主页</font></a><br>");
}
if (myshow!=''){
document.write("<a href='http://www.zgyyzs.com/myshow/show_user.asp?username="+myshow+"' target='_blank'><font color=blue>我的我型我秀主页</font></a><br>");
}

if (i==0 ){document.write("<br>支持此帖请点<a href='flower.asp?id="+id+"&username="+username+"' target='_blank'><img src='../../music/image/hua2.gif' border='0'></a>");
if (hero!=0 ){document.write("<br>此帖已被送花<font color=red size='4px'><b>"+hero+"次</b></font>");
document.write("<br>2009楼主累积鲜花<font color=red size='4px'><b>"+heronow+"朵</b></font>");}
if (postman!='' ){document.write("<br>最近献花：<a href='Profile.asp?username="+postman+"'><font color=blue>"+postman+"</font></a>");}
}
else{document.write("<br>支持此回帖请点<a href='flower.asp?reid="+flag+"&username="+username+"' target='_blank'><img src='35.gif' border='0'></a>");
if (hero!=0 ){document.write("<br>此回帖已被送花<font color=red>"+hero+"次</font>");}
if (postman!='' ){document.write("<br>最近献花：<a href='Profile.asp?username="+postman+"'><font color=blue>"+postman+"</font></a>");}
}

document.write("</td></tr></table></td><td height=100%>");
if (i==0 ){
	if (addscore == 0){
        document.write("<table cellSpacing=0 cellPadding=0 width=100% border=0 height=100%><tr><td colspan=1 width=20% align=left></td><td colspan=3 width=80% align=right>[<font color=red><b>楼主</b></font>]");
	}
	else{
		document.write("<table cellSpacing=0 cellPadding=0 width=100% border=0 height=100%><tr><td colspan=1 width=20% align=left></td><td colspan=2 width=80% align=right>已奖励楼主<b><font color= red size=3>"+replyscore+"</font></b>金币 [<font color=red><b>楼主</b></font>]");
	}
}
else {
	document.write("<table cellSpacing=0 cellPadding=0 width=100% border=0 height=100%><tr><td colspan=1 width=30% align=left>");
	if (flower != 0){
document.write("<font style=font-size:14pt color=red><b>"+username+"已向楼主献花！</b><img src='../../music/image/hua2.gif' border='0' width='15'></font>");
	}
	
	if (replyscore != 0){
document.write("</td><td colspan=2 width=70% align=right>已奖励该楼<b><font color= red size=3>"+replyscore+"</font></b>金币 [第<font color=red><b>"+(i+1)+"</b></font>楼]");
	}
	else{
document.write("</td><td colspan=2 width=70% align=right>[第<font color=red><b>"+(i+1)+"</b></font>楼]");
	}
}

document.write("</td></tr>");


document.write("<tr valign=top><td colSpan=4 height=100% style=word-break:break-all>");



if(badlist.indexOf(username) == -1 ){
document.write(ybbcode("<span id=yu"+id+" style='font-size:12pt'>"+content+"</span>")); 
}else{
document.write("<span id=yu"+id+">==============================<br>　　　<font color=RED>该用户帖子已被过滤　　　</font><br>==============================</span>")
}
document.write("</td></tr><tr vAlign=top><td colSpan=4 align=left>")
if(getCookie('sign')!='0' && sign!=""){document.write("——————————<br><div style='OVERFLOW:auto' id=div"+id+">"+ybbcode(sign)+"</div>");}
document.write("</td></tr><tr vAlign=top><td valign=bottom></td><td width=20% color=red></td><td colSpan=1 width=70% valign=bottom align=right>"+posttime+"　");
if (editflag == 1){
  document.write("[<a href='EditTopic.asp?id="+topicid+"&retopicid="+flag+"'>编辑</a>] [<a href='retopic.asp?id="+topicid+"&retopicid="+flag+"&quote=1&topic="+topic+"'>引用</a>] ");
}
else{
  document.write("[<a href=javascript:copyText(document.all.yu"+id+")>复制</a>] [<a href='retopic.asp?id="+topicid+"&retopicid="+flag+"&quote=1&topic="+topic+"'>引用</a>] [<a href='retopic.asp?id="+topicid+"&topic="+topic+"'>回复</a>] ");
}
if (showaddscore == 1){
if (i==0){document.write("[<a href=addscoreF.asp?id="+id+">加分</a>] ");}
else{document.write("[<a href=addscoreR.asp?reid="+id+">加分</a>] ");}
}
if (showdel == 1){
document.write("[<a href=manage.asp?menu=deltopic&id="+topicid+"&retopicid="+flag+">删除帖子</a>] [<a href=managefile.asp?menu=delfile&id="+topicid+"&retopicid="+flag+">删除文件</a>]");
}
if (doneflag == 1 && i==0){
document.write(" [<a href=doneflag.asp?id="+id+">置为解决</a>]");
}
else{
document.write(" [<a href=manage.asp?menu=lookip&id="+topicid+"&retopicid="+flag+">IP已记录</a>]");
}
document.write("</td></tr></table></td></tr></table>")
if(getCookie('sign')!='0' && sign!=""){if(eval("div"+id+".scrollHeight")>360){eval("div"+id+".style.height=360")}}

if (goodtopic == 1) {
document.write("<div align=right><table border=0 width=120 height=94 id=tablegood cellspacing=0 cellpadding=0 style=position:absolute;left:700px;top:280px><tr><td background=images/imageisbest.gif width=120 height=94></td></tr></table></div>")
}

if (addscore != 0){
document.write("<div align=right><table border=0 width=120 height=94 id=tablegood cellspacing=0 cellpadding=0 style=position:absolute;left:750px;top:280px><tr><td background=images/imageaddscore.gif width=120 height=94></td></tr></table></div>")
}
i=i+1

}


//帖子列表
function ShowForum(ID,topic,newtopic,username,posttime,Views,icon,toptopic,locktopic,pollresult,goodtopic,replies,lastname,lasttime,manage,hero)
{
if(lasttime.indexOf(newDate) == 0){lasttime = lasttime.replace(newDate,"今日");}
if(posttime.indexOf(newDate) == 0){posttime = posttime.replace(newDate,"今日");topic=topic+"<img src=http://www.zgyyzs.com/image/new1.gif border=0>";}
topic = topic.replace(key_word,"<font color=red>"+key_word+"<\/font>");
if (toptopic == 2) {reimage="<img src=images/top.gif border=0>"}
else
if (toptopic == 1) {reimage="<img src=images/f_top.gif border=0>"}
else
if (locktopic== 1) {reimage="<img src=images/f_locked.gif border=0>"}
else
if (pollresult!= '') {reimage="<img src=images/f_poll.gif border=0>"}
else
if ((replies>15) || (Views>150)) {reimage="<img src=images/f_hot.gif border=0>"}
else
if (replies>0) {reimage="<img src=images/f_new.gif border=0>"}
else{reimage="<img src=images/f_norm.gif border=0>"}

if (goodtopic== 1) {reimage2="<img src=images/topicgood.gif>"}
else
if (username == cookieusername) {reimage2="<img src=images/my.gif>"}
else{reimage2=""}

if (replies>0) {reimage3=replies}
else{reimage3="-"}

if (icon>0) {icon="<img src=images/brow/"+icon+".gif>"}
if (toptopic != 0){
document.write("<tr height=32><td align=middle width=3% class=a6><a target=_blank href="+ID+".html>"+reimage+"</a></td>");
document.write("<td width=3% class=a6 align=center>"+reimage2+"</td>");
document.write("<td class=a7 width=45% onmouseout=\"this.className='a7'\" onmouseover=\"this.className='a6'\">&nbsp;<img loaded=no src=images/plus.gif id=followImg"+ID+" style=cursor:hand; onclick=loadThreadFollow("+ID+")> "+icon+" <a target=_blank href="+ID+".html><b>"+topic+"</b></a>");}
else{
document.write("<tr height=32><td align=middle width=3% class=a4><a target=_blank href="+ID+".html>"+reimage+"</a></td>");
if (manage==1){
  document.write("<td width=8% class=a3 align=center>[<a href=manage.asp?menu=deltopic&id="+ID+" target=_blank><font color=red>删除<\/font></a>]"+reimage2+"</td>");
}
else{
  document.write("<td width=3% class=a3 align=center>"+reimage2+"</td>");
}
document.write("<td class=a4 width=63% onmouseout=\"this.className='a4'\" onmouseover=\"this.className='a6'\">&nbsp;<img loaded=no src=images/plus.gif id=followImg"+ID+" style=cursor:hand; onclick=loadThreadFollow("+ID+")> "+icon+" <a target=_blank href="+ID+".html><b>"+topic+"</b></a>");
}

if (replies > 15) {
var topicpage=""
var tol=replies/15+1;

for (var i=1; i < tol; i++) {
if(i<4 || i>=tol-2){
topicpage=topicpage+"<b><a href=ShowPost.asp?id="+ID+"&topage="+ i +" target=_blank>"+ i +"</a></b> ";
}
if (i >= tol-3  && i<tol-2 && i>3){topicpage=topicpage+" ... ";}
}
document.write(" ( <img src=images/multipage.gif> "+topicpage+")");
}
if (toptopic != 0){
document.write(" "+newtopic+"</td><td class=a7 align=middle width=9%><a href=Profile.asp?username="+username+"><b>"+username+"</b></a><br>"+posttime+"</td><td align=middle width=6% class=a7>"+reimage3+"</td><td class=a7 align=middle width=7%>"+Views+"</td><td class=a7 align=middle width=7%>"+hero+"</td><td width=9%  class=a7 align=center ><a href=Profile.asp?username="+lastname+">"+lastname+"</a><br>"+lasttime+"</td></tr>");
document.write("<tr height=25 style=display:none id=follow"+ID+"><td width=3% class=a7>　</td><td width=3% class=a7>　</td><td id=followTd"+ID+" align=left class=a7 width=94% colspan=5>　Loading...</td></tr>");
}
else{
document.write(" "+newtopic+"</td><td class=a3 align=middle width=9%><a href=Profile.asp?username="+username+"><b>"+username+"</b></a><br>"+posttime+"</td><td align=middle width=6% class=a4>"+reimage3+"</td><td align=middle width=7% bgcolor=ECF7D2>"+Views+"</td><td align=middle width=7% bgcolor=ECF7D2>"+hero+"</td><td width=9%   class=a4 align=center><a href=Profile.asp?username="+lastname+">"+lastname+"</a><br>"+lasttime+"</td></tr>");
document.write("<tr height=25 style=display:none id=follow"+ID+"><td width=3% class=a4>　</td><td width=3% class=a3>　</td><td id=followTd"+ID+" align=left class=a4 width=94% colspan=5>　Loading...</td></tr>");
}
}

//论坛列表
function ShowList(pass,id,bbsname,icon,intro,moderated,today,toltopic,tolrestore,lasttime,author,lasttopic,password,lastname)
{
if(pass >2){password=1}

document.write("<tr><td width=5% align=middle bgcolor=DCF2E5>")

if(password==1){
document.write("<img height=35 width=21 src=images/skins/"+getCookie('skins')+"/boardsecret.gif>")
}else{
	if (today>0){
        document.write("<img height=35 width=21 src=images/skins/"+getCookie('skins')+"/boardhot.gif>")
    }
	else{
		document.write("<img height=35 width=21 src=images/skins/"+getCookie('skins')+"/boardcool.gif>")
	}

}

document.write("</td>")


if (id==1418){
	document.write("<td align=left bgcolor=F5F5FF valign=center><b><font size=3>[<a href=f-"+id+".html>"+bbsname+"</a>]</font></b><img src=http://www.zgyyzs.com/image/new1.gif border=0><br>"+intro+"</td>")
}
else{
	document.write("<td align=left bgcolor=F5F5FF valign=center><b><font size=3>[<a href=f-"+id+".html>"+bbsname+"</a>]</font></b><br>"+intro+"</td>")
}

if (icon!=''){
document.write("<td align=center valign=center  bgcolor=F5F5FF><img src="+icon+" width=40 height=40></td>")
}

var list= moderated.split ('|'); 
//if (password==1 || id==8){
//document.write("<td bgcolor=DCF2E5 rowspan=1 width=8% align=center> </td>")
//}
//else{
document.write("<td bgcolor=DCF2E5 rowspan=1 width=8% align=center>")
//}
//if (list[0]=='' && password!=1 && id!=8)
if (list[0]=='')
    document.write("诚邀版主")
else{
for(i=0;i<list.length;i++) {
if (list[i] !=''){
document.write("<a href=profile.asp?username="+list[i]+">"+list[i]+"</a><br>")
}
}
}

document.write("</td><td bgcolor=F5F5FF rowspan=1 width=6% align=center><font color=red size=4><b>"+today+"</b></font></td><td bgcolor=DCF2E5  rowspan=1 width=6% align=center><font size=3>"+toltopic+"</font></td>")

if(password==1){
document.write("<td bgcolor=F5F5FF rowspan=1 width=12% valign=center align=left><b><font color=4C06B5>需授权论坛</b></font></td>")
}else{
document.write("<td bgcolor=F5F5FF rowspan=1 width=12% valign=center align=left><font size=2>"+lasttopic+"</font>")

document.write("<br>"+lastname+"</td>")

}
document.write("</tr>")

}

//论坛列表
function ShowHomeList(pass,id,bbsname,icon,intro,moderated,today,toltopic,tolrestore,lasttime1,lastname1,lasttopic1,lasttime2,lastname2,lasttopic2,lasttime3,lastname3,lasttopic3,password)
{
if(pass >2){password=1}

document.write("<tr><td width=5% align=middle bgcolor=DCF2E5>")

if(password==1){
document.write("<img height=35 width=21 src=images/skins/"+getCookie('skins')+"/boardsecret.gif>")
}else{
	if (today>0){
        document.write("<img height=35 width=21 src=images/skins/"+getCookie('skins')+"/boardhot.gif>")
    }
	else{
		document.write("<img height=35 width=21 src=images/skins/"+getCookie('skins')+"/boardcool.gif>")
	}

}

document.write("</td>")

document.write("<td align=left bgcolor=F5F5FF valign=center><table cellSpacing=0 cellPadding=0 width=100% border=0><tr><td><table width=100% cellspacing=0 cellPadding=0 border=0 background=images/skins/1/forumtitlebg.gif><tr height=25><td><b><font size=3>[<a href=f-"+id+".html>"+bbsname+"</a>]</font></b>  <font color=888899>版主：")
var list= moderated.split ('|'); 																			 
if (list[0]=='')
    document.write("诚邀版主")
else{
for(i=0;i<list.length;i++) {
if (list[i] !=''){
document.write("<a href=profile.asp?username="+list[i]+">"+list[i]+"</a> ")
}
}
}

document.write("</font></td></tr></table></td></tr><tr><td height=100%><a href=f-"+id+".html><img src=images/jiantou.bmp border=0></a>  "+intro+"</td></tr></table></td>")

if (icon!=''){
document.write("<td align=center valign=center  bgcolor=F5F5FF><img src="+icon+" width=40 height=40></td>")
}

if(password==1){
document.write("</td><td bgcolor=F5F5FF rowspan=1 width=60% valign=center align=left><b><font color=4C06B5>需授权论坛</b></font></td>")
}else{
document.write("</td><td bgcolor=F5F5FF rowspan=1 width=60% valign=center align=left><font size=2 color=red>1.</font><font size=2>"+lasttopic1+"</font>")

//if(repost==''||repost==null){
document.write("  <a href=Profile.asp?username="+lastname1+">"+lastname1+"</a><br><font size=2>2."+lasttopic2+"</font>  <a href=Profile.asp?username="+lastname2+">"+lastname2+"</a><br><font size=2>3."+lasttopic3+"</font>  <a href=Profile.asp?username="+lastname3+">"+lastname3+"</a></td>")
}
document.write("<td bgcolor=DCF2E5 rowspan=1 width=8% align=left>")

document.write("今日：<font color=red size=3>"+today+"</font><br>")
document.write("主题："+toltopic+"</td>")


//}

//else{
//document.write("<br><a href=Profile.asp?username="+lastname+">"+lastname+"</a><br>"+lasttime+"<br>回复：<a href=Profile.asp?username="+repost+">"+repost+"</a></td>")
//}

document.write("</tr>")

}

function SmallShowList(id,bbsname,intro,moderated,today,toltopic,tolrestore)
{
intro = intro.replace(/<br>/ig,"\n");

i++;
if (i==1){document.write("<tr>")}

document.write("<td><table border=0 width=100% cellspacing=0 cellpadding=4><tr bgcolor=FFFFFF><td colspan=3 title='"+intro+"'>『 <a href=f-"+id+".html>"+bbsname+"</a> 』</td></tr><tr bgcolor=FFFFFF><td><img src=images/Forum_nav.gif alt=今日> <font color=red>"+today+"</font></td><td><img src=images/Forum_nav.gif alt=主题> "+toltopic+"</td><td><img src=images/Forum_nav.gif alt=帖子> "+tolrestore+"</td></tr><tr class=a3><td colspan=3>版主：")

var list= moderated.split ('|'); 
if (list.length!=0){document.write("<a href=profile.asp?username="+list[0]+">"+list[0]+"</a>")}
if (list.length>1){document.write(" <font color=gray>...</font>")}

document.write("</td></tr></table></td>")

if (i==3){i=0;document.write("</tr>")}

}


function makeupShowList()
{
if (i!=0){
for(jj=i;jj<3;jj++){document.write("<td bgcolor=FFFFFF></td>")}
i=0
}
}

//跳转页面显示
function ShowPostPage(TotalPage,topage,url){
if (topage<6){PageLong=11-topage;}
else
if (TotalPage-topage<6){PageLong=10-(TotalPage-topage)}
else{PageLong=5;}

for (var i=1; i <= TotalPage; i++) {
if (i < topage+PageLong && i > topage-PageLong || i==1 || i==TotalPage){
if (topage==i){document.write(" "+ i +" ");}else{document.write(" <a href=showpost.asp?topage="+i+"&"+url+">"+ i +"</a> ");}
}
}

}

//跳转页面显示
function ShowForumPage(TotalPage,topage,url){
if (topage<6){PageLong=11-topage;}
else
if (TotalPage-topage<6){PageLong=10-(TotalPage-topage)}
else{PageLong=5;}

for (var i=1; i <= TotalPage; i++) {
if (i < topage+PageLong && i > topage-PageLong || i==1 || i==TotalPage){
if (topage==i){document.write(" "+ i +" ");}else{document.write(" <a href=showforum.asp?topage="+i+"&"+url+">"+ i +"</a> ");}
}
}

}

//跳转页面显示
function ShowPage(TotalPage,topage,url){
if (topage<6){PageLong=11-topage;}
else
if (TotalPage-topage<6){PageLong=10-(TotalPage-topage)}
else{PageLong=5;}

for (var i=1; i <= TotalPage; i++) {
if (i < topage+PageLong && i > topage-PageLong || i==1 || i==TotalPage){
if (topage==i){document.write(" "+ i +" ");}else{document.write(" <a href=?topage="+i+"&"+url+">"+ i +"</a> ");}
}
}

}
//菜单
var menuOffX=0	//菜单距连接文字最左端距离
var menuOffY=20	//菜单距连接文字顶端距离

var ie4=document.all&&navigator.userAgent.indexOf("Opera")==-1
var ns6=document.getElementById&&!document.all
function showmenu(e,vmenu,mod){
	which=vmenu
	menuobj=document.getElementById("popmenu")
	menuobj.thestyle=menuobj.style
	menuobj.innerHTML=which
	menuobj.contentwidth=menuobj.offsetWidth
	eventX=e.clientX
	eventY=e.clientY
	var rightedge=document.body.clientWidth-eventX
	var bottomedge=document.body.clientHeight-eventY

		if (rightedge<menuobj.contentwidth)
			menuobj.thestyle.left=document.body.scrollLeft+eventX-menuobj.contentwidth+menuOffX
		else
			menuobj.thestyle.left=ie4? ie_x(event.srcElement)+menuOffX : ns6? window.pageXOffset+eventX : eventX
		
		if (bottomedge<menuobj.contentheight&&mod!=0)
			menuobj.thestyle.top=document.body.scrollTop+eventY-menuobj.contentheight-event.offsetY+menuOffY-23
		else
			menuobj.thestyle.top=ie4? ie_y(event.srcElement)+menuOffY : ns6? window.pageYOffset+eventY+10 : eventY

	menuobj.thestyle.visibility="visible"
}


function ie_y(e){  
	var t=e.offsetTop;  
	while(e=e.offsetParent){  
		t+=e.offsetTop;  
	}  
	return t;  
}  
function ie_x(e){  
	var l=e.offsetLeft;  
	while(e=e.offsetParent){  
		l+=e.offsetLeft;  
	}  
	return l;  
}

function highlightmenu(e,state){
	if (document.all)
		source_el=event.srcElement
		while(source_el.id!="popmenu"){
			source_el=document.getElementById? source_el.parentNode : source_el.parentElement
			if (source_el.className=="menuitems"){
				source_el.id=(state=="on")? "mouseoverstyle" : ""
		}
	}
}


function hidemenu(){if (window.menuobj)menuobj.thestyle.visibility="hidden"}
function dynamichide(e){if ((ie4||ns6)&&!menuobj.contains(e.toElement))hidemenu()}
document.onclick=hidemenu
document.write("<div class=menuskin id=popmenu onmouseover=highlightmenu(event,'on') onmouseout=highlightmenu(event,'off');dynamichide(event)></div>")
// 菜单END

// add area script
function focusEdit(editBox)
{
 if ( editBox.value == editBox.helptext )
 {
 editBox.value = '';
 editBox.className = 'editbox';
 }
 return true;
}
function blurEdit(editBox)
{
 if ( editBox.value.length == 0 )
 {
 editBox.className = 'editbox Graytitle';
 editBox.value = editBox.helptext;
 }
}
function ValidateTextboxAdd(box, button)
{
 var buttonCtrl = document.getElementById( button );
 if ( buttonCtrl != null )
 {
 if (box.value == "" || box.value == box.helptext)
 {
 buttonCtrl.disabled = true;
 }
 else
 {
 buttonCtrl.disabled = false;
 }
 }
}
// add area script end


function loadtree(ino){
document.frames["hiddenframe"].location.replace("ForumTree.asp?id="+ino+"")
}

function loadtreeNew(ino){
document.frames["hiddenframe"].location.replace("ForumTreeNew.asp?id="+ino+"")
}

function loadThreadFollow(ino,online){
var targetImg =eval("followImg" + ino);
var targetDiv =eval("follow" + ino);
if (targetDiv.style.display!='block'){
if(targetImg.loaded=="no"){document.frames["hiddenframe"].location.replace("loading.asp?id="+ino+"&forumid="+online+"");}
targetDiv.style.display="block";
targetImg.src="images/minus.gif";
}else{
targetDiv.style.display="none";
targetImg.src="images/plus.gif";
}
}
document.write("<iframe height=0 width=0 name=hiddenframe></iframe>")
