function pressEnter(e,f) {
        if(e.keyCode == 13) {
                kwdSearch(f);
                return false;
        } 
     return false;//Ãß°¡µÊ. ¹«Á¶°Ç false ¸¦ ¸®ÅÏ.
}

// Enter KeyPress
function keyPressTop(e,f) {
	if(e.keyCode == 13) {
		kwdSearchTop(f);
		return false;
	}
	//return false;//Ãß°¡µÊ. ¹«Á¶°Ç false ¸¦ ¸®ÅÏ.
}


function kwdSearchTop(f)
{
	if( f.kwd.value == "" || f.kwd.value == "°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä") 
	{
		alert("°Ë»öÇÒ Å°¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		f.kwd.focus();
		return false;
	}
	else
	{	
	//	f.pageNum.value = 1;
		f.submit();
	}
}


function kwdSearch(f)
{
	if( f.kwd.value == "" ) {
		alert("°Ë»öÇÒ Å°¿öµå¸¦ ÀÔ·ÂÇÏ¼¼¿ä");
		f.kwd.focus();
	}else{
	
	if(f.site_info.options[f.site_info.selectedIndex].value == 0)
	 {
	 	f.scope.value = 0;
	 }
	 else if(f.site_info.options[f.site_info.selectedIndex].value == 1)
	 {
	 	f.scope.value = 1;
	 }
	 else
	 {
	 	f.scope.value = 2;
	 }
	
		if(f.reSrch.checked==true) f.reSrch.value="on";
		else f.reSrch.value="";
		f.pageNum.value = 1;
		f.submit();
	}
}

function reSearch(f)
{
	f.kwd.value='';
	f.kwd.select();
}

function init() {
	window.parent.up.document.all.q.value = "";
	window.parent.up.document.all.q.focus();
}

function gotoEntry(e) {
	document.f2.pageNum.value = 1;
	document.f2.entryNm.value = e;
	document.f2.action = "/util/search/" +e +"_list.jsp";
	document.f2.submit();
}

function gotoPage(n) {
	document.f2.pageNum.value = n;
	document.f2.submit();
}

function showDetail(n) {
	var url, feature;
    url = "news.cgi?action=detail&id=" + n;
    feature = "height=650, width=600, location=no, menubar=no, scrollbars=yes";
    window.open( url, "detail_win", feature );
}

function buildPageNav( pageNum, pageSize, total )
{
	var totalPages;

	totalPages = Math.floor((total-1)/pageSize) + 1

	if( totalPages < 1 )
		return "";

	var ret, PAGEBLOCK;

	ret = "";
	PAGEBLOCK=10;

	var i, firstPage, lastPage;

	firstPage = Math.floor((pageNum-1)/PAGEBLOCK) * PAGEBLOCK + 1;
	if( firstPage <= 0 ) // ?
		firstPage = 1;

	lastPage = firstPage-1 + PAGEBLOCK;
	if( lastPage > totalPages )
		lastPage = totalPages;

	if( firstPage >= PAGEBLOCK )
	{
		ret = ret + "<a href='javascript:gotoPage(1)'><IMG src='/kosearch/images/btn/list_first.gif' ALT='Ã³À½' ALIGN='absmiddle'></a>&nbsp;\n";
		ret = ret + "<a href='javascript:gotoPage(" + (firstPage-1) + ")'><IMG src='/kosearch/images/btn/list_back.gif' ALT='ÀÌÀü' ALIGN='absmiddle'></a>&nbsp;&nbsp;\n";
	}

	i = firstPage;
	while( i <= lastPage && (i-1)*pageSize <= total )

	for( i=firstPage; i<=lastPage; i++ )
	{
		if( (i-1)*pageSize > total ) break;
		if( pageNum == i ){
			if( i < lastPage )
				ret = ret + "<b>" + i + "</b>&nbsp;/\n";
			else
				ret = ret + "<b>" + i + "</b>&nbsp;\n";
		}else{
			if( i < lastPage )
				ret = ret + "<a href='javascript:gotoPage(" + i + ")'>" + i + "</a>&nbsp;/\n";
			else
				ret = ret + "<a href='javascript:gotoPage(" + i + ")'>" + i + "</a>&nbsp;\n";
		}
	}

	if( (lastPage+1)*pageSize < total )
	{
		ret = ret + "&nbsp;&nbsp;<a href='javascript:gotoPage(" + (lastPage+1) + ")'><IMG src='/kosearch/images/btn/list_next.gif' ALT='´ÙÀ½' ALIGN='absmiddle'></a>\n";
		ret = ret + "&nbsp;<a href='javascript:gotoPage(" + (totalPages) + ")'><IMG src='/kosearch/images/btn/list_end.gif' ALT='³¡' ALIGN='absmiddle'></a>\n";
	}

	return ret;
}

/*
function scopeClick(f,v)
{
    var scope = f.site_info.options[f.site_info.selectedIndex].value;
	if(scope==2){
		f.site_info.disabled = false;	
	}else{
		f.site_info[0].selected = true;	
		f.site_info.disabled = true;	
	}
}*/
function scopeClick(f,v)
{

	if(v==2){
		f.site_info.disabled = false;	
	}else{
		f.site_info[0].selected = true;	
		f.site_info.disabled = true;	
	}
}
function toggleAdvSearch(){
	var obj = document.getElementById("advSearch");
	
	if (obj) {
		if (obj.style.display == "none") {
			obj.style.display = "block";
		} else {
			obj.style.display = "none";
		}
	}
}
function f_header_top_navigation(){
    document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ID="top_navigation" WIDTH="610" HEIGHT="100%" ALIGN="">');
    document.write ('<PARAM NAME="movie" VALUE="/korean/images/flash/top_navigation_sub_070228.swf">');
    document.write ('<PARAM NAME="quality" VALUE="high">');
    document.write ('<PARAM NAME="scale" VALUE="noscale">');
    document.write ('<PARAM NAME="wmode" VALUE="transparent">');
    document.write ('<PARAM NAME="flashvars" VALUE="mode=<%=f_key%>&subMode=<%=f_subkey%>">');
    document.write ('<EMBED src="/korean/images/flash/top_navigation_sub_070228.swf" quality="high" scale="noscale" wmode="transparent" bgcolor="#FFFFFF" WIDTH="610" HEIGHT="100%" swLiveConnect="true" ID="top_navigation" NAME="top_navigation" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>');
    document.write ('</OBJECT>');
}
function f_index_top_navigation_main_051230(){
    document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ID="top_navigation" WIDTH="610" HEIGHT="100%" ALIGN="">');
    document.write ('<PARAM NAME="movie" VALUE="/korean/images/flash/top_navigation_main_070228.swf"> ');
    document.write ('<PARAM NAME="quality" VALUE="high"> ');
    document.write ('<PARAM NAME="scale" VALUE="noscale"> ');
    document.write ('<PARAM NAME="wmode" VALUE="transparent"> ');
    document.write ('<PARAM NAME="flashvars" VALUE="mode=0&subMode=0"> ');
    document.write ('<PARAM NAME=menu VALUE=false> ');
    document.write ('<EMBED src="/korean/images/flash/top_navigation_main_070228.swf" wmode="transparent" bgcolor="#FFFFFF" WIDTH="610" HEIGHT="100%" swLiveConnect="true" ID="top_navigation" NAME="top_navigation" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED> ');
    document.write ('</OBJECT> ');
}

// ÀÌ¸ÞÀÏÁý´Ü¼öÁý°ÅºÎ
function no_email()
{
	window.open('/korean/utility/etc/popEmail.jsp','noemail_win',set_center(356,301,1));
}

function set_center(width,height,type)
{
	    nWidth = width;
		nHeight = height;
		nLeft = (window.screen.width - nWidth ) / 2;
		nTop  = (window.screen.height- nHeight) / 2;
		sF = "";
		if(type=="1") sF += "toolbar=no,location=no,menubar=no,status=no,directories=no,resizable=no,scrollbars=no";
		else sF += "toolbar=no,location=no,menubar=no,status=no,directories=no,resizable=no,scrollbars=yes";
		sF += ",left=" + nLeft;
		sF += ",top=" + nTop;
		sF += ",width=" +  nWidth;
		sF += ",height=" + nHeight;
		return sF;
}


function go_link(url)
{
	var go_url ;
	if(url.indexOf("http://") != -1){
		go_url = url;
	}else{
		go_url = "http://"+url;
	}
	
	window.open(go_url,"new_win","");
}

/*
function go_link(url)
{
	var go_url ;
	if(url.indexOf("http://") != -1){
		go_url = url;
	}else{
		go_url = "http://"+url;
	}
	
	window.open(go_url,"new_win","");
}
*/
function isFucking(text)
	{
		var check1 = [
			"°­°£",
			"°Å½Ã±â",
			"°íÃß",
			"²¿Ãß",
			"°³³â",
			"°³³ð",
			"°³º¸Áö",
			"°³»õ³¢",
			"°³¼¼ÀÌ",
			"°³½¦ÀÌ",
			"°³ÀÚ½Ä",
			"°³ÀÚÁö",
			"°³Áö¶ö",
			"18±Ý",
			"³ë¶õ±¹¹°",
			"³ëºê¶ó",
			"³ëÆÒÆ¼",
			"´Ï¹Ì¶ö",
			"´Ï¹Ì·²",
			"µþµþÀÌ",
			"´ëÆ÷Â÷",
			"µ¶±Ø¹°",
			"·ë½Î·Õ",
			"¸¶½ºÅÍº£ÀÌ¼Ç",
			"¸¶¾à",
			"¸Á°¡",
			"¸ôÄ«",
			"molca",
			"¸Å¸Å",
			"¹ÌÄ£³Ñ",
			"¹ÌÄ£³â",
			"¹ÌÄ£³ð",
			"¹Ð½Ç",
			"º¯ÅÂ",
			"ºÎ¶ö",
			"ºÒ¾Ë",
			"º¸Áö",
			"BDSM",
			"bdsm",
			"boji",
			"BOJI",
			"ºä¹Ù",
			"ºñ¹Ð¹øÈ£",
			"ºñ¾Æ±×¶ó",
			"ºü°É",
			"ºü±¸¸®",
			"ºü±¼",
			"ºü¶óÁà",
			"»¡°£±¹¹°",
			"»¡¶óÁà",
			"»¡¾ÆÁà",
			"»µ¸£³ª",
			"»µ¸£³Ê",
			"»Ç·Î³ë",
			"»µ¸£³ë",
			"»Ç¸£³ª",
			"»Ç¸£³ë",
			"»Ç¸£³Ê",
			"»ç±î½Ã",
			"»çÃ¢°¡",
			"»ìÀÎ",
			"sex",
			"SEX",
			"Sex",
			"SeX",
			"seX",
			"sEX",
			"sEx",
			"sexy",
			"SEXY",
			"suicide",
			"SUICIDE",
			"Suicide",
			"¼º°ü°è",
			"¼º±â",
			"¼ºÀÎ¹°",
			"¼ºÀÎ¿ë",
			"¼ºÆøÇà",
			"¼½½º",
			"»ö½º",
			"tprtm",
			"Tprtm",
			"TPRTM",
			"½º¿ÍÇÎ",
			"½ºÅ¸Å·",
			"½ºÆØÅ·",
			"½ÃµðÅ°",
			"¾¾µðÅ°",
			"cdkey",
			"CDkey",
			"CDKEY",
			"½Ã¸®¾ó",
			"½Ã¹Ù",
			"½Ã¹ß",
			"½Ã¹ß³Ñ",
			"½Ã¹ß³â",
			"½Ã¹ß³ð",
			"½Ã¹ú",
			"½ÃºÎ¶ö",
			"½ÃºÎ·²",
			"½ÃºÎ¸®",
			"½ÃºÒ",
			"½Ãºê¶ö",
			"½ÃÆÈ",
			"½ÃÆÞ",
			"½ÃÃ¼",
			"¾¾¹Ù",
			"¾¾¹ß",
			"¾¾¹ß³Ñ",
			"¾¾¹ß³â",
			"¾¾¹ß³ð",
			"¾¾¹ú",
			"¾¾ºÎ¶ö",
			"¾¾ºÎ·²",
			"¾¾ºÎ¸®",
			"¾¾ºÒ",
			"¾¾ºê¶ö",
			"¾¾ÆÈ",
			"¾¾ÆÞ",
			"¾²¹Ù",
			"¾²¹ú",
			"½Ö³Ñ",
			"½Ö³â",
			"½Ö³ð",
			"¾Ã",
			"¾Ã¹°",
			"¾Ã»õ",
			"¾Ã»õ³¢",
			"¾Ã¼¼",
			"¾Ã¼¼ÀÌ",
			"¾Ã½¦",
			"¾Ã½¦ÀÌ",
			"¾Ã½Ø",
			"¾Ã½Ø±â",
			"¾ÃÃ¢",
			"¾ÃÅÊ",
			"¾ÃÅÊ±¸¸®",
			"¾ÃÇÒ",
			"¾ß°×",
			"¾ß±Û",
			"¾ßµ¢",
			"¾ßµ¿",
			"¿ì¶óÁú",
			"yadong",
			"diehd",
			"DIEHD",
			"¾ß»ç",
			"¾ß¼³",
			"¾ß½Ã",
			"¾ß½Ã½Ã",
			"¾ß¾Ö´Ï",
			"¾ß¿ÀÀÌ",
			"¾ßÄ·",
			"¾ßÇÃ",
			"¾ßÇÏ´Ù",
			"¾ßÇÑ",
			"¾ßÇÑ³ð",
			"¾ßÇÑ¸¸È­",
			"¾ßÇÑ»çÁø",
			"¾ßÇÑ»çÀÌÆ®",
			"¾ßÇÑµ¿¿µ»ó",
			"¾ûµ¢ÀÌ",
			"¿°º´",
			"ecstasy ",
			"Ecstasy ",
			"ECSTASY ",
			"¿À¶ö",
			"¿À¸£°¡Áò",
			"¿Í·¹Áî",
			"¿Í·¡Áî",
			"warez",
			"WAREZ",
			"wktkf",
			"WKTKF",
			"À±¶ô",
			"À½¶õ",
			"À½ºÎ",
			"ÀÌ¹ÌÅ×ÀÌ¼Ç",
			"ÀÚ»ì",
			"jasal",
			"zasal",
			"ÀÚÀ§",
			"ÀÚÁö",
			"ÀáÁö",
			"ÀúÁÖ±Û",
			"Á¤»ç",
			"Á¤¾×",
			"Á¤Ç°",
			"Á¥²ÀÁö",
			"Á¥¼ÒºÎÀÎ",
			"Á¶±î",
			"Á¿³ª",
			"Á¿³ª°Ô",
			"Á¿°°´Ù",
			"Á¿°°¾Æ",
			"Á¿ºü",
			"Á¿²Ã·Á",
			"Á¿²Ã¸®",
			"Á¹¶ó",
			"Á×´Â¹æ¹ý",
			"Á×À½",
			"Áï½Ã¹ß±Þ",
			"Áö¶ö",
			"Áö¹Ì¶ö",
			"Áö¹Ì·²",
			"Ã¢³à",
			"Ã¢³àÃÌ",
			"Ãµ»çÀÇ¸Þ¼¼Áö",
			"Ã»ºÎ",
			"Ã»ºÎ»ìÀÎ",
			"Ã»ºÎÆø·Â",
			"Ã»»ê°¡¸®",
			"Ã¼¸ð",
			"Ã¼À§",
			"Ä«µå±ø",
			"ÄÚÄ«ÀÎ",
			"ÆÇ¸Å",
			"Æ÷·Î³ë",
			"Æ÷·Î³Ê",
			"Æ÷¸£³ª",
			"Æ÷¸£³Ê",
			"Æ÷¸£³ë",
			"porno",
			"PORNO",
			"Æù¹øÈ£",
			"Æä´Ï½º",
			"ÆäÆ¼½¬",
			"ÆäÆ¼½Ã",
			"ÆæÆ¼",
			"ÆÒÆ¼",
			"ÅÍ½¬",
			"ÅÍ½Ã",
			"Çì·ÎÀÎ",
			"ÇîÅ¸ÀÌ",
			"È£¹Ù",
			"È£ºü",
			"È£¹Ù",
			"È£½ºÆ®ºü",
			"È£Å×½º¹Ù",
			"È£Å×½ººü",
			"Çà¿îÀÇÆíÁö",
			"ÈïºÐÁ¦",
			"È÷·Î»Í",
			"x¹°",
			"xÁö",
			"xÅÐ",
			"xxx",
			"°¥º¸",
			"³×Æ®¿öÅ©¸¶ÄÉÆÃ",
			"¸Ó´ÏÇåÅÍ",
			"»¶°¡",
			"¹é¸¸ÀåÀÚ",
			"ºí·ç´Ï",
			"ºòÇÃ·¹´Ö",
			"ºòÇÃ·¡´Ö",
			"bigplanet",
			"Bigplanet",
			"BIGPLANET",
			"BP",
			"¼½",
			"¿¡·Î",
			"ÀÌ¹Ý",
			"ÀÎÅÍ³Ý¿öÅ·",
			"Á¤»ç",
			"Á¹¶ó",
			"¾ÈÁõÈ¸",
			"¾È»óÈ«",
			"Àå±æÀÚ",
			"¹Ú³ë±Õ",
			"¼¼°èº¹À½¼±±³ÇùÈ¸",
			"ÇÏ³ª´ÔÀÇ ±³È¸",
			"ÇÏ³ª´ÔÀÇ±³È¸",
			"ÁõÀÎÈ¸",
			"¾È»óÈ«ÁõÀÎÈ¸",
			"º¸Áã",
			"¼öÅ¸Å·",
			"¾ß¸¸È­",
			"¿À³ª´Ï",
			"ÆÐÆ¼½¬"
			];
		var result = 0;

		for(var i=0; i<check1.length; i++)
		{
			if (text.indexOf(check1[i])>=0)
			{
				result = 1;
				break;
			}
		}

		if(result > 0)
		{
			return true;
		}
		return false;
	}