//========== ÄíÅ°°ª Ã³¸® ÇÔ¼ö S
function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {	//while open
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0)
			break; 
	}	//while close
	return null;
}
//========== ÄíÅ°°ª Ã³¸® ÇÔ¼ö E

//·Î±×ÀÎ °ü·Ã ---
function getCookieVal (offset) {
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function GetCookie (name) {
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen) {	//while open
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
			return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0)
			break; 
	}	//while close
	return null;
}

//·Î±×ÀÎ
function loginFrame () {
	//ÆäÀÌÁö URL
	var returl = document.location; 
	if (returl == null || returl == ""){
		returl = M_SITE;
	}
	returl = escape(returl);

	var login_url = "https://membership.chosun.com/login/protect_sso/sso_user_info.jsp?returl="+returl;
	var logout_url = "https://membership.chosun.com/login/logout.jsp?returl="+returl;
	var regist_url = "https://membership.chosun.com/join/registUser.jsp?site=chosun";
	var join_url = "https://membership.chosun.com/join/registUser.jsp?act=myindex&site=chosun";
	var idpw_url = "https://membership.chosun.com/join/registUser.jsp?act=idpw&site=chosun";
	var logStr;

	//·Î±×ÀÎ¿©ºÎ - ÄíÅ°°ª È®ÀÎ
	if (!GetCookie('SMSESSION') || GetCookie('SMSESSION') == "LOGGEDOFF" || !GetCookie('SM_USER')) {
		logStr = "<a href=" + login_url + " target='_top'><img src='http://image.chosun.com/main/201003/login_btn.gif' alt='·Î±×ÀÎ' title='·Î±×ÀÎ'></a>&nbsp;";
		logStr += "<a id='memberLink' href='https://membership.chosun.com/join/registUser.jsp?site=chosun' target='_top'><img id='memberImg' src='http://image.chosun.com/main/201003/memberJoin_btn.gif' alt='È¸¿ø°¡ÀÔ' title='È¸¿ø°¡ÀÔ'></a>";
	}
	else if (!GetCookie('dz_nm') || !GetCookie('dz_info')) {	//20070406 rainy
	var relogin_url = "https://membership.chosun.com/login/protect_sso/sso_user_info.jsp?returl="+returl;
		parent.location.href = relogin_url;
	}
	else {
		logStr = "&nbsp;";
		logStr = logStr + "<a href=" + logout_url + " target='_top'><img src='http://image.chosun.com/cs/200908/simple_logout.gif' alt='·Î±×¾Æ¿ô' title='·Î±×¾Æ¿ô'></a>&nbsp;";
		logStr = logStr + "<a id='memberLink' href='https://membership.chosun.com/join/registUser.jsp?act=myindex&site=chosun' target='_top'><img id='memberImg'src='http://image.chosun.com/main/201003/infoModify_btn.gif' alt='Á¤º¸¼öÁ¤' title='Á¤º¸¼öÁ¤'></a>";
	}
	
	return logStr;
}


document.write(" \
<style type='text/css'> \
fieldset,img{border:none;} \
hr,legend{display:none;} \
th,td{font-size:12px;font-family:µ¸¿ò,Dotum,AppleGothic,sans-serif;} \
ul,li{list-style:none;} \
a{color:#333;text-decoration:none;} \
a:visited,a:visited *{color:#641974;} \
a:hover,a:hover{color:#333;text-decoration:underline;} \
.b{font-weight:bold;}\
#s_gnb{width:970px;margin:9px 0 0 0; border-bottom:2px solid #d02b31; height:24px;} \
#c_slogo{position:relative; float:left;padding:2px 0 0 20px; z-index:5;} \
#lnb{position:relative;float:right; width:500px; margin:0px 0 0 0;z-index:6; } \
#lnb li.spn_chosun,#lnb li.busi,#lnb li#all_service,#lnb li#myremot{float:left;color:#8f8f8f;} \
#lnb li.s_menu_font_logo{float:left; vertical-align:top;} \
#lnb li.s_menu_font, #lnb li.s_menu_plus{float:left;padding:2px 7px;color:#333333;font-size:12px; font-family: 'Gulim', '±¼¸²'; line-height:14px;_margin-top:1px;} \
#lnb li.s_menu_plus img {vertical-align:top; margin-top:5px;}\
#lnb li.s_menu_font a{font-size:12px;color:#888; font-family: 'Gulim', '±¼¸²'; line-height:14px;text-decoration:none;_margin-top:1px;} \
#lnb li.s_menu_font a:hover{text-decoration:underline;_margin-top:1px;} \
#lnb li img{vertical-align:top;margin:0;cursor:pointer;_cursor /**/:hand;} \
#lnb li span{padding:0 0 0 10px; color:#b8b8b8;} \
#lnb li span{padding:0 2px 0 1px;} \
#lnb li#all_service{position:relative;} \
#lnb li#myremot{position:relative;margin:0 0 0 12px;display:inline;} \
#all_service_list{position:absolute;top:14px;right:0px;width:318px;padding:15px 20px 10px 17px;border:1px solid #000;background-color:#fff;display:none;z-index:7; font-family: 'Dotum', 'µ¸¿ò'; font-size:12px; } \
#all_service_list ul{float:left;margin:0 20px 0 0;} \
#all_service_list ul.lastchild{margin:0;} \
#all_service_list ul li{float:none;width:64px;margin:0 0 3px 0;text-align:left; padding-bottom:2px;} \
#all_service_list ul li a{padding-left:3px; background:url(http://image.chosun.com/cs/201003/snbDot.gif) no-repeat 0 4px; font-family:'Gulim',µ¸¿ò; color:#333 !important;}\
#all_service_list ul li.all_view a{color:#0e498d !important;} \
\
#logo_etc{width:970px;float:none;clear:both;overflow:hidden;margin:0;padding:0; height:60px; } \
#logo{position:relative;width:235px;float:left;margin:0 0px 0 19px;display:inline;} \
#logo h1{float:left;font-style:normal;font-size:12px;margin:7px 4px 0 0;} \
#logo h1 img{vertical-align:top;} \
#logo h2{float:left;font-style:normal;font-size:12px;margin-top:7px;} \
#logo h2 img{vertical-align:top;} \
#logo ul#login{position:absolute;top:38px;left:0px;} \
#logo ul#login li{float:left;font-size:11px;color:#666666;} \
#logo ul#login li a{font-size:11px;color:#666666;letter-spacing:-1px;line-height:12px;} \
#logo ul#login li span{color:#333;font-weight:bold;} \
#logo ul#login li span.user_name{color:#666;} \
#lang{float:left;width:55px;margin:0 55px 0 0;line-height:16px;} \
#tot_search{width:266px;float:left;margin:8px 0 0 0;} \
#tot_search fieldset input{vertical-align:middle;} \
.search_box{position:relative;background:url('http://image.chosun.com/cs/gnb/bg_search.gif') left top no-repeat;margin-right:3px;width:250px;height:24px;} \
.search_box input.search_text{border:0;width:205px;margin:3px 0 2px 3px;font-size:12px;font-family:'Dotum';color:#333;ime-mode:active;} \
.search_box input.search_btn{position:absolute;top:0px;left:217px;} \
.popular_search{float:none;clear:both;margin-top:3px;} \
#top_ban{float:right;margin:11px 0 0 0;} \
</style> \
");


	var lVar_Layer=false;
	function lview(viewID){
		if(lVar_Layer==true){
		document.getElementById(viewID).style.display = 'none';
		lVar_Layer=false;
		} else {
		document.getElementById(viewID).style.display = 'block';
		lVar_Layer=true;
		}
		}
		function lclose(viewID){
		document.getElementById(viewID).style.display = 'none';
		lVar_Layer=false;
	}


var gnbWidthVal, gnbCenterWidth ;
if (gnbWidthVal == null || gnbWidthVal == "") gnbWidthVal = "835" ;
if (eval(gnbWidthVal) <= 835) gnbWidthVal = "835" ;
gnbCenterWidth = 450 + (gnbWidthVal-835) ;

document.write(" \
	<div id='s_gnb'> \
	<ul id='c_slogo'><a href='http://www.chosun.com/'><img src='http://image.chosun.com/cs/gnb/logo_chosun_s.gif' alt='chosun.com'></a></ul> \
	<ul id='lnb'> \
		<li class='s_menu_font'><a href='http://news.chosun.com/'><img src='http://image.chosun.com/cs/201003/snbNews.gif' alt='´º½º'></a></li> \
		<li class='s_menu_font'><a href='http://news.chosun.com/editorials/'><img src='http://image.chosun.com/cs/201003/snbOpinion.gif' alt='¿ÀÇÇ´Ï¾ð'></a></li> \
		<li class='s_menu_font'><a href='http://news.chosun.com/sports/'><img src='http://image.chosun.com/cs/201003/snbSports.gif' alt='½ºÆ÷Ã÷'></a></li> \
		<li class='s_menu_font'><a href='http://news.chosun.com/ent/'><img src='http://image.chosun.com/cs/201003/snbEnt.gif' alt='¿¬¿¹'></a></li> \
		<li class='s_menu_font'><a href='http://newsplus.chosun.com/'><img src='http://image.chosun.com/cs/201003/snbLife.gif' alt='?óÀÌÇ?'></a><span style='margin-left:10px;'>|</span></li> \
		<li class='s_menu_font' style='font-weight:bold;'><a href='http://blog.chosun.com/' target='_blank'>ºí·Î±×</a></li> \
		<li id='all_service' class='s_menu_plus' onMouseOut=\"lclose('all_service_list');\"> \
			<a onMouseOver=\"lview('all_service_list');\" style='cursor:pointer;_cursor /**/:hand;'>´õº¸±â</a> <img src='http://image.chosun.com/cs/201003/snbBtmArrow.gif' alt='ÀüÃ¼¼­ºñ½ºº¸±â' onMouseOver=\"lview('all_service_list');\"> \
			<div id='all_service_list' onMouseOver=\"lview('all_service_list');\"> \
				<ul> \
					<li><a href='http://myhome.chosun.com/'>¸¶ÀÌÈ¨</a></li> \
					<li><a href='http://issue.chosun.com/'>ÀÌ½´</a></li> \
					<li><a href='http://careview.chosun.com/'>Ä«¸®ºä</a></li> \
					<li><a href='http://comic.chosun.com/'>¸¸È­</a></li> \
				</ul> \
				<ul> \
					<li><a href='http://newsplus.chosun.com/inside/'>ÀÎ»çÀÌµå</a></li> \
					<li><a href='http://focus.chosun.com/subMain.jsp?pt=M'>ÀÎ¹°</a></li> \
					<li><a href='http://danmee.chosun.com/'>´Ü¹Ì</a></li> \
					<li><a href='http://health.chosun.com/'>Çï½º</a></li> \
					</ul> \
				<ul> \
					<li><a href='http://newsplus.chosun.com/inside/list.html?in_theme=4&in_sitecd=H&in_categ=H1'>Why</a></li> \
					<li><a href='http://bemil.chosun.com/'>À¯¿ë¿øM</a></li> \
					<li><a href='http://keywui.chosun.com/'>Å°À§</a></li> \
					<li><a href='http://review.chosun.com/'>¸®ºä</a></li> \
				</ul> \
				<ul class='lastchild'> \
					<li><a href='http://photorep.chosun.com/'>Æ÷Åä¸®Æ÷ÅÍ</a></li> \
					<li><a href='http://srchdb1.chosun.com/pdf/i_service/'>PDFÁö¸é</a></li> \
					<li><a href='http://golf.chosun.com/'>°ñÇÁ</a></li> \
					<li class='all_view'><a href='http://www.chosun.com/section/customer/sitemap.html'>ÀüÃ¼º¸±â <img src='http://image.chosun.com/cs/201003/snbMoreArrow.gif' alt=''></a></li> \
				</ul> \
			</div> \
		</li> \
<li>" +loginFrame()+ "</li>\
	</ul> \
</div> \
");





var gnbTitImg, gnbTitLink ;
var gnbTitArea ;

if (gnbTitImg != null && gnbTitImg !="" && gnbTitImg.charAt(0) != '$') gnbTitArea = 1 ;
else gnbTitArea = 0 ;

function gnbTitViewer(){
 if (gnbTitLink) gnbTitObj = "<a href=" + gnbTitLink + "><img src=" + gnbTitImg + " border='0' alt='' /></a>" ;
 else gnbTitObj = "<img src=" + gnbTitImg + " border='0' alt='' />" ;
 return gnbTitObj ;
}




if (gnbTitArea){
document.write(" \
	<!-- logo_etc --> \
	<div id='logo_etc'> \
		<div id='logo'> \
			<h2>" + gnbTitViewer() + "</h2> \
			<ul id='login'>" +loginFrame()+ "</ul> \
		</div> \
		<div id='lang'><img src='http://image.chosun.com/cs/200811/images/blank.gif'></div> \
		<div id='tot_search'> \
			<form method='get' action='http://search.chosun.com/search/totalSearch.jsp' target='_blank'> \
				<fieldset> \
					<div class='search_box'><input type='text' name='searchTerm' id='searchTerm' class='search_text' tabindex='1' title='°Ë»ö¾î ÀÔ·Â'><input type='image' src='http://image.chosun.com/cs/gnb/gnb_search_btn.gif' class='search_btn'></div> \
				<fieldset> \
			</form> \
			<div class='popular_search'> \
				<iframe src='http://www.chosun.com/common/r_search/popular/' title='ÃßÃµ°Ë»ö¾î' width='262' height='18' frameborder='0' scrolling='no'></iframe> \
			</div> \
		</div> \
		<div id='top_ban'><iframe src='http://www.chosun.com/event/gnb_event/' title='ÀÌº¥Æ®' width='264' height='40' frameborder='0' scrolling='no'></iframe></div> \
	</div> \
	<!-- logo_etc // --> \
	<!-- gnb --> \
");
}
