
//Áñ°ÜÃ£±â 
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:180px\" 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\"  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 PageNavigation(gourl,totpage,type,curpage){
	var list_page="";
	var next_data="";
	
	gourl = "http://golfhankook.hankooki.com/service/2008/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","topmenu_06"];

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";	    
        }    
    }        
}

//´ñ±Û ¾ÆÀÌÇÁ·¹ÀÓ ¸®»çÀÌÁî
function resizetailFrame(tailFrameId) {
	var Ie     = (navigator.userAgent.toLowerCase().indexOf("msie")!=-1 && window.document.all) ? true:false;
	var objBody  = window.frames[tailFrameId].document.body;
	var objFrame = document.getElementById(tailFrameId);
	ifrmHeight = objBody.scrollHeight + (objBody.offsetHeight - objBody.clientHeight);
	objFrame.style.height = ifrmHeight+10;
	if (Ie==false)
	{
		var iframeElement = parent.document.getElementById(tailFrameId);
		if (parent.frames && parent.frames['dataFrame']) {
			iframeElement.height =  parent.frames['dataFrame'].document.getElementById('offsettop_layer').offsetTop + 10;
		}
	}
}