//========== ÄíÅ°°ª Ã³¸® ÇÔ¼ö 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

// SUBMENU LINE ½ÃÀÛ 
var TimeOut         = 300;
var currentLayer    = null;
var currentitem     = null;
var currentimg    = null;
var currentLayerNum = 0;
var noClose         = 0;
var closeTimer      = null;

// Open Hidden Layer
function mopen(n)
{
    var mm  = document.getElementById('gnb1_'+n);
    var l = document.getElementById('gnb2_s'+n);
    if(l)
    {
        mcancelclosetime();
        l.style.display='block';
        if(currentLayer && (currentLayerNum != n)){
            currentLayer.style.display='none';
		}
        currentLayer = l;
        currentitem = mm;
        currentLayerNum = n;
    }
    else if(currentLayer)
    {
        currentLayer.style.display='none';
        currentLayerNum = 0;
        currentitem = null;
        currentLayer = null;
    }
}
// Turn On Close Timer
function mclosetime()
{
    closeTimer = window.setTimeout(mclose, TimeOut);
}
// Cancel Close Timer
function mcancelclosetime()
{
    if(closeTimer)
    {
        window.clearTimeout(closeTimer);
        closeTimer = null;
    }
}
// Close Showed Layer
function mclose()
{
    if(currentLayer && noClose!=1)
    {
        currentLayer.style.display='none';
        currentLayerNum = 0;
        currentLayer = null;
        currentitem = null;
    }
    else
    {
        noClose = 0;
    }
    currentLayer = null;
    currentitem = null;
}

// Close Layer Then Click-out
document.onclick = mclose; 

//·Î±×ÀÎ °ü·Ã ---
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 = "<li><span>¤ý</span><a href=" + login_url + " target='_top'>·Î±×ÀÎ</a></li><li><span>¤ý</span><a href=" + regist_url + " target='_top'>È¸¿ø°¡ÀÔ</a></li><li><span>¤ý</span><a href=" + idpw_url + " target='_top'>¾ÆÀÌµð / ºñ¹Ð¹øÈ£ Ã£±â</a></li>";
	}
	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 = "<li><span class='user_name'>"+unescape(GetCookie('dz_nm'))+"</span>´Ô</li>" ;
		logStr = logStr + "<li><span>¤ý</span><a href=" + logout_url + " target='_top'>·Î±×¾Æ¿ô</a></li><li><span>¤ý</span><a href=" + join_url + " target='_top'>Á¤º¸¼öÁ¤</a></li>";
	}
	
	return logStr;
}
document.write(" \
<style type='text/css'> \
/*Reset*/\
*{margin:0;padding:0;}\
html,body{width:100%;height:100%;}\
body{background-color:#fff;*word-break:break-all;-ms-word-break:break-all;}\
body,input,button{color:#333; font:normal 12px/17px '±¼¸²',Gulim,'µ¸¿ò',Dotum,AppleGothic,Sans-serif;}\
h1,h2,h3,h4,h5,h6{font-size:12px;text-align:left;}\
img,fieldset,iframe{border:0 none;}\
li{list-style:none;}\
a{color:#333; text-decoration:none;}\
a:hover{text-decoration:underline;}\
a:visited{color:#333;}\
em,address{font-style:normal;}\
input,select{vertical-align:middle;}\
button,label{cursor:pointer;_cursor /**/:hand;}\
hr,legend,caption{display:none;}\
select{height:20px;}\
@media print{\
body{color:#000;}\
}\
\
/* Common */\
.link{cursor:pointer;}\
.ls{letter-spacing:-1px;}\
.b{font-weight:bold;}\
.u{text-decoration:underline;}\
.p,P{margin-top:20px;}\
\
.pr{position:relative;}	 .pa{position:absolute;}\
.c{clear:both;}\
.fl{float:left;}	.fr{float:right;}\
.al{text-align:left;}	.ar{text-align:right;}	.ac{text-align:center;}	.aj{text-align:justify;}\
.at{vertical-align:top;}	.am{vertical-align:middle;}	.ab{vertical-align:bottom;}\
.hide{display:none;}	.show{display:block;}\
\
.noBg{background:none !important;}\
.noBgImg{background-image:none !important;} \
.noBorder{border:0 none !important;}\
.trans{background-color:transparent;}\
.blind{position:absolute; display:block; overflow:hidden; left:0; top:-5000px;}\
\
.tblFixed{table-layout:fixed;}\
.txtBlock{display:inline-block;}\
\
/* Layout Selector */\
#secHeader				{position:relative; width:970px; clear:both; margin:0 auto; padding-top:4px;z-index:1;}\
#secHeader a:visited{color:#333;}\
\
/* Header Area */\
#secHeader h1{position:absolute; top:24px !important;left:3px !important;padding:0 !important;z-index:2;} \
#secHeader h1 a.s_logo{margin-left:6px !important;} \
#secHeader h1 img{vertical-align:top;} \
#secHeader .logoEtc	{position:relative; width:970px; min-height:68px;z-index:1;} \
#secHeader .logoEtc h1{float:left; margin-top:13px; margin-right:133px;} \
#secHeader .logoEtc .etcAd{float:left; padding-left:370px;} \
#secHeader .logoEtc .etcAd iframe{width:270px; height:65px;} \
#secHeader .searchFormBx{position:absolute; top:17px; right:0;width:280px;margin:0 !important;padding:0 !important;} \
#secHeader .searchFormBx dt{position:absolute; display:block; overflow:hidden; left:0; top:-5000px;} \
#secHeader .searchTerm{position:absolute; width:212px; height:20px; padding:0 0 5px 5px;*margin-top:5px;border:0 none; font-family:Dotum;} \
#secHeader .InputOutline{float:left; display:inline-block; width:217px;height:31px;*height:35px;border:2px solid #c51919;margin-right:-3px;} \
#secHeader .searchResult{float:left;} \
/* before_gnb */\
input,textarea,select{background-color:#fff;font-family:inherit;} \
fieldset,img{border:none;} \
legend{display:none;} \
#gnb_new{float:none;clear:both;position:relative;width:970px;height:39px;margin:0;background:url('http://image.chosun.com/cs/gnb/bg_pgnb.gif') left top repeat-x;z-index:2;} \
#gnb1{float:left;margin:9px 0 0 32px;display:inline;} \
#gnb1 li{position:relative;float:left;margin:0;z-index:151;} \
#gnb1 li span{padding:0 15px 0 15px;} \
.gnb2{position:absolute;top:23px;left:0px;display:none;width:100px;padding:14px 0 15px 0;border:2px solid #544ea0;background-color:#fff;overflow:hidden;z-index:152;} \
.gnb2 li{float:none !important;margin:6px 0 0 5px !important;} \
.gnb2 li span{font-weight:bold;color:#999;padding:0 0 0 0 !important;} \
.gnb2 li a{color:#333 !important;;font-weight:normal !important;text-decoration:none !important;} \
.gnb2 li a:hover{text-decoration:underline !important;} \
#gnb3{float:right;margin:8px 10px 0 0;display:inline;} \
#gnb3 li{float:left;} \
#all_ser { margin-top:0px }\
</style> \
	<div id='secHeader'> \
		<h1><a href='http://www.chosun.com/'><img src='http://image.chosun.com/cs/201003/logo_cs_v2.gif' alt='chosun.com'></a><a href='http://video.chosun.com/' class='s_logo'><img src='http://image.chosun.com/cs/201005/logo_video2010.gif' alt='¸ÖÆ¼¹Ìµð¾î/µ¿¿µ»ó'></a></h1> \
		<div class='logoEtc'> \
			<div class='etcAd'> \
				<iframe src='http://news.chosun.com/svc/with/common/promotion.html' width='260' height='65' marginwidth='0' marginheight='0' scrolling='no' frameborder='0'></iframe> \
			</div> \
			 \
			<dl class='searchFormBx'> \
			<dt>°Ë»ö</dt> \
			<dd> \
			<form method='get' name='searchForm' id='id_searchForm' action='http://search.chosun.com/search/total.search' target='_blank' accept-charset='utf-8' onsubmit='goSearch(); return false;'>\
			<fieldset>\
				<legend>ÅëÇÕ°Ë»ö</legend>\
				<span class='InputOutline'><input type='text'  id='query' name='query' class='searchTerm' title='°Ë»ö¾î ÀÔ·Â'></span>\
				<input type='image' src='http://image.chosun.com/cs/201003/searchBtn.gif' alt='°Ë»ö' title='°Ë»ö' class='searchResult'>\
			</fieldset>\
			</form>\
			</dd> \
			</dl> \
		</div> \
		<hr> \
	</div> \
	<!-- gnb --> \
	<div id='gnb_new'> \
		<ul id='gnb1'> \
			<li id='gnb1'><a href='http://video.chosun.com/'><img src='http://image.chosun.com/cs/gnb/video_menu.gif' id='gnbimg' alt='µ¿¿µ»óÈ¨'></a><span><img src='http://image.chosun.com/cs/gnb/bar_pgnb.gif' alt=''></span></li> \
			<li id='gnb1_0'><a href='http://video.chosun.com/'><img src='http://image.chosun.com/cs/gnb/video_menu0.gif' id='gnbimg_0' alt='ÃÖ½Åµ¿¿µ»ó'></a><span><img src='http://image.chosun.com/cs/gnb/bar_pgnb.gif' alt=''></span></li> \
			<li id='gnb1_1'><a href='http://video.chosun.com/index.html?action=pop'><img src='http://image.chosun.com/cs/gnb/video_menu1.gif' id='gnbimg_1' alt='ÀÎ±âµ¿¿µ»ó'></a><span><img src='http://image.chosun.com/cs/gnb/bar_pgnb.gif' alt=''></span></li> \
			<li id='gnb1_2' onmouseover=\"mopen('2');\" onmouseout=\"mclosetime();\"><a href='http://video.chosun.com/index.html?action=1_'><img src='http://image.chosun.com/cs/gnb/video_menu2.gif' id='gnbimg_2' alt='´º½ºµ¿¿µ»ó'></a><span><img src='http://image.chosun.com/cs/gnb/bar_pgnb.gif' alt=''></span> \
					<ul id='gnb2_s2' class='gnb2'> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=1_2'>Á¤Ä¡</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=1_1'>°æÁ¦</li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=1_3'>»çÈ¸</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=1_5'>¹®È­</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=1_4'>±¹Á¦</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=10_2'>¿¬¿¹</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=10_1'>½ºÆ÷Ã÷</a></li> \
				</ul> \
			</li> \
			<li id='gnb1_3' onmouseover=\"mopen('3');\" onmouseout=\"mclosetime();\"><a href='http://video.chosun.com/index.html?action=22_'><img src='http://image.chosun.com/cs/gnb/video_menu3.gif' id='gnbimg_3' alt='±âÈ¹µ¿¿µ»ó'></a> \
				<ul id='gnb2_s3' class='gnb2' style='width:115px;'> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_12'>´ÙÅ¥¡¤±âÈ¹</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_11'>ÇÃ·¡½Ã´º½º</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1B'>½ºÅ¸ÀÌ½´</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1V'>½ºÆ÷Ã÷ ·±¾Ø·±</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1W'>¼­Á¤¿í ¹Ì¼úÅäÅ©</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1Y'>It Tools & Cook</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1F'>½Ã³× ¾÷µ¥ÀÌÆ®</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1Z'>ÇÑ¡¤ÀÏ °­Á¦º´ÇÕ<br>¡¡100³â</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1a'>ÁÖ°£ ÇÖÀÌ½´</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1K'>¸®ºä Á¶¼±</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_13'>CAReview</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_15'>Book TV</a></li> \
					<li><span>¤ý</span><a href='http://health.chosun.com/news/healthavi_main.jsp'>¸íÀÇ Çï½º°­ÁÂ</a></li> \
					<li><span>¤ý</span><a href='http://video.chosun.com/index.html?action=22_1T'>VPR</a></li> \
				</ul> \
			</li> \
		</ul> \
		<ul id='gnb3'> \
			<li><a href='http://photo.chosun.com/'><img src='http://image.chosun.com/cs/gnb/menu_pt011.gif' alt='Æ÷Åä'></a></li> \
			<li><a href='http://video.chosun.com/'><img src='http://image.chosun.com/cs/gnb/menu_pt021.gif' alt='µ¿¿µ»ó'></a></li> \
		</ul> \
	</div> \
	<!-- gnb // --> \
");

function goSearch() {
	var f = document.getElementById('id_searchForm');
	document.charset = 'utf-8';
	f.submit();
	document.charset = 'euc-kr';
}
