function openscript(url){var Win = window.open(url,'open','width=500,height=400,resizable=1,scrollbars=yes,menubar=no,status=yes' );}
//写cookies函数 
function SetCookie(name,value)//两个参数，一个是cookie的名子，一个是值
{
	    var Days = 365; //此 cookie 将被保存 365 天
    var exp  = new Date();    //new Date("December 31, 9998");
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
	if (getCookie(name)=="black")
	{
    document.cookie = name + "="+ escape ("none") + ";expires=" + exp.toGMTString();
	}
	else
	{
	 document.cookie = name + "="+ escape ("black") + ";expires=" + exp.toGMTString();

	}
	
}
function getCookie(name)//取cookies函数        
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
     if(arr != null) return unescape(arr[2]); return null;

}

function showtb(tbnum)
{whichEl = eval("tbtype" + tbnum);if (whichEl.style.display == "none"){eval("tbtype" + tbnum + ".style.display=\"\";");}else{eval("tbtype" + tbnum + ".style.display=\"none\";");}}
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -2;
 var space = 1;
 var isvisible;
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array
 
function menu_display(t_id,i_id){
	var t_id;
	var i_id;
	var on_img="/pic/menu_open.gif";
	var off_img="/pic/menu_close.gif";
			if (t_id.style.display == "none") {
			t_id.style.display="";
			i_id.src=on_img;
}
	else{
			t_id.style.display="none";
			i_id.src=off_img;
			}
}
 
function HideMenu() 
{
 var mX;
 var mY;
 var vDiv;
 var mDiv;
	if (isvisible == true)
{
		vDiv = document.all("menuDiv1");
		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' cellpadding=1 cellspacing=1 style='width:"+tWidth+"' class=td5 onmouseout='HideMenu()'><tr><td class=td3 align=center valign=top width=12>M<br>E<br>N<br>U</td><td class=td4 valign=top><p style='margin:4px'>" + vMnuCode + "</p></td></tr></table>";
	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+4;
	t = vSrc.offsetTop + topMar + h + space+3;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}
	menuDiv1.innerHTML = vMnuCode;
	menuDiv1.style.top = t;
	menuDiv1.style.left = l;
	menuDiv1.style.visibility = "visible";
	isvisible = true;
}

var i_messages = 0
var timer
function jspaper() {
if (document.all) {
content.innerHTML =messages[i_messages]
if (i_messages >= messages.length-1) {
i_messages = 0}       else {
            i_messages++}
    }
timer = setTimeout("jspaper()",4000)   }

var userhelp= '<a href=sms.asp>留言板</a><br><a href=search.asp>论坛搜索</a><br><a href=elselist.asp?action=today>今日新帖</a><br><a href=elselist.asp?action=good>论坛精华区</a><br><a href=elselist.asp?action=mytop>我发表的帖子</a><br><a href=elselist.asp?action=withmetop>我参与的帖子</a>'
var usersetup= '<a href=usersetup.asp?action=myinfo>修改资料</a><br><a href=usersetup.asp?action=mypwd>修改密码</a><br><a href=usersetup.asp?action=stylediy>自定义风格</a><br><a href=usersetup.asp?action=display>论坛显示设置</a>'
