﻿try {
document.execCommand('BackgroundImageCache', false, true);
} catch(e)  {}

var ICS_IMAGE = 'http://cache.goorm.com/GNB/';
var gnbLoc = location.hostname;

document.write ('<style type="text/css">');
document.write ('	img {border:0;}');
document.write ('	body, dl, dt, dd, li, ul {padding:0px; margin:0px; list-style:none;}');
document.write ('	#TP_wrap {position:relative;z-index:100000; height:41px;background:url('+ICS_IMAGE+'/100223/globalGnbBg.gif) repeat-x left top;text-align:center;}');
document.write ('	#TP_wrap .TP_GNBWarp {width:1004px; height:41px; margin:0 auto;background:url('+ICS_IMAGE+'/100223/globalGnbBg.gif) repeat-x left top;}');
document.write ('	#TP_wrap .TP_GNBWarp h1.TP_GnbCI {float:left;width:107px;padding:5px 14px 0 0;margin:0;}');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_gameList {float:left;width:458px;padding:5px 0 0 0;margin:0;}');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink {float:left;list-style:none;margin:0 !important;padding:0 3px 0 5px;background:url('+ICS_IMAGE+'/globalGnbSec01.gif) no-repeat left 16px;line-height:1px;font-size:1px;}');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink.fisrt {padding:0 3px 0 0 !important;background:none !important;}');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_gameList li.GnbAll {position:relative; }');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView { position:absolute; left:-150px; top:35px; text-align:left; font-size:12px; line-height:17px;background:url('+ICS_IMAGE+'/100223/allgameBg.gif) -359px top repeat-y;  display:none;}');
document.write ('	#TP_wrap .TP_GNBWarp .TP_PromotionArea {float:left;width:190px;height:41px;}');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_UtilArea {float:left;width:235px;padding:11px 0 0 0;margin:0;}');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_UtilArea li.TP_UtilLink {float:left;list-style:none;margin:0 !important;padding:0 2px 0 3px;background:url('+ICS_IMAGE+'/globalGnbSec02.gif) no-repeat left 6px;line-height:1px;font-size:1px;}');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_UtilArea li.TP_UtilLink.fisrt {padding:0 2px 0 0 !important;background:none !important;}');
document.write ('	#TP_wrap .TP_GNBWarp ul.TP_UtilArea li.TP_LoginBtn {float:left;width:60px;text-align:center;list-style:none;padding:0 !important;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame {width:359px; padding:0 2px;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame:after {content:""; display:block; clear:both; height:1px;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame dl { position:relative; float:left; width:107px}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame dl dt{height:20px; padding-top:8px; font-size:0px;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame dl dd.img {margin-bottom:10px; height:46px;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame ul {width:107px}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame ul li {font:11px/18px dotum; color:#666666; letter-spacing:-1px; height:18px; }');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame ul li img.icon {vertical-align:middle; margin-left:5px;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame ul li a {color:#666666; font:11px/18px dotum; text-decoration:none;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame ul li a:hover {color:#0f8ec4; text-decoration:underline;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame ul li.comming {color:#b9b9b9;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame .keroroWorld{ padding-left:11px}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame .rpgGame{ padding-left:11px;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame .sportsGame{ padding-left:10px;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame .allGameTit{position:absolute; left:0px; top:-5px; background:url('+ICS_IMAGE+'/100223/allgameBg.gif) no-repeat; width:359px; height:28px;}');
document.write ('#TP_wrap .TP_GNBWarp ul.TP_gameList li.TP_gameLink .AllView .allGame .allGameBtm{position:absolute; left:0px; bottom:-5px; background:url('+ICS_IMAGE+'/100223/allgameBg.gif) left bottom no-repeat; width:359px; height:22px;}');
document.write ('</style>');
/* 전체보기 */
	function layerChk(obj,str){
		if(str == "open"){
			temp = eval("document.getElementById('"+obj+"')");
			if(temp)
				temp.style.display='block';
		}else{
			temp = eval("document.getElementById('"+obj+"')");
			if(temp)
				temp.style.display='none';
		}
	}
document.write ('<div id="TP_wrap">');
document.write ('	<div class="TP_GNBWarp">');
document.write ('		<h1 class="TP_GnbCI"><a href="http://www.goorm.com"><img src="'+ICS_IMAGE+'/100223/globalGnbCI.gif" alt="구름" /></a></h1>');
document.write ('		<ul class="TP_gameList">');
document.write ('			<li class="TP_gameLink fisrt"><a href="http://we.goorm.com"><img src="'+ICS_IMAGE+'/101103/GNBgameList01.gif" alt="위 온라인" /></a></li>');
document.write ('			<li class="TP_gameLink"><a href="http://aso.goorm.com/"><img src="'+ICS_IMAGE+'/100223/GNBgameList02.gif" alt="어스토니시아" /></a></li>');
document.write ('			<li class="TP_gameLink"><a href="http://krfighter.goorm.com"><img src="'+ICS_IMAGE+'/100223/GNBgameList03.gif" alt="케로로파이터" /></a></li>');
document.write ('			<li class="TP_gameLink"><a href="http://krpang.goorm.com"><img src="'+ICS_IMAGE+'/100223/GNBgameList04.gif" alt="케로로팡팡" /></a></li>');
document.write ('			<li class="TP_gameLink"><a href="http://krrpg.goorm.com"><img src="'+ICS_IMAGE+'/100223/GNBgameList05.gif" alt="케로로RPG" /></a></li>');
document.write ("			<li class=\"TP_gameLink GnbAll\" onmouseover=\"layerChk('AllViewLayer','open')\" onmouseout=\"layerChk('AllViewLayer','close')\">");
document.write ('				<img src="'+ICS_IMAGE+'/100223/GNBgameListAll.gif" alt="전체보기" />');
document.write ('				<div class="AllView" id="AllViewLayer">');
/* 전체게임 START */
document.write ('<div class="allGame">');
document.write ('	<div class="allGameTit"></div>');
document.write ('	<div class="allGameBtm"></div>');
document.write ('	<dl class="keroroWorld">');
document.write ('		<dt><img src="'+ICS_IMAGE+'/100223/txt01.gif" alt="KERORO WORLD" /></dt>');
document.write ('		<dd class="img"><a href="http://krfighter.goorm.com/"><img src="'+ICS_IMAGE+'/100223/img01.gif" alt="케로로 파이터" /></a></dd>');
document.write ('		<dd class="list">');
document.write ('			<ul>');
document.write ('				<li><a href="http://krfighter.goorm.com/">케로로 파이터</a></li>');
document.write ('				<li><a href="http://krpang.goorm.com/">케로로 팡팡</a></li>');
document.write ('				<li><a href="http://krracing.goorm.com/">케로로 레이싱</a></li>');
document.write ('				<li><a href="http://krrpg.goorm.com/">케로로 RPG<img src="'+ICS_IMAGE+'/100223/iconCbt.gif" class="icon" alt="CBT" /></a></li>');
document.write ('			</ul>');
document.write ('		</dd>');
document.write ('	</dl>');
document.write ('	<dl class="rpgGame">');
document.write ('		<dt><img src="'+ICS_IMAGE+'/100223/txt02.gif" alt="RPG GAME" /></dt>');
document.write ('		<dd class="img"><a href="http://we.goorm.com/"><img src="'+ICS_IMAGE+'/100223/img02.gif" alt="위온라인" /></a></dd>');
document.write ('		<dd class="list">');
document.write ('			<ul>');
document.write ('				<li><a href="http://we.goorm.com/">위 온라인<img src="'+ICS_IMAGE+'/100223/iconObt.gif" class="icon" alt="OBT" /></a></li>');
document.write ('				<li><a href="http://aso.goorm.com/">어스토니시아<img src="'+ICS_IMAGE+'/100223/iconCbt.gif" class="icon" alt="CBT" /></a></li>');
document.write ('				<li><a href="http://trinity.goorm.com/">트리니티</a></li>');
document.write ('			</ul>');
document.write ('		</dd>');
document.write ('	</dl>');
document.write ('	<dl class="sportsGame">');
document.write ('		<dt><img src="'+ICS_IMAGE+'/100223/txt03.gif" alt="SPORTS GAME" /></dt>');
document.write ('		<dd class="img"><img src="'+ICS_IMAGE+'/100223/img03.gif" alt="슬램덩크 온라인" /></dd>');
document.write ('		<dd class="list">');
document.write ('			<ul>');
document.write ('				<li class="comming">슬램덩크 온라인</li>');
document.write ('			</ul>');
document.write ('		</dd>');
document.write ('	</dl>');
document.write ('</div>');
/* 전체게임 END */
document.write ('				</div>');
document.write ('			</li>');
document.write ('		</ul>'); 
document.write ('		<div class="TP_PromotionArea">');

if( gnbLoc.indexOf('ttrinity')>-1 ||
	gnbLoc.indexOf('tkrfighter')>-1 ||
	gnbLoc.indexOf('tkrpang')>-1 ||
	gnbLoc.indexOf('tkrracing')>-1 ){
document.write ('			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="190px" height="41px" id="global_gnb" align="middle">');
document.write ('				<param name="allowScriptAccess" value="always" />');
document.write ('				<param name="movie" value="http://flash.goorm.com/banner/mgnb/goormGNBRollingPreview.swf" />');
document.write ('				<param name="quality" value="high" />');
document.write ('				<param name="bgcolor" value="#ffffff" />');
document.write ('				<param name="wmode" value="opaque" />');
document.write ('				<embed src="http://flash.goorm.com/banner/mgnb/goormGNBRollingPreview.swf" wmode="opaque" quality="high" bgcolor="#ffffff" width="190px" height="41px" name="global_gnb" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write ('			</object>');
}else{
document.write ('			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="190px" height="41px" id="global_gnb" align="middle">');
document.write ('				<param name="allowScriptAccess" value="always" />');
document.write ('				<param name="movie" value="http://flash.goorm.com/banner/mgnb/goormGNBRolling.swf" />');
document.write ('				<param name="quality" value="high" />');
document.write ('				<param name="bgcolor" value="#ffffff" />');
document.write ('				<param name="wmode" value="opaque" />');
document.write ('				<embed src="http://flash.goorm.com/banner/mgnb/goormGNBRolling.swf" wmode="opaque" quality="high" bgcolor="#ffffff" width="190px" height="41px" name="global_gnb" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write ('			</object>');
}


/*document.write ('			<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="190px" height="41px" id="global_gnb" align="middle">');
document.write ('				<param name="allowScriptAccess" value="always" />');
document.write ('				<param name="movie" value="'+ICS_IMAGE+'/globalgnb.swf" />');
document.write ('				<param name="quality" value="high" />');
document.write ('				<param name="bgcolor" value="#ffffff" />');
document.write ('				<embed src="'+ICS_IMAGE+'/globalgnb.swf" quality="high" bgcolor="#ffffff" width="190px" height="41px" name="global_gnb" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.write ('			</object>');*/
document.write ('		</div>');

if (GNB_CheckLogin()) {
document.write ('		<ul class="TP_UtilArea">');
document.write ('			<li class="TP_UtilLink fisrt"><a href="https://member.goorm.com/member/modifyCustMain.gm"><img src="'+ICS_IMAGE+'/globalGnbUtil02.gif" alt="내 정보" /></a></li>');
document.write ('			<li class="TP_UtilLink"><a href="https://security.goorm.com/"><img src="'+ICS_IMAGE+'/globalGnbUtil04.gif" alt="보안센터" /></a></li>');
document.write ('			<li class="TP_UtilLink"><a href="http://www.goorm.com/mypage"><img src="'+ICS_IMAGE+'/globalGnbUtil03.gif" alt="구름캐시" /></a></li>');
document.write ('			<li class="TP_LoginBtn"><a href="https://cert.goorm.com/member/logout.gm?backUrl=http://'+encodeURIComponent(location.host)+'"><img src="'+ICS_IMAGE+'/globalGnbLogout.gif" alt="로그아웃" /></a></li>');
document.write ('		<ul>');
document.write ('	</div>');
document.write ('</div>');

} else {
	
document.write ('		<ul class="TP_UtilArea">');
document.write ('			<li class="TP_UtilLink fisrt"><a href="https://member.goorm.com/mypage/mypage1/custinfo.gm"><img src="'+ICS_IMAGE+'/globalGnbUtil02.gif" alt="내 정보" /></a></li>');
document.write ('			<li class="TP_UtilLink"><a href="https://security.goorm.com/"><img src="'+ICS_IMAGE+'/globalGnbUtil04.gif" alt="보안센터" /></a></li>');
document.write ('			<li class="TP_UtilLink"><a href="https://cert.goorm.com/member/loginInput.gm?backUrl=http://'+encodeURIComponent(location.host)+'"><img src="'+ICS_IMAGE+'/globalGnbUtil03.gif" alt="구름캐시" /></a></li>');
document.write ('			<li class="TP_LoginBtn"><a href="https://cert.goorm.com/member/loginInput.gm?backUrl=http://'+encodeURIComponent(location.host)+'"><img src="'+ICS_IMAGE+'/globalGnbLogin.gif" alt="로그인" /></a></li>');
document.write ('		<ul>');
document.write ('	</div>');
document.write ('</div>');

}

// 로그인 체크 펑션
function GNB_CheckLogin() {
	var search = 'AUTH_TICKET_KEY=';
	if (document.cookie.length > 0) {
		offset = document.cookie.indexOf(search)
		if (offset != -1) {
			return true
		}
	}
	return false;
}

// 시작페이로 설정
function setHomePage() {
	document.body.style.behavior='url(#default#homepage)';
	document.body.setHomePage('http://www.goorm.com/');
}

