document.write('<div id="header_main">');
document.write('<div id="outer">');
document.write('<div id="logo">');
document.write('</div>');
document.write('<div id="nav_main">');
document.write('<ul id="nav">');
document.write('<li><a href="http://www.yokagames.com/" class="no-arrow">游卡首页</a>');
document.write('</li>');
document.write('<li><a href="JavaScript:;" onMouseOver="JavaScript:headermenuFix();">游卡产品</a>');
document.write('<ul>');
document.write('<li><a href="http://sgs.yokagames.com" class="no-arrow">三国杀</a></li>');
document.write('<li><a href="http://q.yokagames.com">Q版三国杀</a></li>');
document.write('<li><a href="http://zadan.yokagames.com">砸 &nbsp;蛋</a></li>');
document.write('<li><a href="http://fushen.yokagames.com">福 &nbsp;神</a></li>');
document.write('<li><a href="http://www.yokagames.com/index.php?action-viewnews-itemid-44">周边产品</a></li>');
document.write('</ul>');
document.write('</li>');
//document.write('<li><a href="JavaScript:;">最新活动</a>');
//document.write('</li>');
document.write('<li><a href="http://blog.sina.com.cn/sgsol" target="_blank">团队博客</a>');
document.write('</li>');
document.write('<li><a href="http://ask.yokagames.com">YOKA问问</a>');
document.write('</li>');
document.write('<li><a href="http://www.yokagames.com/?action-channel-name-howtobuy">如何购买</a>');
document.write('</li>');
document.write('<li><a href="http://www.yokagames.com/?action-viewnews-itemid-39">客服信息</a>');
document.write('</li>');
document.write('<li><a href="http://forum.yokagames.com">官方论坛</a>');
document.write('</li>');
document.write('<li><a href="http://forum.yokagames.com/check.php?typeid=1">正版认证</a>');
document.write('</li>');
document.write('</ul>');
document.write('</div>');
if (s_uid_lee > 0)
{
document.write('<div id="login">');
//document.write('<a class="login_img" href="JavaScript:void(0);"><img src="http://simg.yokagames.com/home/logedin.gif" width="19" height="19" /></a>');
document.write('<a href="http://forum.yokagames.com/memcp.php">'+s_username_lee+'</a>');
document.write('<a href="/batch.login.php?action=logout">退出</a>');
document.write('</div>');
document.write('<div id="popDiv"></div>');
document.write('</div>');
document.write('</div>');
} else {
document.write('<div id="login">');
//document.write('<a class="login_img"  href="JavaScript:void();"><img  src="http://simg.yokagames.com/home/login.jpg" alt="点击登录" onclick="popManngerDiv(\'login_box_zd\',\'400\',\'200\')"/></a>');
document.write('<a class="login_img"  href="http://forum.yokagames.com/logging.php?action=login&referer='+escape(top.location.href)+'"><img src="http://simg.yokagames.com/home/login.jpg" alt="点击登录" /></a>');
//document.write('<a href="JavaScript:void(0);" onclick="popManngerDiv(\'login_box_zd\',\'400\',\'200\')">登录</a>');
document.write('<a href="http://forum.yokagames.com/logging.php?action=login&referer='+escape(top.location.href)+'" >登录</a>');
//document.write('<a href="JavaScript:void(0);" onclick="popManngerDiv(\'register_box\',\'400\',\'300\')">注册会员</a>');
document.write('<a href="http://forum.yokagames.com/register.php?referer='+escape(top.location.href)+'" >注册会员</a>');
document.write('</div>');
document.write('<div id="popDiv"></div>');
document.write('</div>');
document.write('</div>');
//document.write('<div id="login_box_zd">');
//document.write('<div><input type="image" src="http://simg.yokagames.com/home/close-bg.jpg" border="none" onclick="closePopManager(\'login_box_zd\');"/></div>');
//document.write('<iframe src="http://acc.3322.org/logging.php?action=login&randx='+Math.random()+'" width="460" height="280" scrolling="no"></iframe>');
//document.write('</div>');
//document.write('<div id="register_box">');
//document.write('<div><input type="image" src="http://simg.yokagames.com/home/close-bg.jpg" border="none" onclick="closePopManager(\'register_box\');"/></div>');
//document.write('<iframe src="http://acc.3322.org/register.php?randx='+Math.random()+'" width="460" height="320" scrolling="no"></iframe>');
//document.write('</div>');
}

function headermenuFix() {
 var sfEls = document.getElementById("nav").getElementsByTagName("li");
 for (var i=0; i<sfEls.length; i++) {
  sfEls[i].onmouseover=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onMouseDown=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onMouseUp=function() {
  this.className+=(this.className.length>0? " ": "") + "sfhover";
  }
  sfEls[i].onmouseout=function() {
  this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),
"");
  }
 }
}
//window.onload=headermenuFix;
function popManngerDiv(divname,width,height){
	var popDiv = document.getElementById("popDiv");
	popDiv.style.display ="block";
	_scrollWidth = Math.max(document.body.scrollWidth,document.documentElement.scrollWidth);
	_scrollHeight = Math.max(document.body.scrollHeight,document.documentElement.scrollHeight);
	popDiv.style.width = _scrollWidth + "px";
	popDiv.style.height = _scrollHeight + "px";
	popDiv.style.top = "0px";
	popDiv.style.left = "0px";
	popDiv.style.background = "#000";
	popDiv.style.filter = "alpha(opacity=30)";
	popDiv.style.opacity = "0.70";
	var newDiv = document.getElementById(divname);
	newDiv.style.position = "absolute";
	newDiv.style.zIndex = "9999";
	newDivWidth = width;
	newDivHeight = height;
	newDiv.style.display ="block";
	newDiv.style.top = (document.body.scrollTop + document.body.clientHeight/2 - newDivHeight) + "px";
	newDiv.style.left = (document.body.scrollLeft + document.body.clientWidth/2 - newDivWidth/2) + "px";
	newDiv.style.border = "1px solid #ccc";
}
function closePopManager(divname){
	var newDiv = document.getElementById(divname);
	var popDiv = document.getElementById("popDiv");
	popDiv.style.display ="none";
	newDiv.style.display = "none";
}