var pageprotocol = this.location.protocol;

var imgurl = pageprotocol + "//img.tygem.com";
var	loginimg = pageprotocol + "//img.tygem.com/images/06/common/top_menu_s_login.gif";
var loginurl = pageprotocol + "//www.tygem.com/vmember/login.asp?gourl="+encodeURIComponent(location);
var infourl = "http://service.tygem.com/member/clause.html";
var infostr = "È¸¿ø°¡ÀÔ"

function getCookie(name)
{
	var nameOfCookie = name + "=";
	var x = 0
	while (x <= document.cookie.length) {
		var y = (x + nameOfCookie.length);

		if (document.cookie.substring(x, y) == nameOfCookie) {
			if ((endOfCookie = document.cookie.indexOf(";", y)) == -1)
				endOfCookie = document.cookie.length;
			
			return unescape(document.cookie.substring(y, endOfCookie));
		}
		x = document.cookie.indexOf(" ", x) + 1;
		if (x == 0) 
			break;
	}
	return "";
}


if (getCookie("C1") != "" || getCookie("N1") != "") {
	loginimg = imgurl+"/images/06/common/top_menu_s_logout.gif";
	loginurl = "http://service.tygem.com/login/logout.html";
	infourl = "http://service.tygem.com/member/f_user_mody.html";
	infostr = "³ªÀÇÁ¤º¸";
}



document.write("<table width='100%' border='0' cellspacing='0' cellpadding='0'>");
document.write("  <tr>");
document.write("    <td height='45' background='"+imgurl+"/images/06/etc/navi_top_bg.gif'>");
document.write("      <table border='0' cellspacing='0' cellpadding='0' width='100%'>");
document.write("        <tr> ");
document.write("          <td width='122' align='center'><a href='http://www.tygem.com/'><img src='"+imgurl+"/images/06/etc/navi_top_logo.gif' width='82' height='35' border='0'></a></td>");
//document.write("          <td width='404'><img src='"+imgurl+"/images/06/etc/navi_top_9menu2.gif' usemap='#SubMap' border='0'></td>");
document.write("          <td width='404'><img src='"+imgurl+"/images/06/menu_20117/navi_top_9menu2.gif' usemap='#SubMap' border='0'></td>");
document.write("          <td>&nbsp;</td>");
document.write("          <td class='small_01' width='220'><a href='http://service.tygem.com/tgmall/itemshop/cpa_point.html'><img src='"+imgurl+"/images/06/etc/icon_tmoney.gif' width='19' height='17' border='0' align='absmiddle'>¹«·áÃæÀü¼Ò</a><img src='"+imgurl+"/images/06/etc/bar_text_line_02.gif' width='19' height='10'><a href='"+infourl+"'>"+infostr+"</a><img src='"+imgurl+"/images/06/etc/bar_text_line_02.gif' width='19' height='10'><a href='http://www.tygem.com/help/helpmain.asp'>°í°´¼¾ÅÍ</a></td>");
document.write("          <td width='80'><a href='"+loginurl+"' onfocus='this.blur()'><img src='"+loginimg+"' border='0'></a></td>");
document.write("        </tr>");
document.write("      </table>");
document.write("    </td>");
document.write("  </tr>");
document.write("</table>");

document.write("<map name='SubMap'> ");

document.write('  <area shape="rect" coords="1,1,28,13" href="http://service.tygem.com/guinness/myranking.php" onfocus="this.blur()" />');
document.write('  <area shape="rect" coords="35,1,70,13" href="http://www.tygem.com/news/newsmain.asp" onfocus="this.blur()" />');
document.write('  <area shape="rect" coords="77,1,111,13" href="http://www.tygem.com/Lecture/LectureMain.asp" onfocus="this.blur()" />  ');
document.write('  <area shape="rect" coords="118,1,151,13" href="http://www.tygem.com/column/main.asp" onfocus="this.blur()" />');
document.write('  <area shape="rect" coords="159,1,202,13" href="http://service.tygem.com/club/com/com_index.html" onfocus="this.blur()" />');
document.write('  <area shape="rect" coords="212,1,253,13" href="http://www.tygem.com/vboard/boardmain.asp" onfocus="this.blur()" />');
document.write('  <area shape="rect" coords="264,1,320,13" href="http://service.tygem.com/tgmall/itemshop/itemshop.html" onfocus="this.blur()" />');
document.write('  <area shape="rect" coords="326,1,360,13" href="http://www.tygem.com/pigwing/pigwing.asp" onfocus="this.blur()" /> ');
document.write('  <area shape="rect" coords="370,1,411,13" href="http://www.tygem.com/health/main.asp" onfocus="this.blur()" />   ');

document.write("</map>");




