/******************随机更换banner
var banner_img
var number = Math.floor(Math.random()*2+1);
if(number==1){
banner_img="<a href='http://tg.tiancity.com' target='_blank'><img src='http://images.tiancity.com/images/newportal/portalad/TG250_35_080429.gif'></a>"
}else{
banner_img="<a href='http://www.tiancity.com/chinajoy/' target='_blank'><img src='http://images.tiancity.com/images/portal/chinajoy_gnb_banner.gif'></a>"
}********************/

window.onload = function() {
	document.getElementById('login_header').src = 'http://passport.tiancity.com/login/login_header.aspx?from=' + window.location.href;
}

function Banner_MouseOver(id)
{
document.getElementById(id).style.display = "block"; 
}
function Banner_Mouseout(id)
{
document.getElementById(id).style.display = "none"; 
}
document.writeln("<style>");
document.writeln("body { margin:0}");
document.writeln("#gnb_menu{height:35px; font-size:12px;color:#888;table-layout:fixed; background: url(http:\/\/images.tiancity.com\/images\/bbs\/gnb_image\/top_bg_03.gif); margin:0px; border-bottom:solid 1px #ddd; overflow:hidden;}");
document.writeln("#gnb_menu img {_vertical-align:baseline;}");
document.writeln("#gnb_menu table { margin:0px;}");
document.writeln("#gnb_menu td {line-height: normal; height: auto;}");
document.writeln("#gnb_menu ul{list-style-type: none; margin-left:5px; padding:0; margin-top:0}");
document.writeln("#gnb_menu li{list-style-type: none; float:left; margin-right:5px; padding:0;}");
document.writeln("#gnb_menu a, #gnb_menu a:link, #gnb_menu a:active, #gnb_menu a:visited {color:#888;font-size:12px;text-decoration: none;}");
document.writeln("#gnb_menu a:hover{text-decoration: underline;}");
document.writeln("#gnb_menu img{border:0;}");
document.writeln("#gnb_game_list1{width:588px; margin-left:78px;padding-top:25px;top:0; position:absolute; z-index:10000; overflow:hidden; display:none}");
document.writeln("#gnb_game_list1 td{ height:20px;padding-left:5px; line-height:14px}");
document.writeln("#gnb_game_list1 .gnb_game_list_b{border:#e8e8e8 solid 1px; background:#e8e8e8; padding:2px; width:565px}");
document.writeln("#gnb_game_list1 .gnb_game_list_b .cont_gnb { padding-top:5px; padding-bottom:5px; background:#fff}");
document.writeln("#gnb_game_list2{width:112px; right:19px;padding-top:25px; top:0; position:absolute; z-index:10000; overflow:hidden; display:none}");
document.writeln("#gnb_game_list2 td{ height:20px;padding-left:5px; line-height:14px}");
document.writeln("#gnb_game_list2 .gnb_game_list_b{border:#e8e8e8 solid 1px; background:#e8e8e8; padding:2px; width:106px}");
document.writeln("#gnb_game_list2 .gnb_game_list_b .cont_gnb { padding-top:8px; padding-bottom:5px; background:#fff;}");
document.writeln("#gnb_menu .gnb_game_list_t{height:4px;}");
document.writeln("#gnb_menu input.topbtn { background:url(http:\/\/images.tiancity.com\/images\/bbs\/gnb_image\/topNav_btn_03.gif); width:51px; height:22px; line-height:22px; cursor:pointer; font-weight:700}");
document.writeln("#gnb_menu .blackcolor { color:#444; padding-right:15px}");
document.writeln("#gnb_menu ul.mem_submenu {list-style-type: none; padding:0; margin:0 0 5px 0; width:100px; overflow:hidden}");
document.writeln("#gnb_menu ul.mem_submenu li { padding:0; margin:0; margin-left:15px; background:url(http:\/\/image.tiancity.com\/portal\/images\/pas_ic.gif) no-repeat 2px 5px; padding-left:15px; line-height:20px; height:20px; color:#527490; width:80px; display:inline}");
document.writeln("#gnb_menu ul.mem_submenu li a { color:#888}");
document.writeln("#gnb_menu .submenu_more { display:block; border-top:solid 1px #e8e8e8; text-align:right; margin:0 3px; line-height:24px;}");
document.writeln("#gnb_menu .submenu_more a { color:#888}");
document.writeln("#gnb_menu .game_gnb th {line-height:18px; padding-top:1px; text-align:left; font-size:12px; color:#888; border: #e1e1e1 solid 1px; background:#f8f8f8; padding-left:10px;vertical-align:bottom;}");
document.writeln("#gnb_menu .game_gnb td { vertical-align:middle; font-size:12px; padding:2px; line-height:18px;}");
document.writeln("<\/style>");
document.writeln("<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" id=\"gnb_menu\">");
document.writeln("<tr>");
document.writeln("<td>");
document.writeln("<table width=\"100%\" border=\"0\" align=\"center\" cellpadding=\"0\" cellspacing=\"0\">");
document.writeln("<tr>");
document.writeln("<td width=\"10\">");
document.writeln("<div id=\"gnb_game_list1\" onmouseover=\"Banner_MouseOver(\'gnb_game_list1\')\" onmouseout=\"Banner_Mouseout(\'gnb_game_list1\')\">");
document.writeln("<div class=\"gnb_game_list_t\" style=\"padding-left:80px\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_39.gif\"><\/div>");
document.writeln("<div class=\"gnb_game_list_b\">");
document.writeln("    <div class=\"cont_gnb\">");
document.writeln("    <table width=\"99%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"font-size:12px\">");
document.writeln("        <tr>");
document.writeln("            <td width=\"140\" valign=\"top\">");
document.writeln("            <table width=\"135\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"game_gnb\">");
document.writeln("              <tr>");
document.writeln("                <th colspan=\"2\">竞速休闲<\/th>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon01.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td width=\"110\" align=\"left\"><a href=\"http:\/\/popkart.tiancity.com\/homepage\/?acode=gnb&amp;bannerName=kart\" target=\"_blank\">跑跑卡丁车<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/h_ic.gif\" \/><\/td>");
document.writeln("              <\/tr>");
document.writeln("            <\/table>");
document.writeln("            <table width=\"135\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"game_gnb\">");
document.writeln("              <tr>");
document.writeln("                <th colspan=\"2\">角色扮演<\/th>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_iconmh.jpg\" width=\"20\" height=\"18\" \/><\/td>");
document.writeln("                <td align=\"left\"><a href=\"http:\/\/mh.tiancity.com\/homepage\/?acode=index&amp;bannerName=mh\" target=\"_blank\">洛奇英雄传<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/n_ic.gif\" \/><\/td>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon02.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td width=\"110\" align=\"left\"><a href=\"http:\/\/luoqi.tiancity.com\/?acode=gnb&amp;bannerName=luoqi\" target=\"_blank\">洛奇<\/a><\/td>");
document.writeln("              <\/tr>");
document.writeln("            <\/table>");
document.writeln("            <\/td>");
document.writeln("            <td width=\"140\" valign=\"top\">");
document.writeln("            <table width=\"135\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"game_gnb\">");
document.writeln("              <tr>");
document.writeln("                <th colspan=\"2\">第一人称射击<\/th>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon04.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td width=\"110\" align=\"left\"><a href=\"http:\/\/csol.tiancity.com\/homepage\/v3\/?acode=gnb&amp;bannerName=csol\" target=\"_blank\">反恐精英OL<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/h_ic.gif\" \/><\/td>");
document.writeln("              <\/tr>");
document.writeln("            <\/table>");
document.writeln("            <table width=\"135\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"game_gnb\">");
document.writeln("              <tr>");
document.writeln("                <th colspan=\"2\">社区交友<\/th>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon05.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td width=\"110\" align=\"left\"><a href=\"http:\/\/kx.tiancity.com\/?acode=gnb&amp;bannerName=kx\" target=\"_blank\">开心星球<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/n_ic.gif\" \/><\/td>");
document.writeln("              <\/tr>");
document.writeln("            <\/table>");
document.writeln("            <\/td>");
document.writeln("            <td width=\"275\" valign=\"top\">");
document.writeln("            <table width=\"275\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"game_gnb\">");
document.writeln("              <tr>");
document.writeln("                <th colspan=\"4\"><span style=\"float:left\">网页游戏<\/span><a href=\"http:\/\/web.tiancity.com\/homepage\/\" target=\"_blank\" style=\"float:right; margin-right:10px;\">平台&gt;&gt;<\/a><\/th>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td width=\"20\" align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon06.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td width=\"103\"><a href=\"http:\/\/plsm.tiancity.com\/homepage\/?acode=gnb&amp;bannerName=plsm\" target=\"_blank\">盘龙神墓记<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/h_ic.gif\" \/><\/td>");
document.writeln("                <td width=\"22\" valign=\"middle\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon10.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td width=\"90\" valign=\"middle\"><a href=\"http:\/\/zsg.tiancity.com\/?acode=gnb&amp;bannerName=zsg\" target=\"_blank\">最三国<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/n_ic.gif\" \/><\/td>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon07.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td align=\"left\"><a href=\"http:\/\/letu.tiancity.com\/homepage\/?acode=gnb&amp;bannerName=lt\" target=\"_blank\">乐土<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/h_ic.gif\" \/><\/td>");
document.writeln("                <td valign=\"middle\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon11.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td valign=\"middle\"><a href=\"http:\/\/yyg.tiancity.com\/?acode=gnb&amp;bannerName=yyg\" target=\"_blank\">悠悠谷<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/n_ic.gif\" \/><\/td>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon08.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td align=\"left\"><a href=\"http:\/\/sg.tiancity.com\/homepage\/?acode=gnb&amp;bannerName=sg\" target=\"_blank\">热血三国<\/a><\/td>");
document.writeln("                <td valign=\"middle\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon12.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td valign=\"middle\"><a href=\"http:\/\/zg.tiancity.com\/?acode=gnb&amp;bannerName=zg\" target=\"_blank\">战国春秋<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/n_ic.gif\" \/><\/td>");
document.writeln("              <\/tr>");
document.writeln("              <tr>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon09.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td align=\"left\"><a href=\"http:\/\/yx.tiancity.com\/homepage\/?acode=gnb&amp;bannerName=yx\" target=\"_blank\">武林英雄<\/a><\/td>");
document.writeln("                <td align=\"left\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/game_icon13.jpg\" alt=\"\" width=\"19\" height=\"19\" \/><\/td>");
document.writeln("                <td align=\"left\"><a href=\"http:\/\/ss.tiancity.com\/?acode=gnb&amp;bannerName=ss\" target=\"_blank\">食神小当家<\/a> <img src=\"http:\/\/image.tiancity.com\/portal\/images\/n_ic.gif\" \/><\/td>");
document.writeln("              <\/tr>");
document.writeln("            <\/table>");
document.writeln("            <\/td>");
document.writeln("        <\/tr>");
document.writeln("    <\/table>");
document.writeln("    <\/div>");
document.writeln("<\/div>");
document.writeln("<\/div>");
document.writeln("");
document.writeln("<div id=\"gnb_game_list2\" onmouseover=\"Banner_MouseOver(\'gnb_game_list2\')\" onmouseout=\"Banner_Mouseout(\'gnb_game_list2\')\">");
document.writeln("<div class=\"gnb_game_list_t\" style=\"padding-left:86px\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_39.gif\"><\/div>");
document.writeln("<div class=\"gnb_game_list_b\">");
document.writeln("    <div class=\"cont_gnb\">");
document.writeln("    <table width=\"99%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
document.writeln("      <tr>");
document.writeln("        <td align=\"left\">");
document.writeln("        <ul class=\"mem_submenu\">");
document.writeln("        	<li><a href=\"http:\/\/member.tiancity.com\/Registration\/AccountReg.aspx\" target=\"_blank\">账号注册<\/a><\/li>");
document.writeln("        	<li><a href=\"http:\/\/member.tiancity.com\/User\/PasswordFindMethod.aspx\" target=\"_blank\">找回密码<\/a><\/li>");
document.writeln("        	<li><a href=\"http:\/\/service.tiancity.com\/ServiceOnline\/NewQuestion.aspx\" target=\"_blank\">在线客服<\/a><\/li>");
document.writeln("        	<li><a href=\"http:\/\/pay.tiancity.com\/webcoupon\/index2.html\" target=\"_blank\">活动领奖<\/a><\/li>");
document.writeln("        	<li><a href=\"http:\/\/matrix.tiancity.com\/\" target=\"_blank\">账户密保<\/a><\/li>");
document.writeln("        <\/ul>");
document.writeln("        <span class=\"submenu_more\"><a href=\"http:\/\/service.tiancity.com\/\" target=\"_blank\">更多&gt;<\/a><\/span>");
document.writeln("        <\/td>");
document.writeln("      <\/tr>");
document.writeln("    <\/table>");
document.writeln("    <\/div>");
document.writeln("<\/div>");
document.writeln("<\/div><\/td>");
document.writeln("<td width=\"92\"><a href=\"http:\/\/www.tiancity.com\/\"><img src=\"http:\/\/images.tiancity.com\/images\/portal\/tclogo.gif\" title=\"首页\"><\/a><\/td>");
document.writeln("<td width=\"350\" nowrap=\"nowrap\">");
document.writeln("<ul>");
document.writeln("<li><a href=\"http:\/\/www.tiancity.com\/\" target=\"_blank\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_03.gif\" title=\"首页\" \/><\/a><\/li>");
document.writeln("<li>|<\/li>");
document.writeln("<li onmouseover=\"Banner_MouseOver(\'gnb_game_list1\')\" onmouseout=\"Banner_Mouseout(\'gnb_game_list1\')\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_05.gif\" title=\"游戏\" style=\"cursor:pointer\" \/><\/li>");
document.writeln("<li>|<\/li>");
document.writeln("<li><a href=\"http:\/\/bbs.tiancity.com\/\" target=\"_blank\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_07.gif\" title=\"论坛\" \/><\/a><\/li>");
document.writeln("<li>|<\/li>");
document.writeln("<li><a href=\"http:\/\/ask.tiancity.com\/\" target=\"_blank\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_09.gif\" title=\"问吧\" \/><\/a><\/li>");
document.writeln("<li>|<\/li>");
document.writeln("<li><a href=\"http:\/\/shop.tiancity.com\/Homepage\/Index.aspx\" target=\"_blank\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_13.gif\" title=\"商城\" \/><\/a><\/li>");
document.writeln("<li>|<\/li>");
document.writeln("<li><a href=\"http:\/\/service.tiancity.com\/\" target=\"_blank\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_15.gif\" title=\"客服\" style=\" cursor:pointer;\" \/><\/a><\/li>");
document.writeln("<li>|<\/li>");
document.writeln("<li><a href=\"http:\/\/huodong.tiancity.com\/\" target=\"_blank\"><img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_11.gif\" title=\"活动\" \/><\/a><\/li>");
document.writeln("<li><img src=\"http:\/\/image.tiancity.com\/portal\/images\/new_ic.gif\" title=\"最新\"\/><\/li>");
document.writeln("<\/ul><\/td>");
document.writeln("<td align=\"center\" valign=\"top\"><iframe width=\"270\" height=\"35\" src=\"http:\/\/tcmgt.tiancity.com\/frmout.aspx?pst=101&uparams=TC01GN01\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" scrolling=\"no\"><\/iframe><\/td>");
document.writeln("<td width=\"150\" nowrap=\"nowrap\" align=\"right\"><iframe width=\"150\" height=\"35\" src=\"http:\/\/passport.tiancity.com\/login\/login_header.aspx\" marginheight=\"0\" marginwidth=\"0\" frameborder=\"0\" scrolling=\"no\" allowTransparency=\"true\" id=\"login_header\" name=\"login_header\"><\/iframe><\/td>");
document.writeln("<td width=\"90\" nowrap=\"nowrap\" style=\"padding:0;\">");
document.writeln("<ul>");
document.writeln("<li>|<\/li>");
document.writeln("<li onmouseover=\"Banner_MouseOver(\'gnb_game_list2\')\" onmouseout=\"Banner_Mouseout(\'gnb_game_list2\')\" style=\"cursor:pointer\">会员服务 <img src=\"http:\/\/image.tiancity.com\/portal\/images\/gnb\/gnb_18.gif\" \/><\/li>");
document.writeln("<\/ul>");
document.writeln("<\/td>");
document.writeln("<\/tr><\/table>");
document.writeln("<\/td>");
document.writeln("<\/tr>");
document.writeln("<\/table>");
document.writeln("")
function Nethru_getCookieVal(offset)
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function Nethru_SetCookie(name, value){
   var argv = Nethru_SetCookie.arguments;
   var argc = Nethru_SetCookie.arguments.length;
   var expires = (2 < argc) ? argv[2] : null;
   var path = (3 < argc) ? argv[3] : null;
   var domain = (4 < argc) ? argv[4] : null;
   var secure = (5 < argc) ? argv[5] : false;

  // alert("DOMAIN = " + domain);
   document.cookie = name + "=" + escape (value) +
        ((expires == null) ? "" : ("; expires="+expires.toGMTString())) +
     ((path == null) ? "" : ("; path=" + path)) +
     ((domain == null) ? "" : ("; domain=" + domain)) +
        ((secure == true) ? "; secure" : "");

//	alert(document.cookie);
}

function Nethru_GetCookie(name){
   var arg = name + "=";
   var alen = arg.length;
   var clen = document.cookie.length;
   var i = 0;
   while (i < clen)
      {
      var j = i + alen;
      if (document.cookie.substring(i, j) == arg)
         return Nethru_getCookieVal (j);
      i = document.cookie.indexOf(" ", i) + 1;
      if (i == 0)
         break;
      }
  return null;
}

function Nethru_makePersistentCookie(name,length,path,domain)
{
    var today = new Date();
    var expiredDate = new Date(2011,1,1);
    var cookie;
	var value;

    cookie = Nethru_GetCookie(name);
    if ( cookie ) {
//		alert(cookie);
        return 1;
	}

	var values = new Array();
	for ( i=0; i < length ; i++ ) {
		values[i] = "" + Math.random();
	}

	value = today.getTime();

	// use first decimal
	for ( i=0; i < length ; i++ ) {
		value += values[i].charAt(2);
	}

    Nethru_SetCookie(name,value,expiredDate,path,domain);
}

function Nethru_getDomain() {
	var _host   = document.domain;
	var so      = _host.split('.');
	var dm    = so[so.length-2] + '.' + so[so.length-1];
	return (so[so.length-1].length == 2) ? so[so.length-3] + '.' + dm : dm;
}

var Nethru_domain  = Nethru_getDomain();

Nethru_makePersistentCookie("PCID",10,"/",Nethru_domain);