var hk_menu;

function hk_menu(sub1,sub2)
{
	//¸Þ´º¼±ÅÃ ¹øÈ£
	//sub1: 0-¼±ÅÃX, 1-°æÁ¦¾ß³îÀÚ, 2-Áõ±Ç, 3-ºÎµ¿»ê, 4-ÀçÅ×Å©, 5-TESAT
	//sub2: ¼­ºê¸Þ´º ¼±ÅÃ

	//Ã¤³Î¸Þ´º¼±ÅÃ
	var menu_no;

	hk_menu = sub1;

	switch (sub1) {
		case 0:	 menu_no = "00"; break;
		case 1:	 menu_no = "01"; break;
		case 2:	 menu_no = "02"; break;
		case 3:	 menu_no = "03"; break;
		case 4:	 menu_no = "04"; break;
		case 5:	 menu_no = "05"; break;
		default: menu_no = "00"; break;
	}

	//¼­ºê¸Þ´º¼±ÅÃ
	var sub_no01 = "off";
	var sub_no02 = "off";
	var sub_no03 = "off";
	var sub_no04 = "off";
	var sub_no05 = "off";
	var sub_no06 = "off";
	var sub_no07 = "off";
	var sub_no08 = "off";
	var sub_no26 = "off";
	var sub_no27 = "off";

	switch (sub2) {
		case 1: sub_no01 = "on"; break;
		case 2: sub_no02 = "on"; break;
		case 3: sub_no03 = "on"; break;
		case 4: sub_no04 = "on"; break;
		case 5: sub_no05 = "on"; break;
		case 6: sub_no06 = "on"; break;
		case 7: sub_no07 = "on"; break;
		case 8: sub_no08 = "on"; break;
		case 26: sub_no26 = "on"; break;
		case 27: sub_no27 = "on"; break;
	}

	// °øÅë
	if (sub1 == 0) {
	}

	// °æÁ¦¾ß³îÀÚ
	if (sub1 == 1) {
		submenu = '\
			<td><a href="/board/list.php?id=s_explanation_news&ch=s1" target="_top"><img src="/img/s_submenu0101_' + sub_no01 + '.gif" height="11" border="0"></a></td>\
			<td><a href="/economy/s_economy_topnews.html" target="_top"><img src="/img/s_submenu0107_' + sub_no07 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/board/list.php?id=_column_278_1&ch=s1" target="_top"><img src="/img/s_submenu0102_' + sub_no02 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/quiz/flash_quiz/index.php?quizid=OXEconomic_Quiz" target="_top"><img src="/img/s_submenu0103_' + sub_no03 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/dic/" target="_top"><img src="/img/s_submenu0104_' + sub_no04 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/news/app/newslist.php?nid=291&sid=0115&page=1" target="_top"><img src="/img/s_submenu0105_' + sub_no05 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/news/app/newslist.php?nid=291&sid=01012013&page=1" target="_top"><img src="/img/s_submenu0106_' + sub_no06 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
		';
	}

	// Áõ±Ç
	if (sub1 == 2) {
		submenu = '\
			<td><a href="/board/list.php?id=_column_281_1&ch=s2" target="_top"><img src="/img/s_submenu0201_' + sub_no01 + '.gif" height="11" border="0"></a></td>\
			<td><a href="/board/list.php?id=ecartoon&skin=s_scartoon&ch=s2" target="_top"><img src="/img/s_submenu0202_' + sub_no02 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/news/app/newslist.php?nid=292&sid=0102&page=1" target="_top"><img src="/img/s_submenu0203_' + sub_no03 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/board/list.php?id=s_sense_stock&ch=s2" target="_top"><img src="/img/s_submenu0204_' + sub_no04 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/edunbook/edunbook_list.php?id=edunbook&ctg1=stock&ctg2=edu" target="_top"><img src="/img/s_submenu0205_' + sub_no05 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/quiz/today_quiz/today_quiz_list.php?category=stock&menu=1" target="_top"><img src="/img/s_submenu0206_' + sub_no06 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
		';
	}

	// ºÎµ¿»ê
	if (sub1 == 3) {
		submenu = '\
			<td><a href="/estate/column_all.php" target="_top"><img src="/img/s_submenu0301_' + sub_no01 + '.gif" height="11" border="0"></a></td>\
			<td><a href="/estate/s_estate_escape.html" target="_top"><img src="/img/s_submenu0302_' + sub_no02 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/news/app/newslist.php?nid=293&sid=0103&page=1" target="_top"><img src="/img/s_submenu0303_' + sub_no03 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/board/list.php?id=s_sense_estate&ch=s3" target="_top"><img src="/img/s_submenu0304_' + sub_no04 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/edunbook/edunbook_list.php?id=edunbook&ctg1=estate&ctg2=edu" target="_top"><img src="/img/s_submenu0305_' + sub_no05 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/quiz/today_quiz/today_quiz_list.php?category=estate&menu=1" target="_top"><img src="/img/s_submenu0306_' + sub_no06 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/board/list.php?id=s_vod_estate&ch=s3" target="_top"><img src="/img/s_submenu0326_' + sub_no26 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
		';
	}

	// ±ÝÀ¶ÀçÅ×Å©
	if (sub1 == 4) {
		submenu = '\
			<td><a href="/finance/column_all.php" target="_top"><img src="/img/s_submenu0401_' + sub_no01 + '.gif" height="11" border="0"></a></td>\
			<td><a href="/board/list.php?id=ecartoon&skin=s_fcartoon&category=1&ch=s4" target="_top"><img src="/img/s_submenu0402_' + sub_no02 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/news/app/newslist.php?nid=294&sid=01022012&page=1" target="_top"><img src="/img/s_submenu0403_' + sub_no03 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/board/list.php?id=s_sense_finance&ch=s4" target="_top"><img src="/img/s_submenu0404_' + sub_no04 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/quiz/goldenbell/" target="_top"><img src="/img/s_submenu0406_' + sub_no06 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/board/list.php?id=s_vod_invest&ch=s4" target="_top"><img src="/img/s_submenu0427_' + sub_no27 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/board/list.php?id=s_movie_finance&ch=s4" target="_top"><img src="/img/s_submenu0408_' + sub_no08 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
		';
	}

	// TESAT
	if (sub1 == 5) {
		submenu = '\
			<td><a href="/tesat/s_tesat_info.html" target="_top"><img src="/img/s_submenu0501_' + sub_no01 + '.gif" height="11" border="0"></a></td>\
			<td><a href="/tesat/s_tesat_setproblem.html" target="_top"><img src="/img/s_submenu0502_' + sub_no02 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/tesat/s_tesat_type.html" target="_top"><img src="/img/s_submenu0503_' + sub_no03 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/tesat/s_tesat_valuation.html" target="_top"><img src="/img/s_submenu0504_' + sub_no04 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="/tesat/s_tesat_sample_q1.html" target="_top"><img src="/img/s_submenu0505_' + sub_no05 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="javascript:popWin(\'/tesat_noticepopup_081001.html\', \'noticepopup\', 350, 350, \'no\', \'no\');" target="_top"><img src="/img/s_submenu0506_' + sub_no06 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
			<td><a href="javascript:popWin(\'/tesat_noticepopup_081001.html\', \'noticepopup\', 350, 350, \'no\', \'no\');" target="_top"><img src="/img/s_submenu0507_' + sub_no07 + '.gif" height="11" border="0" style="margin:0 0 0 25"></a></td>\
		';
	}


	// ¸Þ´º »Ñ¸®±â ½ÃÀÛ
	document.write('\
		<!-- ¸Þ´º ½ÃÀÛ -->\
		<table width="942" border="0" cellpadding="0" cellspacing="0">\
		<tr><td><img src="/img/s_topmenu' + menu_no + '.jpg" width="942" height="34" border="0" usemap="#topmenu"></td></tr>\
		<map name="topmenu">\
		<area shape="rect" coords="21,6,100,32" href="http://s.hankyung.com/economy/" target="_top" title="°æÁ¦¾ß³îÀÚ">\
		<area shape="rect" coords="105,6,184,32" href="http://s.hankyung.com/stock/" target="_top" title="Áõ±Ç">\
		<area shape="rect" coords="189,6,268,32" href="http://s.hankyung.com/estate/" target="_top" title="ºÎµ¿»ê">\
		<area shape="rect" coords="273,6,352,32" href="http://s.hankyung.com/finance/" target="_top" title="±ÝÀ¶ÀçÅ×Å©">\
		<area shape="rect" coords="357,6,436,32" href="http://s.hankyung.com/tesat/s_tesat_info.html" target="_top" title="TESAT">\
		<area shape="rect" coords="849,11,917,24" href="http://s.hankyung.com/board/list.php?id=s_notice&ch=s" target="_top" title="¾Ë¸²&ÀÌº¥Æ®">\
		</map>\
	');
	if (sub1 != '0') {
		document.write('\
			<tr valign="top">\
				<td height="30" background="/img/s_submenu_bg01.gif">\
					<!-- ¼­ºê ¸Þ´º ½ÃÀÛ -->\
					<p style="margin:9 0 0 40">\
					<table border="0" cellpadding="0" cellspacing="0">\
					<tr valign="top">\
					' + submenu + '\
					</tr>\
					</table>\
					<!-- ¼­ºê ¸Þ´º ³¡ -->\
				</td>\
			</tr>\
		');
	}
	if (sub2 == '0') {
		if (sub1 == '1') {
			document.write('\
				<tr><td><iframe src="/inc/s_promotion_economy.html" width="942" height="32" frameborder="0" scrolling="no"></iframe></td></tr>\
			');
		}
		if (sub1 == '2') {
			document.write('\
				<tr><td><iframe src="/inc/s_promotion_stock.html" width="942" height="32" frameborder="0" scrolling="no"></iframe></td></tr>\
			');
		}
		if (sub1 == '3') {
			document.write('\
				<tr><td><iframe src="/inc/s_promotion_estate.html" width="942" height="32" frameborder="0" scrolling="no"></iframe></td></tr>\
			');
		}
		if (sub1 == '4') {
			document.write('\
				<tr><td><iframe src="/inc/s_promotion_finance.html" width="942" height="32" frameborder="0" scrolling="no"></iframe></td></tr>\
			');
		}
	}
	document.write('\
		<tr><td height="14"></td></tr>\
		</table>\
		<!-- ¸Þ´º ³¡ -->\
	');
}
