	function getCookies(cookName){
		var cookies = document.cookie.split('; ');
		for (var i=0; i<cookies.length;i++){
			if(cookies[i].indexOf(cookName + '=') == 0){
				return cookies[i].substring(cookies[i].indexOf('=')+1);
			}
		}
	} 
	var topInfo = {
		ifLogin:typeof(getCookies('DedeLoginID')) != "undefined",
		host:window.location,
		imgUrl:"http:\/\/www.lezi.com\/resources\/theme\/default\/",
		iconUrl:"http:\/\/www.lezi.com\/resources\/theme\/default\/style\/images\/info\/"
	}
	topInfo.LoginID = topInfo.ifLogin ? getCookies('DedeLoginID') : "用户名获取错误";
	topInfo.loginOutDis = topInfo.ifLogin ? "style='display:none;'" : "";
	topInfo.loginInDis = topInfo.ifLogin ? "" : "style='display:none;'";
	document.writeln("<style>");
	document.writeln("@charset \"utf-8\";body,h1,h2,h3,h4,h5,h6,hr,p,blockquote,dl,dt,dd,ul,ol,li,pre,fieldset,lengend,button,input,textarea,th,td,form,select{margin:0;padding:0;}body,button,select,textarea{font:12px\/1 Arial,\"\\5b8b\\4f53\",sans-serif;}h1 h2 h3 h4,h5,h6{font-size:100%;}ul,ol{list-style:none;}.topmenu a{text-decoration:none;color:#666;}.topmenu a:hover{text-decoration:underline;color:#639A00;}.topmenu a img{border:0}q:before,q:after{content:\'\';}html{overflow-y:scroll;}.topmenu{height:31px;background:url("+topInfo.imgUrl+"images\/topmenu-bg.png) repeat-x;position:relative;z-index:999;}.topmenu .icon,.tm-game-enter,.tm-game-list-con .btn,.top-login-in .hover,.top-msg,.top-gift{background:url("+topInfo.imgUrl+"images\/topmenu.png) no-repeat;}.topmenu .icon a,.tm-game-list-con .btn{overflow:hidden;text-indent:-9999em;display:block;}.topmenu-box{color:#666;height:31px;width:940px;margin:0 auto;}.topmenu .icon,.topmenu .icon a{height:30px;width:85px;}.topmenu .icon{margin:0 0 0 10px;float:left;display:inline;}.top-login-out,.top-login-in{height:31px;float:left;margin:0 0 0 15px;position:relative;}.top-login-in .top-user{overflow:hidden;height:31px;float:left;}.top-login-in .hover{background-position:-462px -100px;}.top-user-link{width:300px;border:1px solid #d5d5d5;position:absolute;top:31px;left:-30px;background:#fff;padding:5px 25px 12px;line-height:24px;}.top-user-link dt{color:#f60;font-weight:bold;margin:0 11px;}.top-user-link dd{padding:0 0 5px;border-bottom:1px solid #d5d5d5;}.top-user-link dd a{color:#666;margin:0 12px;}.top-out{border:0;background:none;color:#999;width:43px;cursor:pointer;}.focus-link{font-size:14px;font-weight:bold;line-height:30px;height:30px;color:#555;width:290px;float:left;}.focus-link a{font-size:12px;font-weight:normal;color:#555;}.tm-links{float:right;height:30px;position:relative;}.tm-pay,.tm-cs,.tm-bookmark,.tm-desktop{float:left;*display:inline;padding:1px 15px;margin-top:9px;}.tm-game-list{width:200px;background:#fff;border:6px solid #7db312;border-top-width:4px;position:absolute;top:31px;right:0;color:#000;}.tm-game-list li{height:54px;padding:5px 10px;border-top:1px solid #ddd;}.tm-game-list-img{width:50px;height:50px;padding:1px;border:1px solid #ddd;}.tm-game-list-con{width:126px;height:50px;margin:-52px 0 0 59px;padding:2px 0 0 0;}.tm-game-list-con h6{height:20px;line-height:20px;font-size:14px;}.tm-game-list-con .btn{width:53px;height:20px;background-position:0 -40px;margin:-20px 0 0 70px;} .tm-game-list-con a{line-height:30px;} .tm-game-list-con p{margin:8px 0 0 0;color:#555;}.tm-game-list-con p font{color:#f60;font-size:12px;font-weight:bold;}.tm-game-enter{height:31px;width:97px;background-position:-100px 0;text-align:center;font-weight:bold;color:#fff;float:left;text-indent:-9999px;}.tm-pay,.tm-cs{font-weight:bold;}a.green-link{color:#639A00;}.space-line{border-right:1px solid #ccc;}.tm-hello,.tm-login,.tm-reg,.tm-edit{float:left;*display:inline;padding:1px 15px;margin-top:9px;}.tm-hello{padding-left:0;}.tm-out{float:left;margin-top:8px;}.top-username{color:#639A00;} .top-msg,.top-gift{display:inline-block;height:30px;width:30px;text-indent:-999em;margin:0 5px 0 0;}.tm-msg{float: left; height: 30px; line-height: 30px;zoom:1;overflow:hidden;position:relative; width:150px;}.top-msg{background-position:right -60px;}.top-gift{background-position:right -30px;}.id-card-msg{float: left; height: 20px; line-height: 30px;margin-top:8px;}.tm-game-list-con h6 a{color:#000;line-height: 20px;font-weight:bold;}.tm-title{float:left;margin-top:9px;padding:1px 15px;font-weight:bold;}");
	document.writeln("<\/style>");
	document.writeln("<div class=\"topmenu\">");
	document.writeln("	<div class=\"topmenu-box\" >");
//	document.writeln("		<h3 class=\"icon\" ><a href=\"http://www.lezi.com/index.php" title=\"乐子网\" >乐子网<\/a><\/h3>");
	document.writeln("		<div class=\"top-login-out\" "+topInfo.loginOutDis+"> <!--登录前-->");
	document.writeln("			<span class=\"tm-hello\">您好，欢迎来到<a class=\"green-link\" href=\"http://www.lezi.com/index.php\" title=\"乐子网\" >乐子网<\/a>！<\/span>");
	document.writeln("			<a class=\"tm-login space-line\" title=\"登录\" href=\"http://www.lezi.com/index.php/login/index/?forward="+topInfo.host+"\" >请登录<\/a>");
	document.writeln("			<a class=\"tm-reg\" title=\"注册乐子通行证\" href=\"http:\/\/www.lezi.com/index.php/reg/index/?forward="+topInfo.host+"\" >注册乐子通行证<\/a>");
//	document.writeln("			<a id=\"icon-link\" title=\"设为桌面图标\" href=\"http:\/\/www.lezi.com/desktop_icon.php\" >设为桌面图标<\/a>");
	document.writeln("		<\/div>");
	document.writeln("		<div class=\"top-login-in\" "+topInfo.loginInDis+"><!--登录后-->");
	document.writeln("			<div id=\"topUserInfo\" class=\"top-user\" >");
	document.writeln("				<span class=\"tm-hello\">您好，<a class=\"top-username\" href=\"http:\/\/www.lezi.com\/index.php\/user\/basic\" >"+topInfo.LoginID+"<\/a>！<\/span>");
		document.writeln("<span class=\"id-card-msg\" ><a href=\"http://www.lezi.com/index.php/user/authentic\" title=\"未进行身份认证\"><img src=\"http://www.lezi.com/resources/theme/lezi_v2/images/id_card_verify.gif\"/></a></span>");
		document.writeln("				<span class=\"tm-msg\">&nbsp;<span class=\"top-msg\" >站内信</span>(<a style=\"color:#f60; \" href=\"http://www.lezi.com/index.php/pm\"></a>)&nbsp;<span class=\"top-gift\" >礼包</span>(<a style=\"color:#f60; \" href=\"http://www.lezi.com/index.php/vip/gift\"?></a>)<\/span>");
	document.writeln("				<form class=\"tm-out\" target=\"_top\" method=\"post\" action=\"http:\/\/passport.lezi.com\/user\/action\/loginout.php\">");
	document.writeln("					<input type=\"hidden\" value=\"redirect\" name=\"act_type\">");
	document.writeln("					<input type=\"hidden\" value=\""+topInfo.host+"\" name=\"quit_forward\" id=\"quit_forward\">");
	document.writeln("					<input class=\"top-out\" type=\"submit\" value=\"注销\" name=\"\">");
	document.writeln("				<\/form>");
	document.writeln("			<\/div>");
/*	document.writeln("			<dl id=\"myLezi\" class=\"top-user-link\" style=\"display:none;\" >");
	document.writeln("				<dt>我的乐子<\/dt>");
	document.writeln("				<dd>");
	document.writeln("					<a href=\"#\" title=\"账号信息\">账号信息<\/a>");
	document.writeln("					<a href=\"#\" title=\"修改密码\">修改密码<\/a>   ");
	document.writeln("					<a href=\"#\" title=\"密保邮箱\">密保邮箱<\/a>   ");
	document.writeln("					<a href=\"#\" title=\"密保手机\">密保手机<\/a>  ");
	document.writeln("				<\/dd>");
	document.writeln("				<dt>充值中心<\/dt>");
	document.writeln("				<dd>					");
	document.writeln("					<a href=\"#\" title=\"账号信息\">账号信息<\/a>");
	document.writeln("					<a href=\"#\" title=\"修改密码\">修改密码<\/a>   ");
	document.writeln("					<a href=\"#\" title=\"密保邮箱\">密保邮箱<\/a>   ");
	document.writeln("					<a href=\"#\" title=\"密保手机\">密保手机<\/a>  ");
	document.writeln("				<\/dd>				");
	document.writeln("				<dt>客服中心<\/dt>");
	document.writeln("				<dd>");
	document.writeln("					<a href=\"#\" title=\"账号信息\">账号信息<\/a>");
	document.writeln("					<a href=\"#\" title=\"修改密码\">修改密码<\/a>   ");
	document.writeln("					<a href=\"#\" title=\"密保邮箱\">密保邮箱<\/a>   ");
	document.writeln("					<a href=\"#\" title=\"密保手机\">密保手机<\/a>  ");
	document.writeln("				<\/dd>				");
	document.writeln("			<\/dl>");
*/	document.writeln("		<\/div>");
//	document.writeln("		<p class=\"focus-link\" >");
//	document.writeln("			");
//	document.writeln("		<\/p>");
	document.writeln("		<div class=\"tm-links\" >");
	document.writeln("			<a class=\"tm-title space-line\" title=\"乐子首页\" href=\"http:\/\/www.lezi.com\/\" >乐子首页<\/a>");
	document.writeln("			<a class=\"tm-title space-line\" title=\"充值\" href=\"http:\/\/pay.lezi.com\/\" >充值<\/a>");
	document.writeln("			<a class=\"tm-title space-line\" title=\"客服\" href=\"http:\/\/cs.lezi.com\/\"  >客服<\/a>");
	document.writeln("			<a id=\"bookmark\" class=\"tm-bookmark space-line\" title=\"收藏\" href=\"javascript:void(0);\" >收藏<\/a>	");
	document.writeln("			<a id=\"icon-link\" class=\"tm-desktop\" title=\"设为桌面图标\" href=\"http:\/\/www.lezi.com/desktop_icon.php\" >设为桌面图标<\/a>");
	document.writeln("			<a id=\"gameEnterBtn\" class=\"tm-game-enter\" title=\"游戏入口\" href=\"javascript:void(0);\" >游戏入口<\/a>");
	document.writeln("			<ul id=\"gameEnter\" class=\"tm-game-list\" style=\"display:none\" >");
		document.writeln("				<li>");
	document.writeln("					<div class=\"tm-game-list-img\" >");
	document.writeln("						<a href=\"http://mc.lezi.com/main.php\" title=\"魔力学堂\"><img alt=\"魔力学堂\" src=\"http://www.lezi.com/resources/theme/default/style/images/info/ml03.jpg\"><\/a>");
	document.writeln("					<\/div>");
	document.writeln("					<div class=\"tm-game-list-con\" >");
	document.writeln("						<h6><a href=\"http://mc.lezi.com/servers.php\" >魔力学堂<\/a><\/h6>");
	document.writeln("						<a class=\"btn\"  href=\"http://mc.lezi.com/servers.php\" title=\"进入游戏\" >进入游戏<\/a>");
	document.writeln("						<a href=\"http://mc.lezi.com/active/201123_group_buy/\" title=\"圣诞团购季 《魔力学堂》周年庆全民疯抢\" target=\"_blank\">圣诞团购季 《魔力...</a>");
	document.writeln("					<\/div>");
	document.writeln("				<\/li>");
	document.writeln("				<li>");
	document.writeln("					<div class=\"tm-game-list-img\" >");
	document.writeln("						<a href=\"http://sh.lezi.com/main.php\" title=\"水浒英雄\"><img alt=\"水浒英雄\" src=\"http://www.lezi.com/resources/theme/default/style/images/info/sh03.jpg\"><\/a>");
	document.writeln("					<\/div>");
	document.writeln("					<div class=\"tm-game-list-con\" >");
	document.writeln("						<h6><a href=\"http://sh.lezi.com/servers.php\" >水浒英雄<\/a><\/h6>");
	document.writeln("						<a class=\"btn\"  href=\"http://sh.lezi.com/servers.php\" title=\"进入游戏\" >进入游戏<\/a>");
	document.writeln("						<a href=\"http://sh.lezi.com/active/201110_peerless_riding_pet/\" title=\"水浒6、7区金骑榜开启\" target=\"_blank\">水浒6、7区金骑榜开...</a>");
	document.writeln("					<\/div>");
	document.writeln("				<\/li>");
	document.writeln("				<li>");
	document.writeln("					<div class=\"tm-game-list-img\" >");
	document.writeln("						<a href=\"http://mrcs.lezi.com/main.php\" title=\"末日传说\"><img alt=\"末日传说\" src=\"http://www.lezi.com/resources/theme/default/style/images/info/mr03.jpg\"><\/a>");
	document.writeln("					<\/div>");
	document.writeln("					<div class=\"tm-game-list-con\" >");
	document.writeln("						<h6><a href=\"http://mrcs.lezi.com/servers.php\" >末日传说<\/a><\/h6>");
	document.writeln("						<a class=\"btn\"  href=\"http://mrcs.lezi.com/servers.php\" title=\"进入游戏\" >进入游戏<\/a>");
	document.writeln("						<a href=\"http://mrcs.lezi.com/archives/105850.html\" title=\"为《末日传说》投票加油 赢六大媒体豪华礼包\" target=\"_blank\">为《末日传说》投票...</a>");
	document.writeln("					<\/div>");
	document.writeln("				<\/li>");
	document.writeln("				<li>");
	document.writeln("					<div class=\"tm-game-list-img\" >");
	document.writeln("						<a href=\"http://zz.lezi.com/main.php\" title=\"征战天下\"><img alt=\"征战天下\" src=\"http://www.lezi.com/resources/theme/default/style/images/info/zz03.jpg\"><\/a>");
	document.writeln("					<\/div>");
	document.writeln("					<div class=\"tm-game-list-con\" >");
	document.writeln("						<h6><a href=\"http://zz.lezi.com/servers.php\" >征战天下<\/a><\/h6>");
	document.writeln("						<a class=\"btn\"  href=\"http://zz.lezi.com/servers.php\" title=\"进入游戏\" >进入游戏<\/a>");
	document.writeln("						<a href=\"http://zz.lezi.com/arc_show.php?id=1910\" title=\"征战VIP系统隆重上线\" target=\"_blank\">征战VIP系统隆重上...</a>");
	document.writeln("					<\/div>");
	document.writeln("				<\/li>");
	document.writeln("				<li>");
	document.writeln("					<div class=\"tm-game-list-img\" >");
	document.writeln("						<a href=\"http://mh.lezi.com/main.php\" title=\"梦幻之城\"><img alt=\"梦幻之城\" src=\"http://www.lezi.com/resources/theme/default/style/images/info/mh03.jpg\"><\/a>");
	document.writeln("					<\/div>");
	document.writeln("					<div class=\"tm-game-list-con\" >");
	document.writeln("						<h6><a href=\"http://mh.lezi.com/servers.php\" >梦幻之城<\/a><\/h6>");
	document.writeln("						<a class=\"btn\"  href=\"http://mh.lezi.com/servers.php\" title=\"进入游戏\" >进入游戏<\/a>");
	document.writeln("						<a href=\"http://mh.lezi.com/arc_show.php?tid=121&id=925\" title=\"一骑当千 《梦幻之城》“宠”临城下六军不发\" target=\"_blank\">一骑当千 《梦幻之...</a>");
	document.writeln("					<\/div>");
	document.writeln("				<\/li>");
	document.writeln("				<li>");
	document.writeln("					<div class=\"tm-game-list-img\" >");
	document.writeln("						<a href=\"http://wk.lezi.com\" title=\"悟空Q传\"><img alt=\"悟空Q传\" src=\"http://www.lezi.com/resources/theme/default/style/images/info/wk03.jpg\"><\/a>");
	document.writeln("					<\/div>");
	document.writeln("					<div class=\"tm-game-list-con\" >");
	document.writeln("						<h6><a href=\"http://wk.lezi.com/servers.html\" >悟空Q传<\/a><\/h6>");
	document.writeln("						<a class=\"btn\"  href=\"http://wk.lezi.com/servers.html\" title=\"进入游戏\" >进入游戏<\/a>");
	document.writeln("						<a href=\"http://wk.lezi.com/servers.html\" title=\"1月14日开启二次封测\" target=\"_blank\">1月14日开启二次封...</a>");
	document.writeln("					<\/div>");
	document.writeln("				<\/li>");
	document.writeln("				<li>");
	document.writeln("					<div class=\"tm-game-list-img\" >");
	document.writeln("						<a href=\"http://sxd.lezi.com/\" title=\"神仙道\"><img alt=\"神仙道\" src=\"http://www.lezi.com/resources/theme/default/style/images/info/sxd03.jpg\"><\/a>");
	document.writeln("					<\/div>");
	document.writeln("					<div class=\"tm-game-list-con\" >");
	document.writeln("						<h6><a href=\"http://sxd.lezi.com/\" >神仙道<\/a><\/h6>");
	document.writeln("						<a class=\"btn\"  href=\"http://sxd.lezi.com/\" title=\"进入游戏\" >进入游戏<\/a>");
	document.writeln("						<a href=\"http://sxd.lezi.com/interface/game/login.php?aid=8801001\" title=\"一区仙灵岛豪情开启\" target=\"_blank\">一区仙灵岛豪情开启</a>");
	document.writeln("					<\/div>");
	document.writeln("				<\/li>");
	document.writeln("				<li>");
	document.writeln("					<div class=\"tm-game-list-img\" >");
	document.writeln("						<a href=\"http://shsj.lezi.com/\" title=\"神话世界\"><img alt=\"神话世界\" src=\"http://www.lezi.com/resources/theme/default/style/images/info/shsj03.jpg\"><\/a>");
	document.writeln("					<\/div>");
	document.writeln("					<div class=\"tm-game-list-con\" >");
	document.writeln("						<h6><a href=\"http://shsj.lezi.com/\" >神话世界<\/a><\/h6>");
	document.writeln("						<a class=\"btn\"  href=\"http://shsj.lezi.com/\" title=\"进入游戏\" >进入游戏<\/a>");
	document.writeln("						<a href=\"http://shsj.lezi.com\" title=\"1月13日豪礼封测\" target=\"_blank\">1月13日豪礼封测</a>");
	document.writeln("					<\/div>");
	document.writeln("				<\/li>");
	document.writeln("			<\/ul>");
	document.writeln("		<\/div>");
	document.writeln("	<\/div>");
	document.writeln("<\/div>")
		var getEl = function(id){
		return document.getElementById(id);
	}
	var bookmark = function(){
		var title = document.title;
		var url = window.location.protocol + "//" + window.location.host;
		if (window.sidebar)
			window.sidebar.addPanel(title, url, "");
		else
			if (window.opera && window.print) {
				var mbm = document.createElement('a');
				mbm.setAttribute('rel', 'sidebar');
				mbm.setAttribute('href', url);
				mbm.setAttribute('title', title);
				mbm.click();
			}
			else
				if (document.all) {
					window.external.AddFavorite(url, title);
				}
	};
	getEl("bookmark").onclick = bookmark;
	/*
	getEl("topUserInfo").onmouseover = function(){
		this.className="top-user hover";
		getEl("myLezi").style.display="block";
	}
	getEl("topUserInfo").onmouseout = function(){
		this.className="top-user";
		getEl("myLezi").style.display="none";
	}
	*/
	/*
	getEl("myLezi").onmouseover = function(){
		getEl("topUserInfo").className="top-user hover";
		this.style.display="block";
	}
	getEl("myLezi").onmouseout = function(){
		getEl("topUserInfo").className="top-user";
		this.style.display="none";
	}
	*/
	getEl("gameEnterBtn").onmouseover = function(){
		getEl("gameEnter").style.display="block";
	}
	getEl("gameEnterBtn").onmouseout = function(){
		getEl("gameEnter").style.display="none";
	}
	getEl("gameEnter").onmouseover = function(){
		this.style.display="block";
	}
	getEl("gameEnter").onmouseout = function(){
		this.style.display="none";
	}

