<!--
var is_major = parseInt(navigator.appVersion);
var is_minor = parseFloat(navigator.appVersion);
var agt=navigator.userAgent.toLowerCase();
var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie3    = (is_ie && (is_major < 4));
var is_ie4    = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up  = (is_ie && (is_major >= 4));
var is_ie5    = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) );
var is_ie5_5  = (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1));
var is_ie5up  = (is_ie && !is_ie3 && !is_ie4);
var is_ie5_5up =(is_ie && !is_ie3 && !is_ie4 && !is_ie5);
var is_ie6    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) );
var is_ie6sp2    = (is_ie && (is_major == 4) && (agt.indexOf("msie 6.")!=-1) && (agt.indexOf("sv1")!=-1));
var is_ie6up  = (is_ie && !is_ie3 && !is_ie4 && !is_ie5 && !is_ie5_5);
var is_ie7    = (is_ie && (is_major == 4) && (agt.indexOf("msie 7.")!=-1) );
var is_ie8    = (is_ie && (is_major == 4) && (agt.indexOf("msie 8.")!=-1) );
var httpurl = "http://www.movie4989.com";
var httpsurl = "https://www.movie4989.com";

String.prototype.trim = function()
{
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
window.onerror = fnErrorTrap;
function fnErrorTrap(sMsg, sUrl, sLine) {
	var k = sUrl;
	k = k.replace(/\?/g, '%3F');
	k = k.replace(/&/g,'%26');
	var k2 = "/errorlog.asp?errgubun=J&errurl="+k+"&errline="+sLine+"&errmsg="+sMsg+"&referrer="+document.referrer;
//alert(k2);
	if (true)				//¿¡·¯·Î±ëÀ» ÄÑ°í ²ô´Â ·çÆ¾
		hidframe.document.location.href=k2;

	return false;
}
function MM_reloadPage(init) {
	if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
		document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
	else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.href=location;
}
MM_reloadPage(true);

function MM_showHideLayers(showdiv) {
	document.all.Layer1.style.visibility = "hidden";
	document.all.Layer2.style.visibility = "hidden";
	document.all.Layer3.style.visibility = "hidden";
	document.all.Layer4.style.visibility = "hidden";
	document.all.Layer5.style.visibility = "hidden";
	document.all.Layer6.style.visibility = "hidden";
	document.all.Layer7.style.visibility = "hidden";
//	document.all.Layer8.style.visibility = "hidden";
	document.all.Layer9.style.visibility = "hidden";
	if (showdiv != 'out') {
		var obj = eval("document.all."+showdiv);
		obj.style.visibility = "visible";
	}

}
function MM_swapImgRestore() {
	var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.0
	var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
		d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
	if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
	for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
	var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
	if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//¸ð´Þ Ã¢ ¶ç¿ì±â
function openModal(src,w,h) {
	if (!(w > 100 & h > 100)) {
		w=485;h=315;
	}
	try {
		if (src.indexOf("?") > 0) {
			src += '&MODAL=Y';
		} else {
			src += '?MODAL=Y';
		}
		var win = window.showModalDialog(src, window, 'dialogHeight:'+h+'px;dialogWidth:'+w+'px;dialogTop:150px;dialogLeft:150px;status:1;help:1;resizable:1;edge:Sunken;scroll:yes;help:no;');
	} catch (e) {
		if (src.indexOf("?") > 0) {
			src += '&MODAL=N';
		} else {
			src += '?MODAL=N';
		}
		window.open(src,'modal','width='+w+',height='+h+',statusbar=1,scrollbars=1');
	}
}
function clickTab(tabName,gubun, gubun2) {

	if (tabName == 'help') {
		if (gubun =='1' || gubun =='2' || gubun =='3' || gubun =='4' || gubun =='5' || gubun =='6' || gubun =='7')  {
			document.location.href = httpurl + '/help/help.asp?gubun='+gubun+'&';
		} else {
			document.location.href = httpurl + '/help/help.asp?gubun=1&log=Y';
		}
	} else if (tabName == 'faq') {
		window.open(httpurl + '/help/help_frame.asp?num='+gubun,'memo','width=740,height=620,status=1,scrollbars=0');
	} else if (tabName == 'sitemap') {
		document.location.href = httpurl + '/login/sitemap.asp?r=n&top=home&left=home&';
	} else if (tabName == 'bd' && gubun=='HD') {				//HD
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=bd&left=bd&gubun=13&';
	} else if (tabName == 'bd' && gubun=='') {
		document.location.href = httpurl + '/sales/bd_main.asp?r=n&top=bd&left=bd&gubun=12&';
	} else if (tabName == 'bd') {
		//code:P,NK,NF,BS,U
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=bd&left=bd&gubun=12&code='+gubun+'&';
	} else if (tabName == 'hd') {
		//code:P,N,U
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=hddvd&left=hddvd&gubun=13&code='+gubun+'&';
	} else if (tabName == 'movie') {
		alert("ÁØºñ ÁßÀÔ´Ï´Ù");return;
		if (gubun=='0') {
			document.location.href = httpurl + '/sales/movie_main.asp?r=n&top=movie&left=movie&';
		} else if (gubun2 != '') {
			document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=movie&left=movie&gubun='+gubun+'&price=&page=&item=&keyword=&category=' + gubun2 + '&dt=&dttype=&sort=&log=Y&code=&humannum=&movienum=&spec=&';
		} else {
			document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=movie&left=movie&gubun='+gubun+'&price=&page=&item=&keyword=&category=&dt=&dttype=&sort=&log=Y&code=&humannum=&movienum=&spec=&';
		}
	} else if (tabName == 'movieDate') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=movie&left=movie&gubun=0&price=&page=&item=&keyword=&category=&code=&sort=&dt=' + gubun + '&dttype=add&log=Y&humannum=&movienum=&spec=&';
	} else if (tabName == 'auction' && gubun=='REG') {//°æ¸Åµî·Ï
		document.location = "../auction/auction_register.asp?top=auction&left=auction";
	} else if (tabName == 'auction' && gubun=='GUBUN') {//È¸¿ø°æ¸Å (Ä«Å×°í¸®º°)
		document.location.href = httpurl + '/auction/auction_list.asp?r=n&top=auction&left=auction&log=Y&gubun='+gubun2+'&';
	} else if (tabName == 'auction' && gubun=='TODAYE') {//È¸¿ø°æ¸Å (MODEº°)
		document.location.href = httpurl + '/auction/auction_list.asp?r=n&top=auction&left=auction&log=Y&mode=TODAYE&dt='+gubun2+'&';
	} else if (tabName == 'auction' && gubun=='MODE') {//È¸¿ø°æ¸Å (MODEº°)
		document.location.href = httpurl + '/auction/auction_list.asp?r=n&top=auction&left=auction&log=Y&mode='+gubun2+'&';
	} else if (tabName == 'auction') {//È¸¿ø°æ¸Å ¸ÞÀÎ
		document.location.href = httpurl + '/auction/auction_main.asp?r=n&top=auction&left=auction&log=Y&category=&';
	} else if (tabName == 'dvd1' && gubun == '') {//±¹³»dvd¸ÞÀÎ
		document.location.href = httpurl + '/sales/dvd1_main.asp?r=n&top=dvd1&left=dvd1&log=Y&';
	} else if (tabName == 'dvd1') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=dvd1&left=dvd1&gubun=1&code='+gubun;
	} else if (tabName == 'dvd2' && gubun == 'KR') {//±¹¿Üdvd/ÇÑ±ÛÀÚ¸·
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=dvd2&left=dvd2&log=Y&code=KR&';
	} else if (tabName == 'dvd2' && gubun == 'NEW') {//±¹¿Üdvd/»õ·Î µî·ÏµÈ Á¦Ç°
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=dvd2&left=dvd2&log=Y&code=1,2P,2N,3H&';
	} else if (tabName == 'dvd2' && gubun == '') {//±¹¿Üdvd¸ÞÀÎ
		document.location.href = httpurl + '/sales/dvd2_main.asp?r=n&top=dvd2&left=dvd2&log=Y&';
	} else if (tabName == 'dvd2') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=dvd2&left=dvd2&gubun=1&code='+gubun;
	} else if (tabName == 'dvd2Category') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=dvd2&left=dvd2&gubun=1&code=1,2P,2N,3H&category=' + gubun + '&log=Y&';
	} else if (tabName == 'dvd2Date') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=dvd2&left=dvd2&gubun=1&code=1,2P,2N,3H&dt=' + gubun + '&dttype=add&log=Y&';
	} else if (tabName == 'dvd1Category') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=dvd1&left=dvd1&gubun=1&code=3&category=' + gubun + '&log=Y&';
	} else if (tabName == 'dvd1Date') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=dvd1&left=dvd1&gubun=1&code=3&dt=' + gubun + '&dttype=add&log=Y&';
	} else if (tabName == 'bdCategory') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=bd&left=bd&gubun=12&code=&category=' + gubun + '&log=Y&';
	} else if (tabName == 'hdCategory') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=hddvd&left=hddvd&gubun=13&code=&category=' + gubun + '&log=Y&';
	} else if (tabName == 'bdDate') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=bd&left=bd&gubun=12&code=&dt=' + gubun + '&dttype=add&log=Y&';
	} else if (tabName == 'hdDate') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=hddvd&left=hddvd&gubun=13&code=&dt=' + gubun + '&dttype=add&log=Y&';
	} else if (tabName == 'music' && gubun == '') {//±¹³»dvd¸ÞÀÎ
		document.location.href = httpurl + '/sales/music_main.asp?r=n&top=music&left=music&log=Y&';
	} else if (tabName == 'music') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&top=music&left=music&gubun=99&code='+gubun+'&log=Y&';
	} else if (tabName == 'musicCategory') {
		document.location.href = httpurl + '/sales/sales_list.asp?top=music&left=music&gubun=99&price=&page=&item=&keyword=&code=&category=' + gubun + '&dt=&dttype=&sort=&log=Y&humannum=&movienum=&spec=&';
	} else if (tabName == 'comty' && gubun =='') {
		document.location.href = httpurl + '/community/comty_main.asp?r=n&top=comty&left=comty&log=Y&';
	} else if (tabName == 'comty' && gubun > 8) {
		//°øÁö»çÇ×, Q&A
		document.location.href = httpurl + '/community/comty_list.asp?r=n&top=&left=&category=' + gubun + '&log=Y&';
	} else if (tabName == 'review') {
		document.location.href = httpurl + '/community/review_list.asp?r=n&top=comty&left=comty&log=Y&item=id&keyword=&';
	} else if (tabName == 'mylist' && gubun == 'user' && gubun2 != '') {
		document.location.href = httpurl + '/mylist/mylist_list.asp?r=n&top=comty&left=comty&log=Y&item=id&keyword='+gubun2;
	} else if (tabName == 'mylist' && gubun != '') {
		document.location.href = httpurl + '/mylist/mylist_list.asp?r=n&top=comty&left=comty&log=Y&mode='+gubun;
	} else if (tabName == 'comty') {
		//±âÅ¸ Ä¿¹Â´ÏÆ¼ °Ô½ÃÆÇ
		document.location.href = httpurl + '/community/comty_list.asp?r=n&top=comty&left=comty&category=' + gubun + '&log=Y&';
	} else if (tabName == 'shop' && gubun=='') {
		document.location.href = httpurl + '/shop/shop_main.asp?r=n&top=shop&left=shop&log=Y&';
	} else if (tabName == 'shop' && gubun=='LIST') {
		document.location.href = httpurl + '/shop/shop_sales_list.asp?r=n&top=shop&left=shop&log=Y&';
	} else if (tabName == 'shop' && gubun=='HIT') {
		document.location.href = httpurl + '/shop/shop_sales_list.asp?r=n&top=shop&left=shop&log=Y&sort=HIT&';
	} else if (tabName == 'shop' && gubun=='SHIPFREE') {
		document.location.href = httpurl + '/shop/shop_sales_list.asp?r=n&top=shop&left=shop&log=Y&sort=SHIPFREE&';
	} else if (tabName == 'shop' && gubun=='PRICE') {
		document.location.href = httpurl + '/shop/shop_sales_list.asp?r=n&top=shop&left=shop&log=Y&sort=PRICE&';
	} else if (tabName == 'shop' && gubun=='USER') {
		document.location.href = httpurl + '/shop/shop_browse.asp?r=n&top=shop&left=shop&log=Y&';
	} else if (tabName == 'shop' && gubun=='MY') {
		document.location.href = httpurl + '/shop/shop.asp';
	} else if (tabName == 'shop' && gubun=='REG') {
		document.location.href = httpurl + '/shop/shop_sales_register.asp?r=n&top=shop&left=shop&';
	} else if (tabName == 'shop') {
		document.location.href = httpurl + '/shop/shop_sales_list.asp?r=n&gubun='+gubun+'&top=shop&left=shop&log=Y&';
	} else if (tabName == 'nonmember') {
		document.location.href = httpsurl + '/order/nonmember_order_view.asp';
	} else if (tabName == 'dvd1') {
		document.location.href = httpurl + '/sales/sales_list.asp?top=dvd1&left=dvd1&gubun=1&price=&page=&item=&keyword=&category=&code=' + gubun + '&sort=&dt=&dttype=&log=Y&humannum=&movienum=&spec=&';
	} else if (tabName == 'dvd2') {
		document.location.href = httpurl + '/sales/sales_list.asp?top=dvd2&left=dvd2&gubun=1&price=&page=&item=&keyword=&category=&code=' + gubun + '&sort=&dt=&dttype=&log=Y&humannum=&movienum=&spec=&';
	} else if (tabName == 'dvdNew') {
		document.location.href = httpurl + '/sales/sales_list.asp?top=dvd&left=dvd&gubun=1&price=&page=&item=&keyword=&category=&code=&sort=&dt=' + gubun + '&dttype=new&log=Y&humannum=&movienum=&spec=&';
	} else if (tabName == 'movie') {
		if (gubun=='0') {
			document.location.href = httpurl + '/sales/poster_main.asp?top=poster&left=poster&';
		} else if (gubun2 != '') {
			document.location.href = httpurl + '/sales/sales_list.asp?top=poster&left=poster&gubun='+gubun+'&price=&page=&item=&keyword=&category=' + gubun2 + '&dt=&dttype=&sort=&log=Y&code=&humannum=&movienum=&spec=&';
		} else {
			document.location.href = httpurl + '/sales/sales_list.asp?top=poster&left=poster&gubun='+gubun+'&price=&page=&item=&keyword=&category=&dt=&dttype=&sort=&log=Y&code=&humannum=&movienum=&spec=&';
		}
	} else if (tabName == 'posterDate') {
		document.location.href = httpurl + '/sales/sales_list.asp?top=poster&left=poster&gubun=0&price=&page=&item=&keyword=&category=&code=&sort=&dt=' + gubun + '&dttype=add&log=Y&humannum=&movienum=&spec=&';
	} else if (tabName == 'movie') {
		document.location.href = httpurl + '/sales/sales_list.asp?top=movie&left=movie&gubun=0'+gubun+'&price=&page=&item=&keyword=&category=&dt=&dttype=&sort=title&log=Y&code=&humannum=&movienum=&spec=&';
	} else if (tabName == 'figure') {
		document.location.href = httpurl + '/sales/sales_list.asp?top=movie&left=movie&gubun='+gubun+'&price=&page=&item=&keyword=&category=&dt=&dttype=&sort=&log=Y&code=&humannum=&movienum=&spec=&';
	}
}
function searchAll() {
	var k = document.all.keywordall.value.trim();
	if (k.length == 0) {
		alert("Å°¿öµå¸¦ ÀÔ·ÂÇØÁÖ¼¼¿ä");
		document.all.keywordall.focus();return;
	}
	var item = document.all.sgubun.options[document.all.sgubun.selectedIndex].value;
	if (item=='all') {
		document.location.href = httpurl + '/sales/sales_search.asp?r=n&top=&left=&keywordall=' + escapeDm(k) + '&sgubun=' + item + '&log=Y&';
	} else if (item=='1') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&sgubun=' + item + '&top=dvd1&left=dvd1&keyword=' + escapeDm(k) + '&code=3&';
	} else if (item=='2') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&sgubun=' + item + '&top=dvd2&left=dvd2&keyword=' + escapeDm(k) + '&code=1,2P,2N,3H&';
	} else if (item=='3') {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&sgubun=' + item + '&top=music&left=music&keyword=' + escapeDm(k) + '&gubun=99&';	//À½¾Ç
	} else if (item=='4') {
		document.location.href = httpurl + '/shop/shop_sales_list.asp?r=n&top=shop&left=shop&keyword=' + escapeDm(k) + '&';	//¹«ºñ¼¥
	} else if (item=='5') {
		document.location.href = httpurl + '/auction/auction_list.asp?r=n&sgubun=' + item + '&top=auction&left=auction&keywordgubun=TITLE&mode=ALL&keyword=' + escapeDm(k) + '&';
	} else if (item=='6') {
		document.location.href = httpurl + '/mylist/mylist_list.asp?r=n&sgubun=' + item + '&top=comty&left=comty&item=subject&keyword=' + escapeDm(k) + '&';
	}
}
function searchAllByHot(gubun,k) {
	if (gubun=='0' || gubun=='all') {
		document.location.href = httpurl + '/sales/sales_search.asp?r=n&home=&left=&keywordall=' + escapeDm(k) + '&gubun=all' + '&log=Y&';
	} else if (gubun=='ebay') {
		document.location.href = httpurl + '/auction/ebay_list.asp?r=n&home=ebay&left=ebay&mode=late&page=&item=subject&keyword=' + escapeDm(k) + '&';
	} else {
		document.location.href = httpurl + '/sales/sales_list.asp?r=n&home=&left=&keyword=' + escapeDm(k) + '&gubun=' + gubun + '&price=&page=&code=&category=&dt=&dttype=&sort=&humannum=&movienum=&spec=&';
	}
}

function enterSearch(item,func) {
	var k = item.value;
	if (event.keyCode == 13 && k.length > 0) {
		eval(func);
	}
	
}
function escapeDm(s)
{
	if (s && s.length > 0) {
		s=s.replace(/%/g,'%25');
		s=s.replace(/\"/g,'%22');
		s=s.replace(/#/g,'%23');
		s=s.replace(/&/g,'%26');
		s=s.replace(/\+/g,'%2B');
		s=s.replace(/\\/g,'%5C');
		//s=s.replace(/'/g,'%27');
		return s;
	} else {
		return "";
	}
}
function escapeDm2(s)
{
	if (s.length > 0) {
		s=s.replace(/%/g,'%25');
		s=s.replace(/#/g,'%23');
		s=s.replace(/\+/g,'%2B');
		s=s.replace(/\\/g,'%5C');
		s=s.replace(/&quot;/g,'%22');
		s=s.replace(/&qout;/g,"'");
		s=s.replace(/&amp;/g,'%26');
		s=s.replace(/&lt;/g,'<');
		s=s.replace(/&gt;/g,'>');
		return s;
	} else {
		return "";
	}
   
}

function ChangeImg(nm,gubun) {
	//alert(topmenu + '/'+nm +'/'+gubun) ;
	if ( (topmenu == 'dvd1' && nm == 'menu02')
		|| (topmenu == 'dvd2' && nm == 'menu03')
		|| (topmenu == 'music' && nm == 'menu04')
		|| (topmenu == 'bd' && nm == 'menu05')
		|| (topmenu == 'auction' && nm == 'menu06')
		|| (topmenu == 'comty' && nm == 'menu07')
		|| (topmenu == 'shop' && nm == 'menu09')
		|| ((topmenu == ''||topmenu=='home') && nm == 'menu01'))	return;
	
	var obj = eval("document.all." + nm);
	if (gubun == 'over') {
		obj.src = '/image/top/'+nm+'_over.gif';
	} else {
		obj.src = '/image/top/'+nm+'.gif';
	}
}

function openMemo() {
	window.open('../memo/memobox.asp?MODE=RCV','memo','width=680,height=540,status=1,scrollbars=1');
	//openModal('../memo/memobox.asp?MODE=RCV',680,420);
}
function sendMemoTo(id) {
	window.open('../memo/writeMemo.asp?MODE=WRITEFORM&TO='+id,'memo','width=680,height=540,status=1,scrollbars=1');
}
function openSMS(hpnum,hpmsg) {
	var src = '../member/sms_form.asp?MODE=';
	src = src + "&hpnum=" + hpnum;
	src = src + "&hpmsg=" + hpmsg;
	src += "&";
	openModal(src,664,530);
	//window.open('../member/sms_form.asp?MODE=&');
}

function xena_deny_ctrl(e){
	//ctrl + N ¸·±â
	//event.altKey   event.ctrlKey   event.shiftKey event.returnValue
	var code = event.keyCode;
	
	if( code == 17  || event.ctrlKey ){  //ctrl ±ÝÁö.    17 = ¿ÞÂÊ ctrl
	//alert('ctrl');
	event.returnValue = false;
	return false;
	}
	if( code == 18 || event.altKey ){  //18 = ¿ÞÂÊ alt
	}
}

function setText(val) {
//	document.all["KeywordBox"].style.display = "none";
//	document.location.href = httpurl + '/sales/sales_list.asp?r=n&sgubun=1&top=dvd1&left=dvd1&keyword=' + escapeDm(val) + '&code=3&';
	document.all.keywordall.value = val;
	searchAll()
}
function viewSrchBox(n) {
	var kb = document.all.KeywordBox;
	if (n==0) {
		kb.style.display = 'none';
	} else if (document.all.keywordall.length < 1) {
		kb.innerHTML = '';
		kb.style.display = 'none';
	} else if (kb.innerHTML.length > 0) {
		kb.style.display = '';
	}
}
function findItem(obj) {
	var kword = obj.value;
  	if (obj.value.length < 1) {
		document.all.KeywordBox.innerHTML = '';
		document.all.KeywordBox.style.display = 'none';
  	} else if (event.keyCode == 38) {
  	} else if (event.keyCode == 40) {
	} else {
		var kword2 = hangulToJaso2(kword);
		document.hidframe.document.location.href = "/common/inc/keyword2.asp?k="+kword+"&k2="+kword2;
	}	
}
//¹è¿­ ¾Æ´Ñ text·Î °á°ú°ª¹ÞÀ¸¹Ç·Î ±¸ºÐÀÚ ¾ø´Ù
function hangulToJaso2(text)
{

    //ÃÊ¼º(19ÀÚ) ¤¡ ¤¢ ¤¤ ¤§ ¤¨ ¤© ¤± ¤² ¤³ ¤µ ¤¶ ¤· ¤¸ ¤¹ ¤º ¤» ¤¼ ¤½ ¤¾
    var ChoSeong = new Array ( 0x3131, 0x3132, 0x3134, 0x3137, 0x3138,
                  0x3139, 0x3141, 0x3142, 0x3143, 0x3145, 0x3146, 0x3147, 0x3148,
                  0x3149, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e );

    //Áß¼º(21ÀÚ) ¤¿ ¤À ¤Á ¤Â ¤Ã ¤Ä ¤Å ¤Æ ¤Ç ¤È(9) ¤É(10) ¤Ê(11) ¤Ë ¤Ì ¤Í(14) ¤Î(15) ¤Ï(16) ¤Ð ¤Ñ ¤Ò(19) ¤Ó
    var JungSeong = new Array ( 0x314f, 0x3150, 0x3151, 0x3152, 0x3153,
                  0x3154, 0x3155, 0x3156, 0x3157, 0x3158, 0x3159, 0x315a, 0x315b,
                  0x315c, 0x315d, 0x315e, 0x315f, 0x3160, 0x3161, 0x3162, 0x3163 );

    //Á¾¼º(28ÀÚ) <¾øÀ½> ¤¡ ¤¢ ¤£(3) ¤¤ ¤¥(5) ¤¦(6) ¤§ ¤© ¤ª(9) ¤«(10) ¤¬(11) ¤­(12) ¤®(13) ¤¯(14) ¤°(15) ¤± ¤² ¤´(18) ¤µ ¤¶ ¤· ¤¸ ¤º ¤» ¤¼ ¤½ ¤¾
    var JongSeong = new Array ( 0x0000, 0x3131, 0x3132, 0x3133, 0x3134,
                  0x3135, 0x3136, 0x3137, 0x3139, 0x313a, 0x313b, 0x313c, 0x313d,
                  0x313e, 0x313f, 0x3140, 0x3141, 0x3142, 0x3144, 0x3145, 0x3146,
                  0x3147, 0x3148, 0x314a, 0x314b, 0x314c, 0x314d, 0x314e );
    var chars = new Array()
    var v = ""
    for (var i = 0; i < text.length; i++) 
    {
     chars[i] = text.charCodeAt(i);
     //// "AC00:°¡" ~ "D7A3:ÆR" ¿¡ ¼ÓÇÑ ±ÛÀÚ¸é ºÐÇØ  
     if (chars[i] >= 0xAC00 && chars[i] <= 0xD7A3) 
     {
      var i1, i2, i3;
   
      i3 = chars[i] - 0xAC00;
      i1 = i3 / (21 * 28);   
      i3 = i3 % (21 * 28);  
   
      i2 = i3 / 28;
      i3 = i3 % 28;   
   
      v = v + String.fromCharCode(ChoSeong[parseInt(i1)]);

         //º¹¸ðÀ½ ºÐ¸®
         switch(parseInt(i2))
         {
             case 9 : v = v + '¤Ç¤¿'; break;
          case 10 : v = v + '¤Ç¤À'; break; 
             case 11 : v = v + '¤Ç¤Ó'; break;
             case 14 : v = v + '¤Ì¤Ã'; break;
             case 15 : v = v + '¤Ì¤Ä'; break;
             case 16 : v = v + '¤Ì¤Ó'; break;
             case 19 : v = v + '¤Ñ¤Ó'; break;         
          
             default : v = v + String.fromCharCode(JungSeong[parseInt(i2)]);
         }   
      //v = v + String.fromCharCode(JungSeong[parseInt(i2)]);
   
   
   
      if (i3 != 0x0000) // c°¡ 0ÀÌ ¾Æ´Ï¸é, Áï ¹ÞÄ§ÀÌ ÀÖÀ¸¸é
      {      
          //º¹ÀÚÀ½ ºÐ¸®
          switch(parseInt(i3))
          {
              case 3 : v = v + '¤¡¤µ'; break;
           case 5 : v = v + '¤¤¤¸'; break; 
              case 6 : v = v + '¤¤¤¾'; break;
              case 9 : v = v + '¤©¤¡'; break;
              case 10 : v = v + '¤©¤±'; break;
              case 11 : v = v + '¤©¤²'; break;
              case 12 : v = v + '¤©¤µ'; break;
              case 13 : v = v + '¤©¤¼'; break;
              case 14 : v = v + '¤©¤½'; break;
              case 15 : v = v + '¤©¤¾'; break;
              case 18 : v = v + '¤²¤µ'; break;
           
              default : v = v + String.fromCharCode(JongSeong[parseInt(i3)]); 
          }
      }
   
     }
     else {
      v = v + String.fromCharCode(chars[i] );
     }
    }
 
    return v;
}
function setBg(n) {
	if (document.all.kw1) document.all.kw1.style.background='';
	if (document.all.kw2) document.all.kw2.style.background='';
	if (document.all.kw3) document.all.kw3.style.background='';
	if (document.all.kw4) document.all.kw4.style.background='';
	if (document.all.kw5) document.all.kw5.style.background='';
	eval("document.all.kw"+n+".style.background='CEE3FE';");
	eval("document.all.keywordall.value=document.all.kw"+n+".name;");
}
function setCookie (name, value, expiredays) {
        var todayDate = new Date();
        todayDate.setDate( todayDate.getDate() + expiredays );
        document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}
function getCookie(name) {
 var Found = false
 var start, end
 var i = 0
 
 while(i <= document.cookie.length) {
 start = i
 end = start + name.length
 
 if(document.cookie.substring(start, end) == name) {
 Found = true
 break
 }
 i++
 }
 
 if(Found == true) {
 start = end + 1
 end = document.cookie.indexOf(";", start)
 if(end < start)
 end = document.cookie.length
 return document.cookie.substring(start, end)
 }
 return ""
 }
 function nan(frm){
	aa=frm.value;
	aa=aa.replace(/,/g,'');
	aa=aa.replace(/./g,'');

	try {
		var nDotCount = 0;
		if (sNum.length > 0) {
			for (i = 0; i < sNum.length; i++) {
				if (sNum.charAt(i) == '.') {
					nDotCount ++;
				}
				if ((sNum.charAt(i) < '0' || sNum.charAt(i) > '9') && (sNum.charAt(i) != '.') || nDotCount > 1) {
					alert('¼ýÀÚ¸¸ ÀÔ·ÂÇÏ¼¼¿ä');
					frm.value='';
					frm.focus();
					return false;
				}
			}
		}
		return true;
	} catch (ex) {}

}

String.prototype.number_format=function(){
	return this.replace(/(\d)(?=(?:\d{3})+(?!\d))/g,'$1,');
}
function numberformat(frm){
	var num=frm.value;
	num=num.replace(/,/g,'');
	frm.value=num.number_format();
}
function plusCommaToValue(value){				//°ªÀ» ¹Þ¾Æ ÄÞ¸¶ Ã³¸® ÈÄ return ÇÏ´Â ÇÔ¼ö
	if (isNaN(parseInt(value)))	return value;
	var strplus = (parseInt(value) < 0) ? "-" : "";
	var price="";
	value = "" + Math.abs(parseInt(value.replace(/[\,]{1}/g,'')));
	//alert(iplus + '\n'+val2+'\n'+value+'\n'+parseInt(10000)+'\n'+parseInt(10000)*iplus);
	while (value.length > 3){
		regexp=/[\d]{3}$/g; //³¡¿¡ 3ÀÚ¸®°¡ ¼ýÀÚ·Î ÀÌ·ç¾îÁü
		num = value.match(regexp); //ÀÏÄ¡ÇÏ´Â ¹®ÀÚ ¹Þ±â
		val_replace = value.replace(num,""); //ÀÏÄ¡ÇÏ´Â ¹®ÀÚ »èÁ¦
		value = val_replace;
		price = ','+num+price;
	}
	return (strplus + value + price);
}
function plusCommaToObject(obj) {				//object¸¦ Á÷Á¢ ¹Þ¾Æ return, ÁÖ·Î onkeyup=~(this) ÀÌº¥Æ®¿¡ ¾²ÀÎ´Ù
	obj.value=plusCommaToValue(obj.value);
}
//-->

