//Áñ°ÜÃ£±â 
function add_favorite(link,title) {
	window.external.addFavorite(link,title);
}

// °Ë»ö
function search_form(){
	document.writeln("		<table width=\"240\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" valign='bottom'>");
	document.writeln("	<form name='isearch' method='get' action=\"http://search.hankooki.com/search.php\" onSubmit='return SetSearch.GoAction()'>");

	document.writeln("		<tr> ");
	document.writeln("			<td><input name=\"kw\" type=\"text\" class=\"input_search\" style=\"width:182px;height:19px;\" value=\"°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä\" onclick=\"SetSearch.check_search(this)\"></td>");
	document.writeln("			<td width=\"52\"><input type='image' src=\"http://img.hankooki.com/sports/2007/12/btn_search.gif\" width=\"52\"  border=\"0\"></td>");
	document.writeln("		</tr>");
	document.writeln("	</form>");
	document.writeln("		</table>");
}

function media_main(){
	document.writeln("<!-- menu script -->");
	document.writeln("      <table width=\"970\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.writeln("        <tr> ");
	document.writeln("          <td width=\"189\"><embed src='http://img.hankooki.com/common/banner/sp_left.swf' width=\"189\" height=\"49\"  allowScriptAccess='always' wmode=transparent style='z-index:-10'></a></td>");
	document.writeln("          <td width=\"617\">");
	document.writeln("		 <!--¸ÅÃ¼¸Þ´º³ª¿­ ½ÃÀÛ--> ");
	document.writeln("		  <IFRAME WIDTH=\"617\" HEIGHT=\"49\" FRAMEBORDER=\"NO\" SCROLLING=\"NO\" SRC=\"http://sports.hankooki.com/js/2007/12/inc_top_t.htm\" NAME=\"top2\"></IFRAME>");
	document.writeln("          <!--¸ÅÃ¼¸Þ´º³ª¿­ ³¡--></td>");
	document.writeln("          <td><a href='http://misskorea.hankooki.com/'><img src=\"http://img.hankooki.com/sports/2007/12/sp_miko.gif\" width=\"164\" height=\"49\" border='0'></a></td>");
	document.writeln("        </tr>");
	document.writeln("      </table>");
	document.writeln("      <table width=\"970\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.writeln("        <tr>");
	document.writeln("          <td width=\"738\" valign=\"top\"> <table width=\"738\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">");
	document.writeln("              <tr>");
	document.writeln("                <td><div id=\"search\" style=\"position:absolute; top:160px; width:225px; height:29px; z-index:1; padding-left:10px;\"> ");

}

function MainSearchList(){
	document.writeln("	<form name='isearch' method='get' action=\"http://search.hankooki.com/search.php\" onSubmit='return SetSearch.GoAction()'>");
	document.writeln("		<table width=\"220\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" valign='bottom'>");
	document.writeln("		<tr> ");
	document.writeln("			<td><input name=\"kw\" type=\"text\" class=\"input_search\" style=\"width:160px; height:20px;\" value=\"°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä\" onclick=\"SetSearch.check_search(this)\"></td>");
	document.writeln("			<td width=\"52\"><input type='image' src=\"http://img.hankooki.com/sports/2007/12/btn_search.gif\" width=\"52\"  border=\"0\"></td>");
	document.writeln("		</tr>");
	document.writeln("		</table>");
	document.writeln("	</form>");
}

function MediaMenuLink(){
	document.write("<li style=\"width:570px;\">	");	
	document.write("<dl class=\"info_01\">");
	document.write("	<dt></dt>");
	document.write("	<dd><a href=\"http://www.hankooki.com/\" class=\"btn_1\"></a></dd>");
	document.write("	<dd><a href=\"http://news.hankooki.com/\" class=\"btn_2\"></a></dd>");
	document.write("	<dd><a href=\"http://economy.hankooki.com/\" class=\"btn_3\"></a></dd>");
	document.write("	<dd><a href=\"http://sports.hankooki.com/\" class=\"btn_4\"></a></dd>");
	document.write("	<dd><a href=\"http://kids.hankooki.com/\" class=\"btn_5\"></a></dd>");
	document.write("	<dd><a href=\"http://www.koreatimes.co.kr/\" class=\"btn_6\" target='_blank'></a></dd>");
	document.write("	<dd><a href=\"http://www.koreatimes.com/\" class=\"btn_7\" target='_blank'></a></dd>");
	document.write("</dl>		");
	document.write("</li>");
}

function SportsMenuLink(){
	document.write("<li><a href=\"javascript:gotoRecent('sp')\">ÃÖ½Å±â»ç</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/baseball/baseball.htm\">¾ß±¸</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/mlb/mlb.htm\">MLB</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/soccer/soccer.htm\">Ãà±¸</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/basketball/basketball.htm\">³ó±¸</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/volleyball/volleyball.htm\">¹è±¸</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/moresports/golf.htm\">°ñÇÁ</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/moresports/fight.htm\">ÀÌÁ¾°ÝÅõ±â</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/moresports/common.htm\">½ºÆ÷Ã÷ÀÏ¹Ý</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/moresports/moredaily.htm\">¿À´ÃÀÇ °æ±â </a></li>");
}

function EntvMenuLink(){
	document.write("<li><a href=\"http://sports.hankooki.com/entv/list_entv.htm\">ÃÖ½Å±â»ç</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/entv/entv.htm\">¹æ¼Û</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/music/music.htm\">À½¾Ç</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/cinet/cinet.htm\">¿µÈ­</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/entv/common.htm\">¿¬¿¹ÀÏ¹Ý</a></li>");
}

function LifeMenuLink(){
	document.write("<li><a href=\"http://sports.hankooki.com/life/list_life.htm\">ÃÖ½Å±â»ç</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/tour/tour.htm\">¿©Çà¡¤·¹Àú</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/culture/culture.htm\">¹®È­¡¤°ø¿¬</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/race/race.htm\">°æ¸¶¡¤°æ·û¡¤°æÁ¤</a></li>");
	document.write("<li><a href=\"http://fortune.hankooki.com\">¿î¼¼</a></li>");
	document.write("<li><a href=\"http://cinepox.hankooki.com\">¿µÈ­°ü</a>&nbsp;<img src=http://img.hankooki.com/sports/200508/new.gif border=0 align=absmiddle></li>");
    document.write("<li><a href=\"http://sports.hankooki.com/errotalk/errotalk.htm\">¿¡·ÎÅäÅ©</a></li>");
    document.write("<li><a href=\"http://sports.hankooki.com/yogikyung/yogikyung.htm\">¿äÁö°æ¼¼»ó</a></li>");
    document.write("<li><a href=\"http://sports.hankooki.com/lifenjoy/lifenjoy.htm\">´º½ºÈ­Á¦</a></li>");
}

function HotIssueMenuLink(){
	document.write("<li><a href=\"http://sports.hankooki.com/hotissue/behind_sp.php\">½ºÆ÷Ã÷µÞ¾ê±â</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/hotissue/behind_entv.php\">¿¬¿¹°¡µÞ¾ê±â</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/hotissue/manygisa.php\">¸¹ÀÌº»±â»ç</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/hotissue/hotgisa.php\">ºÐ¾ßº°ÁÖ¿ä±â»ç</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/hotissue/todaystar.htm\">Åõµ¥ÀÌ½ºÅ¸</a></li>");
}

function EnjoyMenuLink(){
	document.write("<li><a href=\"http://sports.hankooki.com/wiz/list_wiz.htm\">ÃÖ½Å±â»ç</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/theme_news/theme_news.htm\">Å×¸¶´º½º</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/focus/focus.htm\">Æ÷Ä¿½º</a></li>");
	document.write("<li><a href=\"http://sports.hankooki.com/report/report.htm\">¸£Æ÷</a></li>");
    document.write("<li><a href=\"http://sports.hankooki.com/kr_behind/kr_behind.htm\">ºñÇÏÀÎµå½ºÅä¸®</a></li>");
    document.write("<li><a href=\"http://sports.hankooki.com/wiz_sports/wiz_sports.htm\">½ºÆ÷Ã÷</a></li>");
    document.write("<li><a href=\"http://sports.hankooki.com/st_story/st_story.htm\">¿£ÅÍÅ×ÀÎ¸ÕÆ®</a></li>");
    document.write("<li><a href=\"http://sports.hankooki.com/biz/biz.htm\">biz</a></li>");
    document.write("<li><a href=\"http://sports.hankooki.com/people/people.htm\">ÇÇÇÃ</a></li>");
}

function PageNavigation(gourl,totpage,type,curpage){
	var list_page="";
	var next_data="";
	
	gourl = "http://sports.hankooki.com/service/2007/12/morelist/"+gourl;
	
	list_page +="<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
	list_page +="<tr> ";
	list_page +=" <td height=\"30\" align=\"center\">";
	list_page +=" <img src=\"http://img.hankooki.com/news/2007/12/btn_b_before.gif\" width=\"12\" height=\"11\">&nbsp;&nbsp;&nbsp;";
	
	if(totpage > 100){
		maxnum=11;
		next_data = "<a href="+gourl+"?page=11&type="+type+"><img src=\"http://img.hankooki.com/news/2007/12/btn_b_after.gif\" width=\"12\" height=\"11\"></a>";
	}else{
		maxnum=Math.ceil(totpage/10);
		next_data = "<img src=\"http://img.hankooki.com/news/2007/12/btn_b_after.gif\" width=\"12\" height=\"11\">";
	}
	for(i=1;i<maxnum;i++){
		if(i==curpage) list_page +="<b class=\"paging\">"+i+"</b>&nbsp;&nbsp;&nbsp;";
		else list_page +="<a href="+gourl+"?page="+i+"&type="+type+">"+i+"</a>&nbsp;&nbsp;&nbsp;";
	}
	list_page +=next_data;
	list_page +=" </td>";
	list_page +="</tr>";
	list_page +="</table>";
	ListNavi.innerHTML=list_page;
}


//¸µÅ© ¸·±â
function GotoHkLast(section,prefix,gisacode) {
    var postval;
    if(prefix == 'PL1'){
        postval = section +  'lpage/'+ gisacode.substring(1,gisacode.length);
    }else if(prefix == 'PL2'){
        postval = gisacode;
    }else{
        postval = 'http://' + window.location.host  + '/lpage'+ section + '/' + gisacode.substr(prefix.length,6)+ '/' + gisacode;
    }
    location.href = postval;
   
}

//¸Þ´º ÅÇ
var arrTopmenuTab = ["topmenu_01","topmenu_02","topmenu_03","topmenu_04","topmenu_05"];

function setTopmenuTab(tabid){
    for(i=0;i<arrTopmenuTab.length;i++){
        if(arrTopmenuTab[i]==tabid){
            document.getElementById(arrTopmenuTab[i]).style.display = "block";
            document.getElementById("tab0"+ (i+1)).className = "naviON";	    
            
        }else{   
            document.getElementById(arrTopmenuTab[i]).style.display = "none";
            document.getElementById("tab0"+ (i+1)).className = "naviOFF";	    
        }    
    }        
}



//¿¡·ÎÅäÅ©ÀÏ °æ¿ì ¼ºÀÎÀÎÁõ
var thisUrl = document.URL;

if (thisUrl=='http://sports.hankooki.com/errotalk/errotalk.htm'){
	var adultCookie = getCookie('mlogin_extend');
	if (!adultCookie || adultCookie==null){
		alert('¼ºÀÎÀÎÁõÀ» ÇÏ¼Å¾ß º¼¼öÀÖ½À´Ï´Ù.');
		location.href="http://member.hankooki.com/adult_auth/certify.php?path=0608&home=club.hankooki.com&url="+thisUrl;
	}else{
		adultInfo = adultCookie.split('|');
		if(adultInfo[0] <= 18 || adultInfo[4] !="1") {
			history.back(1);
		}
	}
}
