function Forum()
{
	//this.Forum_Type=Forum_Type;
	this.Forum_copyright='Copyright &copy;2002 - 2003  <a href="http://www.dvbbs.net"><font face=Verdana, Arial, Helvetica, sans-serif size=1><b>Dvbbs<font color=#CC0000>.Net</font></b></font></a>';
	this.Version='   Powered by:<a href="http://www.dvbbs.net/">Dvbbs Version 6.1.0 </a> ';
	this.stylelist='样式列表菜单';
	this.Manage='用户控制面版菜单';
	this.link= new Array();//文字链接
	this.linkpic=new Array();//图片链接
	this.Forum_skin=new Array();
	this.Forum_skinid=new Array();
	this.Stats=''
	this.FindUser= new Boolean();
	this.FindUser=false;
	this.Master=new Boolean();
	this.Master=false;
	this.GroupName=new Array()
	this.UserHidden='2';
	this.UserID='0';
	this.ErrInfo=new Array();//错误信息数组
	this.sendmsgnum=0;
	this.list=new Array();
	this.Alllist=new Array();
	this.currentpage=1
	this.BoardType='';
}
var Dvbbs=new Forum();
function links(type)
{
	this.type=type
}
function bbslist(bbstype)
{
	this.bbstype=bbstype
	this.boardid=new Array();
	this.BoardType=new Array();
	this.readme=new Array();
	this.BoardMaster=new Array();
	this.lastbbsnum=new Array();
	this.lasttopicnum=new Array();
	this.indexIMG=new Array();
	this.todayNum=new Array();
	this.boarduser=new Array();
	this.LastPost=new Array();
	this.Orders=new Array();
	this.sid=new Array();
	this.ParentID=new Array();
	this.ParentStr=new Array();
	this.Depth=new Array();
	this.RootID=new Array();
	this.Child=new Array();
	this.Board_Setting=new Array();
	this.HaveNew=new Array();
	this.IsShow= new Array();
}

function request(parametername)//取得指定名称的参数值的函数
{
	var ThisStr='';
	if (parametername!='')
	{
		parametername=parametername.toLowerCase();
		if (document.location.search!='')
		{
			var ThisTmpStr=document.location.search;
			ThisTmpStr=ThisTmpStr.toLowerCase();
			ThisTmpStr=ThisTmpStr.replace("?","")
			ThisTmpStr=ThisTmpStr.split("&");
			for (i=0;i<ThisTmpStr.length;i++)
			{
				if (ThisTmpStr[i].indexOf(parametername,0)!=-1)
				{
					str=ThisTmpStr[i].replace(parametername+'=',"");
					break;  
				}
			}
		}
	}
	return(ThisStr);
}
Dvbbs.BoardID=request("BoardID");

if (Dvbbs.BoardID=='')
{
	Dvbbs.BoardID=0	;
}
function Showpic(picurl,vTitle)
{
	if (picurl!='')
	{
		if (vTitle=="")
		{
			return('<img border=0 src="'+picurl+'" align="absmiddle" >');
		}
		else
		{
			return('<img border=0 src="'+picurl+'" title="'+vTitle+'" align="absmiddle">');
		}
	}
}


//一般标题过滤
function dvhtmlencode(str)
{
	if (str!='')
	{
		str=str.replace(">","&gt;")
		str=str.replace("<","&lt;")
		str=str.replace(" ","&nbsp;")
		for (iii=0;iii<=Dvbbs.Badwords.length ;iii++ )
		{
			str=str.replace(Dvbbs.Badwords[iii],"*")
		}
	}
	else
	{
		str='';
		
	}return(str);
}
//针对js特效菜单中的过滤
function vhtmlencode(str)
{
	if (str!='')
	{
		str=str.replace(">","》")
		str=str.replace("<","《")
		str=str.replace("&gt;","》")
		str=str.replace("&lt;","《")
		str=str.replace(" ","&nbsp;")
		str=str.replace("&#34","“")
		str=str.replace("&#39","‘")
		for (iii=0;iii<=Dvbbs.Badwords.length ;iii++ )
		{
			str=str.replace(Dvbbs.Badwords[iii],"*")
		}
	}
	else
	{
		str='';
	}
return(str);
}


//上一版本中现在继续使用的JS

//标题处理开始
//***********默认设置定义.*********************
tPopWait=50;//停留tWait豪秒后显示提示。
tPopShow=5000;//显示tShow豪秒后关闭提示
showPopStep=20;
popOpacity=99;
//***************内部变量定义*****************
sPop=null;
curShow=null;
tFadeOut=null;
tFadeIn=null;
tFadeWaiting=null;
document.write('<style type="text/css" id="defaultPopStyle">');
document.write('.cPopText {  background-color: #F8F8F5;color:#000000; border: 1px #000000 solid;font-color: font-size: 12px; padding-right: 4px; padding-left: 4px; height: 20px; padding-top: 2px; padding-bottom: 2px; filter: Alpha(Opacity=0)}');
document.write('</style>');
document.write('<div id="dypopLayer" style="position:absolute;z-index:1000;" class="cPopText"></div>');
function showPopupText()
{
	var o=event.srcElement;
	MouseX=event.x;
	MouseY=event.y;
	if(o.alt!=null && o.alt!='')
	{
		o.dypop=o.alt;o.alt=''
	}
	if(o.title!=null && o.title!="")
	{
		o.dypop=o.title;o.title=''
	}
	if(o.dypop!=sPop)
	{		
		sPop=o.dypop;
		clearTimeout(curShow);
		clearTimeout(tFadeOut);
		clearTimeout(tFadeIn);
		clearTimeout(tFadeWaiting);	
		if(sPop==null || sPop=='') 
		{
			dypopLayer.innerHTML='';
			dypopLayer.style.filter='Alpha()';
			dypopLayer.filters.Alpha.opacity=0;	
		}
		else 
		{
			if(o.dyclass!=null) popStyle=o.dyclass 
			else popStyle='cPopText';
			curShow=setTimeout('showIt()',tPopWait);
		}
	}
}
	
function showIt()
{
		dypopLayer.className=popStyle;
		dypopLayer.innerHTML=sPop;
		popWidth=dypopLayer.clientWidth;
		popHeight=dypopLayer.clientHeight;
		if(MouseX+12+popWidth>document.body.clientWidth) popLeftAdjust=-popWidth-24
			else popLeftAdjust=0;
		if(MouseY+12+popHeight>document.body.clientHeight) popTopAdjust=-popHeight-24
			else popTopAdjust=0;
		dypopLayer.style.left=MouseX+12+document.body.scrollLeft+popLeftAdjust;
		dypopLayer.style.top=MouseY+12+document.body.scrollTop+popTopAdjust;
		dypopLayer.style.filter='Alpha(Opacity=0)';
		fadeOut();
}

function fadeOut(){
	if(dypopLayer.filters.Alpha.opacity<popOpacity) 
	{
		dypopLayer.filters.Alpha.opacity+=showPopStep;
		tFadeOut=setTimeout('fadeOut()',1);
	}
	else 
	{
		dypopLayer.filters.Alpha.opacity=popOpacity;
		tFadeWaiting=setTimeout('fadeIn()',tPopShow);
		}
}

function fadeIn(){
	if(dypopLayer.filters.Alpha.opacity>0)
	 {
		dypopLayer.filters.Alpha.opacity-=1;
		tFadeIn=setTimeout('fadeIn()',1);
	}
}
document.onmouseover=showPopupText;
//标题处理结束
//下拉菜单相关代码
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -5;
 var space = 1;
 var isvisible;
 var MENU_SHADOW_COLOR='#999999';//定义下拉菜单阴影色
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array

function HideMenu() 
{
 	var mX;
 	var mY;
 	var vDiv;
 	var mDiv;
	if (isvisible == true)
	{
		vDiv = document.all("menuDiv");
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight))
		{
			vDiv.style.visibility = "hidden";
			isvisible = false;
		}
	}
}

function ShowMenu(vMnuCode,tWidth) 
{
	vSrc = window.event.srcElement;
	vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=tableborder1 onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=tablebody1 valign=top >" + vMnuCode + "</td></tr></table>";

	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+4;
	t = vSrc.offsetTop + topMar + h + space-2;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menuDiv.innerHTML = vMnuCode;
	menuDiv.style.top = t;
	menuDiv.style.left = l;
	menuDiv.style.visibility = "visible";
	isvisible = true;
    makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}
function makeRectangularDropShadow(el, color, size)
{
	var i;
	for (i=size; i>0; i--)
	{
		var rect = document.createElement('div');
		var rs = rect.style
		rs.position = 'absolute';
		rs.left = (el.style.posLeft + i) + 'px';
		rs.top = (el.style.posTop + i) + 'px';
		rs.width = el.offsetWidth + 'px';
		rs.height = el.offsetHeight + 'px';
		rs.zIndex = el.style.zIndex - i;
		rs.backgroundColor = color;
		var opacity = 1 - i / (i + 1);
		rs.filter = 'alpha(opacity=' + (100 * opacity) + ')';
		el.insertAdjacentElement('afterEnd', rect);
		global.fo_shadows[global.fo_shadows.length] = rect;
	}
}
