// start pcid
// Content 	: GSeShop, GSeStore µµ¸ÞÀÎÀ» È®ÀÎÇÏ¿© À¯È¿ÇÑ ¿µ±¸ÄíÅ°¸¦ ¹ß±Þ
// Date 	: 2005.12.07

function Nethru_getCookieVal(offset)
{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
		endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
}

function Nethru_SetCookie(name, value)
{
  	var argv = Nethru_SetCookie.arguments;
   	var argc = Nethru_SetCookie.arguments.length;
   	var expires = (2 < argc) ? argv[2] : null;
   	var path = (3 < argc) ? argv[3] : null;
   	var domain = (4 < argc) ? argv[4] : null;
   	var secure = (5 < argc) ? argv[5] : false;

  	document.cookie = name + "=" + escape (value)
  	                                + ((expires == null) ? "" : ("; expires="+expires.toGMTString()))
  	                                + ((path == null) ? "" : ("; path=" + path))
  	                                + ((domain == null) ? "" : ("; domain=" + domain))
  	                                + ((secure == true) ? "; secure" : "");
}

function Nethru_GetCookie(name)
{
   	var arg = name + "=";
   	var alen = arg.length;
   	var clen = document.cookie.length;
   	var i = 0;

   	while (i < clen) {
      		var j = i + alen;
      		if (document.cookie.substring(i, j) == arg)
         			return Nethru_getCookieVal (j);

      		i = document.cookie.indexOf(" ", i) + 1;
      		if (i == 0)
         			break;
      	}

  	return null;
}

function Nethru_makePersistentCookie(name,length,path,domain)
{
    	var today = new Date();
    	var expiredDate = new Date(2020,1,1);
    	var cookie;
	var value;

    	cookie = Nethru_GetCookie(name);
    	if ( cookie ) {		//ÀÌ¹Ì Á¸ÀçÇÏ´ÂÁö È®ÀÎ
        		return 1;
	}

	var values = new Array();
	for ( i=0; i < length ; i++ ) {
		values[i] = "" + Math.random();
	}

	value = today.getTime();

	// use first decimal
	for ( i=0; i < length ; i++ ) {
		value += values[i].charAt(2);
	}

    	Nethru_SetCookie(name,value,expiredDate,path,domain);
}

function Nethru_getDomain() {
	var _host   = document.domain;
	var so = _host.split('.');
	var dm  = so[so.length-2] + '.' + so[so.length-1];

	return (so[so.length-1].length == 2) ? so[so.length-3] + '.' + dm : dm;
}

var Nethru_domain  = Nethru_getDomain();

Nethru_makePersistentCookie("pcid",10,"/",Nethru_domain);

// end pcid

function s_over(obj,num) {
	obj.src = 'http://image.gsshop.com/common_2004/btn_search' + num + '_on.gif';
}
function s_out(obj,num) {
	obj.src = 'http://image.gsshop.com/common_2004/btn_search' + num + '_off.gif';
}

function over(bar) {
	bar.style.background = 'EEFAFF';
}
function out(bar) {
	bar.style.background = 'FFFFFF';
}

/* image rollover Ã³¸® #1 */
function overImg(obj) {
    obj.src = obj.src.replace('off.gif','on.gif');
}
function outImg(obj) {
    obj.src = obj.src.replace('on.gif','off.gif');
}

/* image rollover Ã³¸® #2 */
function overImgN(obj) {
    obj.src = obj.src.replace('off.jpg','on.jpg');
}
function outImgN(obj) {
    obj.src = obj.src.replace('on.jpg','off.jpg');
}

/* image rollover Ã³¸® #3 */
function overImgPath(obj, imgPath) {
    obj.src = imgPath;
}
function outImgPath(obj, imgPath) {
    obj.src = imgPath;
}

/* image rollover Ã³¸® #4 */
function rollover(obj,sts1, sts2) {
  obj.src = obj.src.replace(sts1, sts2);
}

function over0(obj,url,num) {
	obj.src = 'http://image.gsshop.com/' + url + num + '_on.gif';
}
function out0(obj,url,num) {
	obj.src = 'http://image.gsshop.com/'+ url + num + '_off.gif';
}
function over1(bar) {
	bar.style.background = 'FFF6F9';
}

function over02(obj,num) {
	obj.src = 'http://image.gsshop.com/myGSeshop/tab_menu' + num + '_on.gif';
}
function out02(obj,num) {
	obj.src = 'http://image.gsshop.com/myGSeshop/tab_menu' + num + '_off.gif';
}

function over2(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/tab_menu' + num + '_on.gif';
}
function out2(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/tab_menu' + num + '_off.gif';
}
function overgs2(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/GS/tab_menu' + num + '_on.gif';
}
function outgs2(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/GS/tab_menu' + num + '_off.gif';
}
function over03(obj,num) {
	obj.src = 'http://image.gsshop.com/top_2005/PriceOk/s_menu' + num + '_on.gif';
}
function out03(obj,num) {
	obj.src = 'http://image.gsshop.com/top_2005/PriceOk/s_menu' + num + '_off.gif';
}
function over3(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/s_menu' + num + '_on.gif';
}
function out3(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/s_menu' + num + '_off.gif';
}
function overgs3(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/GS/s_menu' + num + '_on.gif';
}
function outgs3(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/GS/s_menu' + num + '_off.gif';
}
function over4(obj) {
	obj.background = 'http://image.gsshop.com/myLGeshop_new/tab_menu01_on.gif';
}
function out4(obj) {
	obj.background = 'http://image.gsshop.com/myLGeshop_new/tab_menu01_off.gif';
}
function over05(obj,num) {
	obj.src = 'http://image.gsshop.com/top_2005/weeklyPrice/tab_s' + num + '_on.gif';
}
function out05(obj,num) {
	obj.src = 'http://image.gsshop.com/top_2005/weeklyPrice/tab_s' + num + '_off.gif';
}
function over5(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/tab_s' + num + '_on.gif';
}
function out5(obj,num) {
	obj.src = 'http://image.gsshop.com/myLGeshop_new/tab_s' + num + '_off.gif';
}
function over6(obj,num) {
	obj.src = 'http://image.gsshop.com/top_2004/top_cate' + num + '_on.gif';
}
function out6(obj,num) {
	obj.src = 'http://image.gsshop.com/top_2004/top_cate' + num + '_off.gif';
}

function over7(object,num) {
	object.src = 'http://image.gsshop.com/top_2005/search/tab_menu' + num + '_on.gif';
}
function out7(object,num) {
	object.src = 'http://image.gsshop.com/top_2005/search/tab_menu' + num + '_off.gif';
}

function over8(object,num) {
	object.src = 'http://image.gsshop.com/top_2005/search_2005/s_menu' + num + '_on.gif';
}
function out8(object,num) {
	object.src = 'http://image.gsshop.com/top_2005/search_2005/s_menu' + num + '_off.gif';
}

function over2_1(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_2004/tab_menu' + num + '_on.gif';
}
function out2_1(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_2004/tab_menu' + num + '_off.gif';
}

function over2_gs(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_gs/tab_menu' + num + '_on.gif';
}
function out2_gs(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_gs/tab_menu' + num + '_off.gif';
}

function over3_1(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_2005/tab0117_menuon_' + num + '.gif';
}

function out3_1(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_2005/tab0117_menuoff_' + num + '.gif';
}

function over3_2(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_200503/tab_all_on_' + num + '.gif';
}

function out3_2(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_200503/tab_all_off_' + num + '.gif';
}

function over3_gs(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_gs/tab_all_on_' + num + '.gif';
}

function out3_gs(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_gs/tab_all_off_' + num + '.gif';
}
function over3_2_1(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_200503/tab_eshop_on_' + num + '.gif';
}

function out3_2_1(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_200503/tab_eshop_off_' + num + '.gif';
}

function over3_2_2(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_200503/tab_estore1_on_' + num + '.gif';
}

function out3_2_2(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_200503/tab_estore1_off_' + num + '.gif';
}

function over3_2_3(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_200503/tab_estore_on_' + num + '.gif';
}

function out3_2_3(obj,num) {
	obj.src = 'http://image.gsshop.com/customer_200503/tab_estore_off_' + num + '.gif';
}

function over4_1(obj) {
	obj.background = 'http://image.gsshop.com/tvhome_2004/tab_menu01_on.gif';
}
function out4_1(obj) {
	obj.background = 'http://image.gsshop.com/tvhome_2004/tab_menu01_off.gif';
}

function over5_1(obj, num) {
	obj.src = 'http://image.gsshop.com/tvhome_2004/tab_s' + num + '_on.gif';
}
function out5_1(obj, num) {
	obj.src = 'http://image.gsshop.com/tvhome_2004/tab_s' + num + '.gif';
}


function tab_view(num) {
	for(i = 1; i <= 6; i++) {
		var tab = eval('tab' + i);

		if(num == i) tab.style.display = 'block';
		else tab.style.display = 'none';
	}
}


//·Î±×ÀÎ Ã¢
function openLogin(){
 	var newWin = window.open('/jsp/jseig_LogIn.jsp','LGeShopLogIn','Width=400,Height=300,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
	newWin.focus();
}


// 2005-05-09 19:39 by dong
//·Î±×ÀÎ Ã¢ (Áö½ÄÇÁ·£Áî¿ë)
function openLogin1(){
 	var newWin = window.open('http://www.gsshop.com/jsp/jseig_LogIn.jsp','LGeShopLogIn','Width=400,Height=300,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0');
	newWin.focus();
}

// ÄíÅ° ¾²±â
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 arg = name + "=";
    var alen = arg.length;
    var clen = document.cookie.length;
    var i = 0;

    while(i < clen){
        var j = i + alen;
        if(document.cookie.substring(i, j) == arg)
        return getCookieVal(j);
        i = document.cookie.indexOf(" ", i) + 1;
        if(i == 0) break;
    }
    return null;
}

// ÄíÅ° ÀÐ±â
function GetCookie(name){
  return getCookie(name);
}

// ÄíÅ° ÀÐ±â
function getCookieVal(offset){
    var endstr = document.cookie.indexOf(";", offset);
    if(endstr == -1)
        endstr = document.cookie.length;
    return unescape(document.cookie.substring(offset, endstr));
}

// ÄíÅ° ÀÐ±â2 - 2Áß ÄíÅ°¿¡¼­ »ç¿ë
function GetCookie2(key1, key2) {
  var tmp = GetCookie(key1);
  if(tmp == null)
    return null;

  tmp = tmp.split("~");
  for(var i = 0; i<tmp.length; i++) {
    var tmp2 = tmp[i].split("=");
    if(tmp2.length == 2 && tmp2[0] == key2) {
      return tmp2[1];
    }
  }
  return null;
}

// °áÀçÂÊ¿¡¼­ ¾²ÀÌ´Â°Å...
isPopup = 0;

function noChild(){
   if (isPopup==0) return;
   newWin.close();
   isPopup = 0;
}

// »þÇÇ
function openShoppy(){
	window.open("/shoppy/shoppy.jsp","LGeShopShoppy","width=400,height=300,left=10,top=10,resizable=0");
	return;
}

// ÀÌº¥Æ® ½ÃÀÛ : ·Î±×ÀÎ Ã¼Å©
function open3D() {
	window.open("http://image.gsshop.com/flash/3deshop/mainPage.html","GS", 'toolbar=no,location=no,directories=no,menubar=no,scrollbar=no,resizable=no,width=910,height=720' );
	return;
}


// ¸ÖÆ¼¸Þ¼¼Áö
function mmsgClose(){
	try {
		document.all.mmsg.style.display = "none";
	} catch(e) {
		document.getElementById('mmsg1').style.display='none';
	}
}

/* 2005-05-09 19:39 by dong
// ÀÌ¼ó°¡ÀÌµå
function openGuide(){
	window.open('/eshopGuide/jseig_eshopGuide.jsp','guide','width=700,height=491,top=10');
	return;
}
*/

/* 2005-05-09 19:39 by dong
// ÀÌ¼ó°¡ÀÌµå (Áö½ÄÇÁ·£Áî¿ë)
function openGuide_know(){
	window.open('http://www.gsshop.com/eshopGuide/jseig_eshopGuide.jsp','guide','width=700,height=491,top=10');
	return;
}
*/

// ÄíÆù
function getCoupon() {

	var args = getCoupon.arguments;

  var req = new ActiveXObject("Microsoft.XMLHTTP");
  req.open("GET", "/ecrm/coupon/status.jsp?q="+document.location.href+"_coupon:"+args[0], true);
  req.send();

	window.open('/ecrm/coupon/download.jsp?coupon_num=' + args[0],'','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,WIDTH=400,HEIGHT=300');

  return;
}

// ÄíÆù
function getCouponEnc() {

	var args = getCouponEnc.arguments;

  var req = new ActiveXObject("Microsoft.XMLHTTP");
  req.open("GET", "/ecrm/coupon/status.jsp?q="+document.location.href+"_couponEnc:"+args[0], true);
  req.send();

	window.open('/ecrm/coupon/downloadCoupon.jsp?coupon_num=' + args[0],'','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,WIDTH=400,HEIGHT=300');

  return;
}

function getCouponDirect(coupon_num){
  var objifr = document.getElementById("ifrExecute");  //inc_footer.jsp ÀÇ ifrExecute ½ÇÇà
  objifr.src = "/ecrm/coupon/publish_gsbox_alert.jsp?coupon_num=" + coupon_num;
}

// ÂªÀº¸ÞÀÏ º¸³»±â
function writeMail(email, name) {
  window.open("/email/writeMail.jsp?rec_email=" + email + "&receiver=" + name, 'writeMail', 'width=400,height=300,topmargin=0,leftmargin=0,left=0,top=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
  return;
}

// new window
function getNewWin() {

	var args = getNewWin.arguments;
	window.open(''+args[0],'','toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,resizable=yes,WIDTH=400,HEIGHT=300');
  return;
}


// ´Ù¸¥ ´ëºÐ·ùº¸±â
function showSectL() {
	if(document.all.sectMS) {
		document.all.sectMS.style.display = "none";
	}
	document.all.sectL.style.display = "";
}
function hideSectL() {
	document.all.sectL.style.display = "none";
	if(document.all.sectMS) {
		document.all.sectMS.style.display = "";
	}
}


function showSectAll(sectl) {
	window.open('/jsp/jseip_SectAll.jsp?sectl=' + sectl,'pop_sect','width=796,height=600, topmargin=0, leftmargin=0, left=0, top=0, toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes');
	return;
}


// HI¿ë ´Ù¸¥ ´ëºÐ·ùº¸±â
function show(type, num, search, sEvent) {

	if(type == 0) {

		l_btn.src = 'http://image.gsshop.com/top_2005/l_bar/l_btn_' + num + '_2.gif';
		sectL.style.display = 'block';

		if (search) {
			searchSel.style.display = 'none';
		}
		if (sEvent) {
			eStrmain2.style.display = 'none';
		}

	} else {

		l_btn.src = 'http://image.gsshop.com/top_2005/l_bar/l_btn_' + num + '_1.gif';
		sectL.style.display = 'none';

		if (search) {
			searchSel.style.display = 'block';
		}
		if (sEvent) {
			eStrmain2.style.display = 'block';
		}

	}

}

function showGS(type, num, search, sEvent) {
    var searchObj = document.getElementById("searchSel");
    var l_btnObj = document.getElementById("l_btn");
    var sectLObj = document.getElementById("sectL");

	if(type == 0) {

		l_btnObj.src = 'http://image.gsshop.com/top_2005/l_bar/gs/l_btn_' + num + '_2.gif';
		sectLObj.style.display = 'block';

		if (search && searchObj) {
			searchSel.style.display = 'none';
		}
		if (sEvent) {
			eStrmain2.style.display = 'none';
		}

	} else {

		l_btnObj.src = 'http://image.gsshop.com/top_2005/l_bar/gs/l_btn_' + num + '_1.gif';
		sectLObj.style.display = 'none';

		if (search && searchObj) {
			searchSel.style.display = 'block';
		}
		if (sEvent) {
			eStrmain2.style.display = 'block';
		}

	}

}


// HI¿ë ´ëºÐ·ù¿¡¼­ ÁßºÐ·ù ¸Þ´º over½Ã
function goOver(obj, num) {
	obj.style.textDecoration = 'underline';
	obj.style.backgroundImage='url(http://image.gsshop.com/sect_2005/sect_01/s_title_' + num + '_on.gif)';
}
function goOut(obj, num) {
	obj.style.textDecoration = 'none';
	obj.style.backgroundImage='url(http://image.gsshop.com/sect_2005/sect_01/s_title_' + num + '_off.gif)';
}

function goOverGS(obj, imgName) {
	obj.style.textDecoration = 'underline';
	obj.style.backgroundImage='url(http://image.gsshop.com/sect_2005/sect_04/' + imgName + '_on.gif)';
}
function goOutGS(obj, imgName) {
	obj.style.textDecoration = 'none';
	obj.style.backgroundImage='url(http://image.gsshop.com/sect_2005/sect_04/' + imgName + '_off.gif)';
}

// HI¿ë ´ëºÐ·ù¿¡¼­ ÁßºÐ·ù ¸Þ´º ÀÌµ¿½Ã
function movePage(url) {
	location = url;
}



// ´Ü°ñ¸ÅÀå ¿¬°áÇÏ±â
function goCusSect(sect_depth, sectid){
	if (sect_depth == '0') {
		top.location.href = '/mall.retrieveGoStore.cbm?link_cd=40&sell_ecuserid=' + sectid;
	} else if (sect_depth == '1') {
		top.location.href = "/jsp/jseip_SectL.jsp?ecsid=" + sectid;
  } else if (sect_depth == '2') {
  	top.location.href = "/jsp/jseip_SectM.jsp?ecsid=" + sectid;
  } else if (sect_depth == '3') {
  	top.location.href = "/jsp/jseip_SectS.jsp?ecsid=" + sectid;
  }
}
// ´Ü°ñ¸ÅÀå µî·ÏÇÏ±â
function goCusSectInsert(cusSectid){
	window.open('/jsp/inc_cusSectUpdate.jsp?cusFlag=I&cusSectid='+cusSectid,'pop_cus','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=0,left=0,width=408,height=328');
	return;
}

// ´Ü°ñ¸ÅÀå »èÁ¦ÇÏ±â
function getCusRadio(x) {
  for(var i = 0; i < x.length; i++)
    if (x[i].checked==true) return x[i].value;
  return "";
}
function goCusSectDelete(){
	var cusSectid = "";

	if (GetCookie("cusSect") != null && GetCookie("cusSect") != "" ){

		var cusSect = GetCookie("cusSect");
		var strArray = cusSect.split("~");

		if (strArray.length == 2) {
			cusSectid = document.sectlist.list.value;
		} else {
			cusSectid = getCusRadio(document.sectlist.list);
		}

		if(cusSectid == null || cusSectid == ""){
			alert("»èÁ¦ÇÒ ¸ÅÀåÀ» ¼±ÅÃÇÏ¼¼¿ä!");
			return;
		} else {
			if(confirm("»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) {
				window.open('/jsp/inc_cusSectUpdate.jsp?cusFlag=D&cusSectid=' + cusSectid,'pop_cus','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=0,left=0,width=408,height=328');
				return;
			}
		}
	}
}
// ´Ü°ñ¸ÅÀå »èÁ¦ÇÏ±â - ³ª¸¸ÀÇ ¿¤ÁöÀÌ¼ó
function goCusSectDeleteView(cusSectid){
	if(confirm("»èÁ¦ÇÏ½Ã°Ú½À´Ï±î?")) {
		window.open('/jsp/inc_cusSectUpdate.jsp?cusFlag=D&cusSectid=' + cusSectid,'pop_cus','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=0,left=0,width=408,height=328');
		return;
	}
}
// ´Ü°ñ¸ÅÀå ¼öÁ¤ÇÏ±â - ³ª¸¸ÀÇ ¿¤ÁöÀÌ¼ó
function Txt_Check(temp) {
  var strValue = temp;
  var retCode = 0;
  var count_char = 0;

  for (i=0; i<strValue.length; i++) {
    var retCode = strValue.charCodeAt(i);
    var retChar = strValue.substr(i,1).toUpperCase();
    retCode = parseInt(retCode);

    if ((retChar < "0" || retChar > "9") && (retChar < "A" || retChar > "Z") && ((retCode > 255) || (retCode < 0))) {
      count_char = count_char + 2;
    } else {
      count_char = count_char + 1;
    }
  }

  return (count_char);
}
function goCusSectUpdate(cusMemo, cusSectid){

	//¸Þ¸ð¸¦ ÀÔ·ÂÇÏÁö ¾Ê¾ÒÀ» °æ¿ì.
	if(Txt_Check(cusMemo) < 1){
	 alert("¸Þ¸ð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
	 return;
	}

	//200ÀÚ¸¦ ³ÑÀ¸¸é ¾ÈµÈ´Ù.
	if(Txt_Check(cusMemo) > 200){
		alert("ÃÖ´ë 200ÀÚ±îÁö ÀÔ·ÂÇÒ¼ö ÀÖ½À´Ï´Ù.");
		return;
	}
	window.open('/jsp/inc_cusSectUpdate.jsp?cusFlag=U&cusSectid='+cusSectid+'&cusMemo='+cusMemo,'pop_cus','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=0,left=0,width=408,height=328');
	return;
}

// °ü½É±âÈ¹Àü µî·ÏÇÏ±â
function goCusPlanInsert(cusPlanid){
	window.open('/jsp/inc_cusPlanUpdate.jsp?cusFlag=I&cusSectid='+cusPlanid,'pop_cus','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=0,left=0,width=408,height=328');
	return;
}

// »ó¼¼°Ë»ö
function detailSearch() {
  window.open("/jsp/detailSearch.jsp", "detailSearch" , "toolbar=no , directories=no, status=no resizable=no, width=457, height=350 scrollbars=no");
}

// °Ë»öÃ¢ ¿£ÅÍ ÀÔ·Â Ã³¸®
function onSearchKeyPress () {
  var keycode;
  if (window.event) keycode = window.event.keyCode;
  else if (e) keycode = e.which;
 	else return true;
  if (keycode == 13) {
    sechfrmsubmit();
    return false;
  }
}

// °Ë»öÇÏ±â
function goSearch() {

	var args = goSearch.arguments;

	//var wf = document.sechfrm.wf.value;
	var so = document.sechfrm.so.value;
	var user = GetCookie("UVID");
	var tq = args[0];	// °Ë»ö¾î
	var catid = "";
	var strSearch = "";
	var strGubun = "";

	if(args.length > 1) {
		 catid = args[1]; // Ä«Å×°í¸®
	}

	if(document.all.left_cg != undefined && document.all.left_cg != null) {

		strGubun = document.all.left_cg.value;

		if (strGubun == "estore") {

			strSearch = "/jsp/jseip_SearchList_estore.jsp?tq=" + tq + "&catid=" + catid;

		} else if (strGubun == "cate") {

			strSearch = "/jsp/jseip_SearchList.jsp?tq=" + tq + "&catid=" + catid;

		} else {

			strSearch = "/jsp/jseip_SearchTotal.jsp?tq=" + tq;

		}

	} else {

		strSearch = "/jsp/jseip_SearchList.jsp?tq=" + tq + "&catid=" + catid;

	}

	if(args.length == 3) {

		if(args[2] == "_self") {

			document.location.href = strSearch;

		} else if(args[2] == "_parent") {

			_parent.document.location.href = strSearch;

		} else if(args[2] == "_top") {

			_top.document.location.href = strSearch;

		// _blank, ±âÅ¸ µîµî
		} else {

			window.open(strSearch, args[1], "");

		}

	} else {

		document.location.href = strSearch;

	}

	return;

}

// ¸ÅÀå³» °Ë»öÇÏ±â
function goLeftSearch(catid) {

	if(document.all.left_tq.value == "") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		document.all.left_tq.focus();
		return;
	}
	if(document.all.left_tq.value == "ÀÔ·ÂÇÏ¼¼¿ä~!!") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		document.all.left_tq.value = "";
		document.all.left_tq.focus();
		return;
	}

	goSearch(document.all.left_tq.value, catid);

	return;

}

// ¸ÅÀå³» °Ë»öÃ¢ ¿£ÅÍ ÀÔ·Â Ã³¸®
function onLeftKeyPress (catid) {
  var keycode;
  if (window.event) keycode = window.event.keyCode;
  else if (e) keycode = e.which;
 	else return true;
  if (keycode == 13) {
    goLeftSearch(catid);
    return false;
  }
}

// Top10 °Ë»öÇÏ±â
function goTop10(catid) {

	if(document.all.top10_tq.value == "") {
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä!");
		document.all.top10_tq.focus();
		return;
	}

	goSearch(document.all.top10_tq.value, catid);

	return;

}

// Top10 °Ë»öÃ¢ ¿£ÅÍ ÀÔ·Â Ã³¸®
function onTop10KeyPress (catid) {
  var keycode;
  if (window.event) keycode = window.event.keyCode;
  else if (e) keycode = e.which;
 	else return true;
  if (keycode == 13) {
    goTop10(catid);
    return false;
  }
}

// ÀÌº¯¼ö´Â °è¼Ó ¾´´Ù.
// 0 ; ·Î±×ÀÎ »óÅÂ
// 1 ; ·Î±×¾Æ¿ô »óÅÂ
var loginStatus = 1;

if(GetCookie("login") != null && GetCookie("login") == "true") {

  loginStatus = 0;

}

// footer ¸µÅ©
function prGo() {
	var args = prGo.arguments;

	var idx = eval(args[0]);
	var wtarget = "_LGHS";

	if(args.length > 1) {
		wtarget = args[1];
	}

  var footer_urls = new Array();

  footer_urls[0] = "http://company.gsshop.com?gsid=ECmain-850-0-1";
  footer_urls[1] = "http://company.gsshop.com/company/company_index.jsp?gsid=ECmain-850-0-2";
  footer_urls[2] = "http://company.gsshop.com/homeshopping/homeshopping_index.jsp?gsid=ECmain-850-0-3";
  footer_urls[3] = "http://company.gsshop.com/invest/invest_index.jsp?gsid=ECmain-850-0-4";
  footer_urls[4] = "http://company.gsshop.com/recruit/recruit_index.jsp?gsid=ECmain-850-0-5";
  footer_urls[5] = "http://company.gsshop.com/join/join_index.jsp?gsid=ECmain-850-0-6";
  footer_urls[6] = "/jsp/jseig_guide.jsp?gsid=ECmain-850-0-7";
  footer_urls[7] = "/jsp/jseig_guide_protect.jsp?gsid=ECmain-850-0-8";
   footer_urls[8] = "http://www.gsshop.com/info/valueClub.jsp";

  if(idx > footer_urls.length -1)
    return;


  var url = "";
  if(idx > footer_urls.length -3) {
    url = footer_urls[idx];
    if(args.length > 1) {
    	window.open(url, wtarget, "");
  	} else {
    	document.location.href = url;
    }
  } else {
    url = "http://company.gsshop.com/sess_check.jsp?nextUrl=" + escape(footer_urls[idx]) + "&sessId=" + escape(nvl(GetCookie2("ecid", "eclname"), "")) + "&sessName=" + nvl(GetCookie("username"), "");
    window.open(url, wtarget, "");
  }

}

// utility
function nvl(chk, repl) {
  if(chk == null) {
    return repl;
  } else {
    return chk;
  }
}


// »óÇ°ºñ±³
function checkContent() {
	var args = checkContent.arguments;
	var frmname;
	if(args.length == 0) {
		frmname = "Qform";
	} else {
		frmname = args[0];
	}

	var obj = eval("document." + frmname);
	var n = obj.ecpid.length;
	var cnt = 0;

	for (var i = 0; i < n; i++) {
		if (obj.ecpid[i].checked) {
			cnt ++;
		}
	}

	if (cnt > 3) {
		alert ("»óÇ°³»¿ë ºñ±³´Â ÃÖ´ë 3°³ ¸ðµ¨±îÁö ºñ±³ÇÒ ¼ö ÀÖ½À´Ï´Ù.");
		return;
	}

	if ( cnt < 2 ) {
		alert ("»óÇ°³»¿ë ºñ±³´Â ÃÖ¼Ò 2°³ÀÌ»ó ÃÖ´ë 3°³ ¸ðµ¨±îÁö ¼±ÅÃÇÏ¼Å¾ß ÇÕ´Ï´Ù." );
		return;
	}

	obj.action = "/jsp/jseip_Compare.jsp";
	obj.target = "compare";

	window.open("", "compare", "width=900,height=650,menubar=no,toolbar=no,location=no,scrollbars=yes,resizable=yes");

	obj.submit();
	return;
}

// ÁßºÐ·ù tab
function tab_sectM(num) {
  var obj;
  for(var i = 0; i < 3; i++) {
	  obj = eval("document.all.tab_corner" + i);
	  obj.style.display = "none";
  }
  obj = eval("document.all.tab_corner" + num);
  obj.style.display = "";
}

// Å©°Ôº¸±â
function openLarge(ecpid){
	openLarge(ecpid, 'Y');
  return;
}
function openLarge(ecpid, goPrd) {
  var URL = "/jsp/jseip_LargePic.jsp?ecpid=" + ecpid + "&goPrd=" + goPrd;
  window.open(URL, 'picture', 'width=780,height=660,menubar=no,toolbar=no,location=no,scrollbars=auto');
  return;
}

function openLarge(ecpid, goPrd, mode) {
  var URL = "/jsp/jseip_LargePic.jsp?ecpid=" + ecpid + "&goPrd=" + goPrd + "&mode=" + mode;
  window.open(URL, 'picture', 'width=780,height=660,menubar=no,toolbar=no,location=no,scrollbars=auto');
  return;
}

// µ¿¿µ»óº¸±â
function openVOD_256(ecpid) {
   openVOD(ecpid, "256");
}
function openVOD_512(ecpid) {
  openVOD(ecpid, "512");
}
function openVOD(ecpid, qt) {
  var URL = "/jsp/flashPlayer.jsp?ecpid=" + ecpid + "&vodType=" + qt;
  window.open(URL, 'VODWindow', 'width=331,height=335,scrollbars=no');
  return;
}

//¹Ì¸®°è»êÇÏ±â
function preCalc(ecpid){
  window.open('/jsp/jseio_prePlaceOrder.jsp?ecpid=' + ecpid, '¹Ì¸®°è»ê','width=400,height=300,status=no menubar=no,scrollbars=0');
}

function preCalc1(ecpid){
	var vSize = document.goCart.vdorSize.value;
	var tmpVal = new Array();
	var chkValue = new Array();
	var tmp1 = 0;

	for (var i = 0; i < parseInt(vSize); i++){
		var tt = eval("document.prditm.Vdor_"+i);
		tmpVal[i] = tt.value.split("|");
		if(tt.value != "") chkValue[i] = "Y" ;
	}

	for (var i = 0; i < parseInt(vSize); i++){
		if(chkValue[i] != null){
			tmp1 += parseInt(tmpVal[i][2]);
		}
	}

	//±¸¼ºÇ° ÀÖÀ»½Ã °ª Àü¼Û
	if(tmp1 > 0){
		window.open('/jsp/jseio_prePlaceOrder.jsp?ecpid=' + ecpid + '&vdorPrc=' + tmp1, '¹Ì¸®°è»ê','width=400,height=300,status=no menubar=no,scrollbars=0');
	} else {
		window.open('/jsp/jseio_prePlaceOrder.jsp?ecpid=' + ecpid, '¹Ì¸®°è»ê','width=400,height=300,status=no menubar=no,scrollbars=0');
	}
}
// modified by stmhsj 2003.11.30
function openGift() {
  newWin = window.open("/jsp/jseip_guideForGiftWrapping.jsp","frameWindow","toolbar=no,width=520,top=100,left=150,directories=no, status=yes menubar=no,scrollbars=yes, resizable=yes");
  if (!newWin.opener) newWin.opener=self;
  if (!newWin.focus) newWin.focus();
}

//-------------------------------------------------
// ¿ë    µµ : WishList º¸°üÇÔ ¸®½ºÆ® ÆË¾÷À» ¶ç¿î´Ù.
// ÆÄ¶ó¹ÌÅÍ : ¾øÀ½
// ¸®    ÅÏ : ¾øÀ½
//-------------------------------------------------
function addWishList(paramPrdid) {

	var itemid;

	if(document.prditm == null) {

		itemid = "0";

	} else {

		try {

		  if(document.prditm.TotalItem != null) {
		    var index = document.prditm.TotalItem.selectedIndex-1;
		    if((index < 0) && (document.prditm.TotalItem.value == "")) {
		      alert("Á¾·ù¸¦ ¼±ÅÃÇØ ÁÖ¼¼¿ä!");
		      document.prditm.TotalItem.focus();
		      return;
		    }
		  }

		  itemid = document.prditm.prditmid.value;

		} catch(e) {

			itemid = "0";

		}
}


  var url = "/jsp/jseig_selectMyWishList.jsp?action=6&wishgubun=1&prdid=" + paramPrdid + "&itemid=" + itemid;

  var winWish = window.open(url, "addWish", "width=400,height=295,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0");
  winWish.opener = self;
  winWish.focus();
  return;
}


// µÚ·Î º¸³»±â.. ¾øÀ¸¸é ¸ÞÀÎÀ¸·Î
function goback() {
	if(history.length > 0) {
		history.go(-1);
	} else {
		location.href="/jsp/main.jsp";
	}
}

 //´ÜÇ° »óÇ°Æò

var old_menu_know = new Array('','');

function know_menuclick(num, menu_depth) {
	var submenu = document.getElementById(num);

	if(old_menu_know[menu_depth] != submenu) {
		if(old_menu_know[menu_depth] != '') old_menu_know[menu_depth].style.display = 'none';
		submenu.style.display = 'block';
		old_menu_know[menu_depth] = submenu;
	} else {
		submenu.style.display = 'none';
		old_menu_know[menu_depth] = '';
	}
}

var old_menu = '';
var old_cell = '';

function menuclick(num) {
	var submenu = eval('prdPar_' + num);

	if(old_menu != submenu) {
		if(old_menu != '') old_menu.style.display = 'none';
		submenu.style.display = 'block';
		old_menu = submenu;
	} else {
		submenu.style.display = 'none';
		old_menu = '';
	}
}


// ½Ç½Ã°£ ÄíÆù
function fn_multiMsg(strPrdid) {
  ifrExecute.location.href = "jseip_RealtimeMsg.jsp?action=s&prdid=" + strPrdid;
}

// GSBox °ü·Ã js
function GSBoxLayer(sc){
  //GSBoxLayer(sc,0);
}

function GSBoxLayer(sc,ecpid){
  //var objifr = document.getElementById("ifrExecute");  //inc_footer.jsp ÀÇ ifrExecute ½ÇÇà
  //objifr.src = "/ecrm/gsbox/gsboxCheck.jsp?sc=" + sc + "&ecpid=" + ecpid;
}

function GSBoxLayerTest(sc,ecpid,searchKey){
  var objifr = document.getElementById("ifrExecute");  //inc_footer.jsp ÀÇ ifrExecute ½ÇÇà
  objifr.src = "/ecrm/gsbox/gsboxCheck.jsp?sc=" + sc + "&ecpid=" + ecpid + "&searchKey=" + searchKey;
}

// GSBox °ü·Ã js
function GSBoxTab(gubun){
   var divName = 'GSBox_' + gubun;
   var arName = new Array("GSBox_message", "GSBox_flag", "GSBox_main", "GSBox_pcid");  //div object list

   //paramÀ» µé¾î¿Â div ¸¸ È°¼ºÈ­ ÇÏ°í ³ª¸ÓÁö´Â ºñÈ°¼º
   for(var i=0; i< arName.length; i++){
     var divObj = document.getElementById(arName[i]);

     if(divName == "GSBox_pcid"){
       divObj.style.display='none';
     } else if(divName == arName[i]){
       divObj.style.display='block';
     }else{
       divObj.style.display='none';
       selectboxDisplay();
     }
   }
}

//GSBoxÀÇ ³ëÃâ½Ã ÇØ´ç ´ÜÇ°ÀÇ »ó¼¼Á¤º¸ selectbox°¡ ÀÖÀ¸¸é display ´Â none À¸·Î ¼û±ä´Ù. ¶Ç´Â ¼û°Ü¾ß ÇÒ id °¡ ÀÖÀ¸¸é ¾Æ·¡ array ¿¡ Ãß°¡ÇÑ´Ù.
function selectboxDisplay(){

  var mode;

  var messageObj = document.getElementById("GSBox_message");
  var mainObj = document.getElementById("GSBox_main");

  //¼û°ÜµÑ array
  var selArray = new Array( "colorArr",
                            "sizeArr",
                            "styleArr",
                            "giftArr",
                            "TotalItem",
                            "qty"
                            );

    if(messageObj != null || mainObj != null){
      if(messageObj.style.display == "block" || mainObj.style.display == "block"){
        mode = "none";
      } else {
        mode = "block";
      }
    }


    //ÇØ´ç selectbox°¡ ÀÖÀ¸¸é display ´Â none À¸·Î ¼û±ä´Ù.
    for(var j=0; j<selArray.length; j++){
      var selObj = document.getElementById(selArray[j]);
      if(selObj != null)  selObj.style.display=mode;
    }

}

//GSBox¿¡¼­ ÂòÇØµÎ±â Å¬¸¯½Ã
function addWishListGSBox(paramPrdid) {
  var url = "/ecrm/gsbox/GSBox_addWish.jsp?ecpid=" + paramPrdid;
  var winWish = window.open(url, "addWish", "width=400,height=295,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0");
}

// ·ÎÄÉÀÌ¼Ç ¿ìÃø ½ºÅ©·Ñ °ü·Ã
function lgmove1(whichlayer){
	lgtlayer = eval(whichlayer);

	if(lgtlayer.top > 0 && lgtlayer.top <= lgnum) {
		lgtlayer.top = 0;
		setTimeout("lgmove1(lgtlayer)", lgscrollspeed);
		setTimeout("lgmove2(document.lgmain.document.lgsecond)", lgscrollspeed);
		return;
	}
	if (lgtlayer.top >= lgtlayer.document.height * -1) {
		lgtlayer.top -= lgnum;
		setTimeout("lgmove1(lgtlayer)", lgwaitingtime);
	} else {
		lgtlayer.top = lgscrollerheight;
		lgtlayer.document.write(lgmessages[lgi]);
		lgtlayer.document.close();

		if(lgi == lgmessages.length - 1) lgi = 0;
		else lgi++;
	}
}

function lgmove2(whichlayer) {
	lgtlayer2 = eval(whichlayer);

	if(lgtlayer2.top > 0 && lgtlayer2.top <= lgnum) {
		lgtlayer2.top = 0;
		setTimeout("lgmove2(lgtlayer2)", lgscrollspeed);
		setTimeout("lgmove1(document.lgmain.document.lgfirst)", lgscrollspeed);
		return;
	}
	if (lgtlayer2.top >= lgtlayer2.document.height * -1) {
		lgtlayer2.top -= lgnum;
		setTimeout("lgmove2(lgtlayer2)", lgwaitingtime);
	} else {
		lgtlayer2.top=lgscrollerheight;
		lgtlayer2.document.write(lgmessages[lgi]);
		lgtlayer2.document.close();

		if(lgi == lgmessages.length - 1) lgi = 0;
		else lgi++;
	}
}

function lgmove3(whichdiv) {
	lgtdiv = eval(whichdiv);

	if(lgtdiv.style.pixelTop > 0 && lgtdiv.style.pixelTop <= lgnum) {
		lgtdiv.style.pixelTop = 0;
		setTimeout("lgmove3(lgtdiv)", lgscrollspeed);
		setTimeout("lgmove4(lgsecond2)", lgscrollspeed);
		return;
	}
	if(lgtdiv.style.pixelTop >= lgtdiv.offsetHeight * -1){
		lgtdiv.style.pixelTop -= lgnum;
		setTimeout("lgmove3(lgtdiv)", lgwaitingtime);
	} else {
		lgtdiv.style.pixelTop = lgscrollerheight;
		lgtdiv.innerHTML = lgmessages[lgi];

		if(lgi == lgmessages.length - 1) lgi = 0;
		else lgi++;
	}
}

function lgmove4(whichdiv) {
	lgtdiv2 = eval(whichdiv);

	if(lgtdiv2.style.pixelTop > 0 && lgtdiv2.style.pixelTop <= lgnum) {
		lgtdiv2.style.pixelTop = 0;
		setTimeout("lgmove4(lgtdiv2)", lgscrollspeed);
		setTimeout("lgmove3(lgfirst2)", lgscrollspeed);
		return;
	}
	if(lgtdiv2.style.pixelTop >= lgtdiv2.offsetHeight * -1) {
		lgtdiv2.style.pixelTop -= lgnum;
		setTimeout("lgmove4(lgsecond2)", lgwaitingtime);
	} else {
		lgtdiv2.style.pixelTop = lgscrollerheight;
		lgtdiv2.innerHTML = lgmessages[lgi];

		if(lgi == lgmessages.length - 1) lgi = 0;
		else lgi++;
	}
}

function lgonmouse_event(){
	lgnum = 0;
}

function lgmouseout_event(){
	lgnum = 1;
}

function lgstartscroll() {
	if(document.all) {
		lgmove3(lgfirst2);
		lgsecond2.style.top = lgscrollerheight;
		lgsecond2.style.visibility = 'visible';
	} else if(document.layers) {
		document.lgmain.visibility = 'show';
	move1(document.lgmain.document.lgfirst);
		document.lgmain.document.lgsecond.top = lgscrollerheight + lgnum;
		document.lgmain.document.lgsecond.visibility = 'show';
	}
}

/* 2005-05-09 19:42 by dong
//ÃÖÀú°¡½Å°íÆË¾÷
function openLowPricePop(prdid){
  window.open('/event/2005_01/apply_lowPrice_pop.jsp?prdid=' + prdid,'prdNoticePop','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,top=0,left=0,width=480,height=630');
  return;
}
*/

//eStore¸µÅ©
function goLinkeStore(sell_ecuserid, link_cd, link_rel_id) {
	link_cd = Number(link_cd);
	if ( link_cd == 10 ) {
		document.location = "/mall.retrievePlan.cbm?sell_ecuserid=" + sell_ecuserid + "&link_rel_id=" + link_rel_id;
	} else if ( link_cd == 20 ) {
		document.location = "/mall.retrieveCoupon.cbm?sell_ecuserid=" + sell_ecuserid + "&link_rel_id=" + link_rel_id;
	} else if ( link_cd == 30 ) {
		document.location = "/mall.retrieveItem.cbm?sell_ecuserid=" + sell_ecuserid + "&hi_prdid=" + link_rel_id;
	} else if ( link_cd == 40 ) {
		document.location = "/mall.retrieveGoStore.cbm?sell_ecuserid=" + sell_ecuserid + "&link_cd=40";
	} else if ( link_cd == 43 ) {
		document.location = "/mall.retrieveGoStore.cbm?sell_ecuserid=" + sell_ecuserid + "&link_cd=40";
	} else if ( link_cd == 50 ) {
		document.location = "/mall.retrieveSect.cbm?sell_ecuserid=" + sell_ecuserid + "&cbm_sect_cd=10&cbm_page_id=L&cbm_sect_id=" + link_rel_id;
	} else if ( link_cd == 60 ) {
		document.location = "/mall.retrieveSect.cbm?sell_ecuserid=" + sell_ecuserid + "&cbm_sect_cd=20&cbm_page_id=L&cbm_sect_id=" + link_rel_id;
	} else if ( link_cd == 70 ) {
		document.location = "/bbs.retrieveQnaMain.smp?sell_ecuserid=" + sell_ecuserid;
	} else {
		document.location = "/mall.retrieveCBMMain.cbm";
	}
}

// °Ë»ö Ãß°¡ºÐ...
var old_tab='';
var old_view='';
function tview(object,num) {
	var width=parseInt(object.width)+2;
	var view=document.getElementById('tab'+num);
	if(old_tab!=object) {
		if(old_tab!='') {
			old_tab.innerHTML='<b>'+old_tab.innerText+'</b>';
			old_view.style.display='none';
		}
		object.innerHTML='<div style=position:absolute><div style=position:relative;left:-'+(width/2)+';top:-16;width:'+width+';height:40;z-index:1><table width=100% border=0 cellspacing=0 cellpadding=0><tr><td height=32 align=center bgcolor=0A50A1 style=font-family:±¼¸²;font-size:12;color:FFFFFF><b>'+object.innerText+'</b></td></tr><tr><td align=center><img src=http://image.gsshop.com/top_2005/search_2005/icon_point01.gif border=0></td></tr></table></div></div>';
		view.style.display='block';
		view.style.zIndex = "2";
		old_tab=object;
		old_view=view;
	}
}

//ºê¶ó¿ìÀú XP¿©ºÎ Ã¼Å©
var isXp = navigator.userAgent.indexOf('Windows NT 5.1') > 0;

//window.open¿¡¼­ Æø°ú ³ôÀÌ ¼ýÀÚ´Â ³»ºÎ ÄÁÅÙÃ÷ÀÇ Å©±â, scrollbar°¡ ¾ø´Â °íÁ¤Ã¢¿¡¼­ »ç¿ë
function popupXP(url, popWidth, popHeight, popStatus) {
  var xpHoffset = 0;
  if (!isXp) {
    xpHoffset = 0;
    popStatus = 'yes';
  }
  popHeight += xpHoffset;
  window.open(url, '', 'width='+popWidth+',height='+popHeight+',status='+popStatus);
}

/*
 * À©µµ¿ì Áß¾ÓÀ¸·Î »õÃ¢ ¶ç¿ì±â
 * from /hi/js/common.js
 */
function windowOpen(url, title, w, h){
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	winprops = "width="+w+", height="+h+", resizable=no, menubar=no, status=no, scrollbars=no, left=" + winl + ", top=" + wint;

	win = window.open (url, title, winprops);
	win.window.focus();
	return win;
}

//resizeTo¿¡¼­ Æø°ú ³ôÀÌ ¼ýÀÚ´Â ¿ÜºÎÃ¢ÀÇ Å©±â ±âº»ÀûÀ¸·Î status°¡ ÀÖ´Ù°í °¡Á¤
function resizeToXP(reWidth, reHeight) {
	reWidth += 10;
	if (isXp) {
		reHeight += 58;
	} else {
		reHeight += 49;
	}
	self.resizeTo(reWidth, reHeight);
}

//2k¿¡¼­ status ¾øÀ» °æ¿ì, XP¿¡¼­´Â status Á¸ÀçÇÑ´Ù°í °¡Á¤
function resizeToNoStatus(reWidth, reHeight) {
	reWidth += 10;
	if (isXp) {
		reHeight += 58;
	} else {
		reHeight += 29;
	}
	self.resizeTo(reWidth, reHeight);
}

// °í°´°¨»ç ¶¯Å¥Æä½ºÆ¼¹ú
function showDropDownBanner() {
    var location_href = document.location.href;
    var isMain = location_href.indexOf("jsp/main.jsp") > 0;
    var isShow = Math.floor(Math.random(new Date().getTime()) * 3) == 1 ;
    if (isMain || isShow) {
        var topObj = document.getElementById("toptoptop");
        topObj.style.display = "block";
    }
}

function header_swapImgRestore() {
  var i,x,a=document.header_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function header_findObj(n, d) {
  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=header_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function header_swapImage() {
  var i,j=0,x,a=header_swapImage.arguments; document.header_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=header_findObj(a[i]))!=null){document.header_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// ÇÃ·¡½¬ 7.0 ¹öÁ¯
// id, width, height, movie, param1, value1, param2, value2,...,paramN, valueN
function flashObject() {

	var args = flashObject.arguments;
	var quality = 'high';
	var bgcolor = '#ffffff';
	var wmode = 'transparent';
	var params = new Array();

	if(args.length < 4) {
		return;
	}

	// paramºÐ¼®
	for(var i = 4; i < args.length; i=i+2) {
		if(args[i].toLowerCase() == 'quality') {
			quality = args[i+1];
			continue;
		} else if(args[i].toLowerCase() == 'bgcolor') {
			bgcolor = args[i+1];
			continue;
		} else if(args[i].toLowerCase() == 'wmode') {
			wmode = args[i+1];
			continue;
		}
		params[params.length] = args[i];
		params[params.length] = args[i+1];
	}

	document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + args[1] + '" height="' + args[2] + '" id="' + args[0] + '">');
	document.writeln('<param name="movie" value="' + args[3] + '" />');
	document.writeln('<param name="quality" value="' + quality + '" />');
	document.writeln('<param name="bgcolor" value="' + bgcolor + '" />');
	document.writeln('<param name="wmode" value="' + wmode + '" />');
	for(var i = 0; i < params.length; i=i+2) {
		document.writeln('<param name="' + params[i] + '" value="' + params[i+1] + '" />');
	}
	document.write('<embed src="' + args[3] + '" quality="' + quality + '" bgcolor="' + bgcolor + '" wmode="' + wmode + '" width="' + args[1] + '" height="' + args[2] + '" name="' + args[0]+ '"');
	for(var i = 0; i < params.length; i=i+2) {
		document.write(' ' + params[i] + '="' + params[i+1] + '"');
	}
	document.writeln(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.writeln('</object>');

}


// ÇÃ·¡½¬ 8.0 ¹öÁ¯
// id, width, height, movie, param1, value1, param2, value2,...,paramN, valueN
function flashObjectV8() {

	var args = flashObject.arguments;
	var quality = 'high';
	var bgcolor = '#ffffff';
	var wmode = 'transparent';
	var params = new Array();

	if(args.length < 4) {
		return;
	}

	// paramºÐ¼®
	for(var i = 4; i < args.length; i=i+2) {
		if(args[i].toLowerCase() == 'quality') {
			quality = args[i+1];
			continue;
		} else if(args[i].toLowerCase() == 'bgcolor') {
			bgcolor = args[i+1];
			continue;
		} else if(args[i].toLowerCase() == 'wmode') {
			wmode = args[i+1];
			continue;
		}
		params[params.length] = args[i];
		params[params.length] = args[i+1];
	}

	document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="' + args[1] + '" height="' + args[2] + '" id="' + args[0] + '">');
	document.writeln('<param name="movie" value="' + args[3] + '" />');
	document.writeln('<param name="quality" value="' + quality + '" />');
	document.writeln('<param name="bgcolor" value="' + bgcolor + '" />');
	document.writeln('<param name="wmode" value="' + wmode + '" />');
	for(var i = 0; i < params.length; i=i+2) {
		document.writeln('<param name="' + params[i] + '" value="' + params[i+1] + '" />');
	}
	document.write('<embed src="' + args[3] + '" quality="' + quality + '" bgcolor="' + bgcolor + '" wmode="' + wmode + '" width="' + args[1] + '" height="' + args[2] + '" name="' + args[0]+ '"');
	for(var i = 0; i < params.length; i=i+2) {
		document.write(' ' + params[i] + '="' + params[i+1] + '"');
	}
	document.writeln(' type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
	document.writeln('</object>');

}

/* simple flashwrite */
function flashObjectSimple(swfPath, swfWidth, swfHeight) {
  return '<OBJECT classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" \
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+swfWidth+'" height="'+swfHeight+'">\
<param name="movie" value="'+swfPath+'" />\
<param name="quality" value="high" />\
<param name="wmode" value="transparent"/>\
<EMBED src="'+swfPath+'" quality="high" width="'+swfWidth+'" height="'+swfHeight+'" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\
</OBJECT>';
}

// TVÀÌ¼¥ µ¿¿µ»ó player play ±â´É
function CreateFlash8(strSrcUrl, strId, nWidth, nHeight, strMode, bSameDomain, bgColor, strAlign)
{
	var str  = "";
	str += "<object id='" + strId + "' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ";
	if(strAlign != "")		str += " align='" + strAlign + "' ";
	str += " width='" + nWidth + "' height='" + nHeight + "'>";

	str += "<param name='movie'   value='" + strSrcUrl + "' />";
	str += "<param name='quality' value='high' />";

	if(strMode != "")		str += "<param name='wmode'   value='" + strMode + "' />";
	if(bgColor != "")		str += "<param name='bgcolor' value='" + bgColor + "' />";
	if(bSameDomain == true) str += "<param name='allowScriptAccess' value='sameDomain' />";
		else				str += "<param name='allowScriptAccess' value='always' />";

	str += "<embed src="+strSrcUrl+" quality=high type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'" ;
	if(strMode  != "")		str += " wmode="   + strMode;
	if(bgColor  != "")		str += " bgcolor=" + bgColor;
	if(strAlign != "")		str += " align="   + strAlign;
	if(bSameDomain == true) str += " allowScriptAccess='sameDomain'";
		else				str += " allowScriptAccess='always'";
	str += " name='" + strId + "'"
	str += " width=" + nWidth + " height=" + nHeight + " swLiveConnect=true></embed>";

	str += "</object>";
	document.write( str );
}

function vod_copy(strSrcUrl, strId, nWidth, nHeight, strMode, bSameDomain, bgColor, strAlign)
{
	var str  = "";
	str += "<object id='" + strId + "' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ";
	if(strAlign != "")		str += " align='" + strAlign + "' ";
	str += " width='" + nWidth + "' height='" + nHeight + "'>";

	str += "<param name='movie'   value='" + strSrcUrl + "' />";
	str += "<param name='quality' value='high' />";

	if(strMode != "")		str += "<param name='wmode'   value='" + strMode + "' />";
	if(bgColor != "")		str += "<param name='bgcolor' value='" + bgColor + "' />";
	if(bSameDomain == true) str += "<param name='allowScriptAccess' value='sameDomain' />";
		else				str += "<param name='allowScriptAccess' value='always' />";

	str += "<embed src="+strSrcUrl+" quality=high type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'" ;
	if(strMode  != "")		str += " wmode="   + strMode;
	if(bgColor  != "")		str += " bgcolor=" + bgColor;
	if(strAlign != "")		str += " align="   + strAlign;
	if(bSameDomain == true) str += " allowScriptAccess='sameDomain'";
		else				str += " allowScriptAccess='always'";
	str += " name='" + strId + "'"
	str += " width=" + nWidth + " height=" + nHeight + " swLiveConnect=true></embed>";

	str += "</object>";
	//document.write( str );

	window.clipboardData.setData('text', str);
	alert('ÁÖ¼Ò°¡ º¹»çµÇ¾ú½À´Ï´Ù.');


}
