/**
 * A,IMG Æ÷Ä¿½º ¾ø¾Ö±â (IncFooter.jsp¿¡¼­ È£Ãâ)
 */
function setFocusOut(){
	var obj_a_list = document.getElementsByTagName("A");
	var obj_img_list = document.getElementsByTagName("IMG");

	for(var i=0; i<obj_a_list.length; i++){
		if (obj_a_list[i].addEventListener){
			obj_a_list[i].addEventListener("focusin", function(){ event.srcElement.blur(); }, false);
		}else if (window.attachEvent){
			obj_a_list[i].attachEvent("onfocusin", function(){ event.srcElement.blur(); });
		}else{
			obj_a_list[i].onfocusin = function(){ event.srcElement.blur(); }
		}
	}

	for(var i=0; i<obj_img_list.length; i++){
		if(typeof obj_img_list[i].getAttribute("onclick") != "function"){
			continue;
		}
		if (obj_img_list[i].addEventListener){
			obj_img_list[i].addEventListener("focusin", function(){ event.srcElement.blur(); }, false);
		}else if (obj_img_list[i].attachEvent){
			obj_img_list[i].attachEvent("onfocusin", function(){ event.srcElement.blur(); });
		}else{
			obj_img_list[i].onfocusin = function(){ event.srcElement.blur(); }
		}
	}
}
/**
 * ·Î±×ÀÎ È®ÀÎÈÄ callbackfn ÇÔ¼ö È£Ãâ
 */
function fn_goPage(callbackfn) {
	DWRMgr.isLogin(function(b) {
		if (b) {
			eval(callbackfn)();
		} else {
			openLoginPop(callbackfn);
		}
	});
}

/**
 * ·Î±×ÀÎ ÆË¾÷
 * callbackfn : ·Î±×ÀÎ ÈÄ ÄÝÇÒ openerÀÇ javascript function
 * targetName open window ÀÌ¸§ --±âº»°ª : ''
 * to_url : ·Î±×ÀÎ ÈÄ ÀÌµ¿ÇÒ ÆäÀÌÁö °æ·Î ¾øÀ¸¸é Ã¢ÀÌ ´ÝÈû
 * login_kind : ·Î±×ÀÎ ÆË¾÷ Á¾·ù --±âº»°ª : 0(Const.NOMAL_LOGIN) //ÀÏ¹Ý·Î±×ÀÎ ÆË¾÷
 *						     	       : 1(Const.SALE_LOGIN) //±¸¸Å·Î±×ÀÎ ÆË¾÷
 *							           : 2(Const.ORDER_LOGIN) //ÁÖ¹®¹è¼Û·Î±×ÀÎ ÆË¾÷
 *						     	       : 3(Const.ORDER_LOGIN_NONMEM) //ÁÖ¹®¹è¼Û·Î±×ÀÎ ÆË¾÷(ºñÈ¸¿ø ¿ì¼±)
 */
function openLoginPop(callbackfn, targetName, to_url, login_kind) {
	var width = 395;
	var height = 510;
	var wid = (screen.width)/2 - width/2 ;
	var hei = (screen.height)/2 - height/2;
	var url  = "/common/auth.do?method=loginPopOpen";
	var tn = 'loginPopup';
	var lk = '0';
	var toUrl = "";

	if(targetName != null && targetName != ''){
		tn = targetName;
	}
	if(login_kind != null && login_kind != ''){
		lk = login_kind;
	}
	if(to_url != null && to_url != ''){
		toUrl = to_url;
	}
	url = url + "&login_kind=" + lk + "&pop_flag=T&callbackfn=" +callbackfn + "&toUrl=" + toUrl + "&opener_http=" + window.location.href.split("://")[0];
	var win = window.open(url, tn, "menubar=no, scrollbars=no, resizable=no, width=" + width + ", height=" + height+ ",top=" + hei + ",left=" + wid + ",directories=no,location=no,fullscreen=no,toolbar=no, status=no");
	if (win == null || typeof(win) == "undefined") {
		alert("ÆË¾÷ Â÷´Ü ±â´ÉÀÌ ¼³Á¤µÇ¾î ÀÖ½À´Ï´Ù. ÆË¾÷Â÷´ÜÀ» ÇØÁ¦ÇØ ÁÖ¼¼¿ä.");
	} else {
		win.focus();	
	}
	//return win;
}

/**
 * ·Î±×¾Æ¿ô
 */
function fn_logOut(){
	location.href = "/common/auth.do?method=logOut";
}

/**
 * ÄíÆù ´Ù¿î¹Þ±â ÆË¾÷
 * param coupon_id
 */
function fn_downCoupon(id) {

	alert('ÄíÆù ´Ù¿î·Îµå ÀÔ´Ï´Ù. : id = ' + id);

	//2007.2.28	ÀÌ¹Î¼®		ÄíÆù ´Ù¿î¹Þ±âÀü ÄíÆù È®ÀÎ ÆäÀÌÁö »ý¼º¿¡ µû¶ó º¯°æ
	openNoScrollWin("/mypage/coupon.do", "couponDown", "ÄíÆù´Ù¿î·Îµå", "500", "700", "&method=doCouponDownPopup&coupon_id="+id, "Y");

}

/*
 * Àå¹Ù±¸´Ï ´ã±â(ÀÏ¹Ý ¸®½ºÆ®¿ë) - cud_type ³Ñ±âÁö ¸»°Í
 * item_id : »óÇ°ID
 * unit_id : ´ÜÇ°ID
 * sale_shop_id : ¿µ¿ª id
 * sale_shop_gubun_code : ¿µ¿ª±¸ºÐÄÚµå
 * multi_unit_yn : º¹¼ö´ÜÇ°¿©ºÎ
 * gift_exists_yn : »çÀºÇ°Á¸Àç¿©ºÎ
 * cud_type : undefined - ÀÏ¹Ý, etc - Àå¹Ù±¸´Ï
 */
function fn_saveCart(item_id, unit_id, sale_shop_id, sale_shop_gubun_code, multi_unit_yn, gift_exists_yn, cud_type){

	var sf = document.saveCartForm;
	var div = "";

	if( typeof(item_id) == "undefined" || typeof(unit_id) == "undefined" ){

		alert("¼±ÅÃµÈ »óÇ°ÀÌ ¾ø½À´Ï´Ù.");
		return;
	}

	//¿µ¿ªÁöÁ¤µÈ°Å ¾øÀ¸¸é '±âÅ¸'·Î ¼³Á¤ÇØÁØ´Ù.
	if ( sale_shop_gubun_code = "" ) {
		sale_shop_gubun_code = "99";
	}

	if( typeof(multi_unit_yn) != "undefined" && typeof(gift_exists_yn) != "undefined" &&
	 	multi_unit_yn != "" && gift_exists_yn != "" ){

		if( multi_unit_yn == "T" || gift_exists_yn == "T" ){

			if( gift_exists_yn == "T" &&
				confirm( "»çÀºÇ°ÀÌ ÀÖ´Â »óÇ°Àº »óÇ°»ó¼¼ÆäÀÌÁö¿¡¼­ ´ãÀ¸¼Å¾ß ÇÕ´Ï´Ù.\n»óÇ°»ó¼¼ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?") ){

				fn_viewItemDetail(item_id, sale_shop_id, sale_shop_gubun_code);
				return;
			}else if( multi_unit_yn == "T" &&
				confirm( "»óÇ° ¿É¼ÇÀÌ ÀÖ´Â »óÇ°Àº »óÇ°»ó¼¼ÆäÀÌÁö¿¡¼­ ´ãÀ¸¼Å¾ß ÇÕ´Ï´Ù.\n»óÇ°»ó¼¼ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?") ){

				fn_viewItemDetail(item_id, sale_shop_id, sale_shop_gubun_code);
				return;
			}else{

				return;
			}
		}
	}

	div = "<input type='hidden' name='item_id' value='" + item_id + "'>";
	div += "<input type='hidden' name='unit_id' value='" + unit_id + "'>";
	div += "<input type='hidden' name='order_qty' value='1'>";
	div += "<input type='hidden' name='sale_shop_id' value='" + sale_shop_id + "'>";
	div += "<input type='hidden' name='sale_shop_gubun_code' value='" + sale_shop_gubun_code + "'>";

	if(div == ""){

		alert("¼±ÅÃµÈ »óÇ°ÀÌ ¾ø½À´Ï´Ù.");
		return;
	}

	if( typeof(cud_type) != "undefined" ){

		sf.cud_type.value = cud_type;
	}

	divCartItem.innerHTML = div;

	sf.method.value = "saveCart";
	sf.action = "/order/cart.do";
	sf.target = "action_frame";
	sf.submit();
}

/*
 * À§½Ã¸®½ºÆ® ´ã±â(»óÇ°»ó¼¼, ÀÏ¹Ý ¸®½ºÆ®¿ë)
 * item_id : »óÇ°ID
 * unit_id : ´ÜÇ°ID
 * multi_unit_yn : º¹¼ö´ÜÇ°¿©ºÎ
 * gift_exists_yn : »çÀºÇ°Á¸Àç¿©ºÎ
 * sale_shop_id : ¿µ¿ª id
 * sale_shop_gubun_code : ¿µ¿ª±¸ºÐÄÚµå
 */
function fn_saveWishList(item_id, unit_id, sale_shop_id, sale_shop_gubun_code, multi_unit_yn, gift_exists_yn){

	var login_flag = getCookie("LOGIN_YN");

	if(login_flag == "" || login_flag == "F"){
		if(typeof parent != "undefined" && typeof parent != "null" && parent != "")
			openLoginPop("", "LoginPop", "", "0");
		else
			parent.openLoginPop("", "LoginPop", "", "0");
	}

	var sf = document.saveCartForm;
	var div = "";

	if( typeof(item_id) == "undefined" || typeof(unit_id) == "undefined" ){

		alert("¼±ÅÃµÈ »óÇ°ÀÌ ¾ø½À´Ï´Ù.");
		return;
	}

	//¿µ¿ªÁöÁ¤µÈ°Å ¾øÀ¸¸é '±âÅ¸'·Î ¼³Á¤ÇØÁØ´Ù.
	if ( sale_shop_gubun_code = "" ) {
		sale_shop_gubun_code = "99";
	}

	if( typeof(multi_unit_yn) != "undefined" && typeof(gift_exists_yn) != "undefined" &&
	 	multi_unit_yn != "" && gift_exists_yn != "" ){
		if( multi_unit_yn == "T" || gift_exists_yn == "T" ){

			if( gift_exists_yn == "T" &&
				confirm( "»çÀºÇ°ÀÌ ÀÖ´Â »óÇ°Àº »óÇ°»ó¼¼ÆäÀÌÁö¿¡¼­ ´ãÀ¸¼Å¾ß ÇÕ´Ï´Ù.\n»óÇ°»ó¼¼ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?") ){

				fn_viewItemDetail(item_id, sale_shop_id, sale_shop_gubun_code);
				return;
			}else if( multi_unit_yn == "T" &&
				confirm( "»óÇ° ¿É¼ÇÀÌ ÀÖ´Â »óÇ°Àº »óÇ°»ó¼¼ÆäÀÌÁö¿¡¼­ ´ãÀ¸¼Å¾ß ÇÕ´Ï´Ù.\n»óÇ°»ó¼¼ÆäÀÌÁö·Î ÀÌµ¿ÇÏ½Ã°Ú½À´Ï±î?") ){

				fn_viewItemDetail(item_id, sale_shop_id, sale_shop_gubun_code);
				return;
			}else{

				return;
			}
		}
	}

	div = "<input type='hidden' name='item_id' value='" + item_id + "'>";
	div += "<input type='hidden' name='unit_id' value='" + unit_id + "'>";
	div += "<input type='hidden' name='sale_shop_id' value='" + sale_shop_id + "'>";
	div += "<input type='hidden' name='sale_shop_gubun_code' value='" + sale_shop_gubun_code + "'>";

	if(div == ""){

		alert("¼±ÅÃµÈ »óÇ°ÀÌ ¾ø½À´Ï´Ù.");
		return;
	}

	divCartItem.innerHTML = div;

	sf.method.value = "saveWishList";
	sf.action = "/mypage/shopping.do";
	sf.target = "action_frame";
	sf.submit();
}

/**
 * ¸®Æ÷Æ®¸¦ º¸³½´Ù.(½Å°íÇÏ±â)
 * title : Á¦¸ñ#
 * member_id : ±Û ÀÛ¼ºÀÚ ID#
 * board_id : °Ô½ÃÆÇ
 * noti_seq : °Ô½ÃÆÇ ¼ø¹ø
 * answ_seq : ´ä±Û ¼ø¹ø
 * item_eval_id : »óÇ°Æò ID
 * shoplist_id : ¼îÇÎ ¸®½ºÆ® ID
 * trgt_bbs_code : ´ë»ó °Ô½Ã¹° ÄÚµå#
 * reply_seq : ´äº¯ ¼ø¹ø
 * item_quest_id : »óÇ° ¹®ÀÇ ID
 * note_id : ÂÊÁö ID
 * callBack : ³ªÁß¿¡ È£ÃâÇÒ Script ÇÔ¼ö(¾øÀ¸¸é Nullµµ µÇ°í °ø¹éµµ »ó°ü¾øÀ½)
 */
 /*
function sendReport(title, member_id, board_id, noti_seq, answ_seq, item_eval_id, shoplist_id,
						   trgt_bbs_code, reply_seq, item_quest_id, note_id, callBack, isPopup) {
	if(typeof isPopup == "undefined" || isPopup == ""){
		isPopup = true;
	}

	var param = "&method=writeReport";
	param += "&board_id=" + board_id;
	param += "&noti_seq=" + noti_seq;
	param += "&answ_seq=" + answ_seq;
	param += "&item_eval_id=" + item_eval_id;
	param += "&shoplist_id=" + shoplist_id;
	param += "&trgt_bbs_code=" + trgt_bbs_code;
	param += "&reply_seq=" + reply_seq;
	param += "&item_quest_id=" + item_quest_id;
	param += "&note_id=" + note_id;
	param += "&callBack=" + callBack;
	param += "&title=" + title;
	param += "&member_id=" + member_id;

	if (isPopup) {
		openNoScrollWin("/ucc/report.do", "reportpop", "½Å°íÇÏ±â", 490, 510, param, "Y");
	} else {
		location.href = "/ucc/report.do?" + param;
	}
}
*/

/**
 * ÇÃ·¡½Ã ³Ö´Â ÇÔ¼ö
 * f_id = ÇÃ·¡½Ã ¾ÆÀÌµð
 * f_name = ÇÃ·¡½Ã ÆÄÀÏ¸í
 * f_width = °¡·ÎÅ©±â
 * f_height = ¼¼·Î³ôÀÌ
 * f_para = ÆÄ¶ó¹ÌÅÍ
*/
function show_flash_F(f_id,f_url,f_width,f_height,f_para,transe_flag){
	if(typeof transe_flag == "undefined")
		transe_flag = true;
	document.write(get_flash_F(f_id,f_url,f_width,f_height,f_para,transe_flag));

	if(f_id != "")
		eval("window." + f_id + " = document.getElementById('" + f_id + "');");
}

/**
 * ÇÃ·¡½Ã ³Ö´Â ¹®ÀÚ¿­
 * f_id = ÇÃ·¡½Ã ¾ÆÀÌµð
 * f_name = ÇÃ·¡½Ã ÆÄÀÏ¸í
 * f_width = °¡·ÎÅ©±â
 * f_height = ¼¼·Î³ôÀÌ
 * f_para = ÆÄ¶ó¹ÌÅÍ
*/
function get_flash_F(f_id,f_url,f_width,f_height,f_para,transe_flag){
	var str_html = "";
	str_html += "<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0'";
	if(f_width != "")
		str_html += " width='"+f_width+"'";
	if(f_height != "")
		str_html += " height='"+f_height+"'";
	str_html += " id='"+f_id+"'>";
	//str_html += "<param name='autosize' value='true'>";
	str_html += "<param name='quality' value='high'>";
 	str_html += "<param name='menu' value='false'>";
	str_html += "<param name='allowscriptaccess' value='always'/>";
	str_html += "<param name='movie' value='"+f_url+"'>";
	if(transe_flag)
		str_html += "<param name='wmode' value='transparent'>";
	str_html += "<param name='flashvars' value='"+f_para+"'>";
	str_html += "<embed src='"+f_url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash'";
	if(f_width != "")
		str_html += " width='"+f_width+"'";
	if(f_height != "")
		str_html += " height='"+f_height+"'";
	if(transe_flag)
		str_html += " wmode='transparent'";
	str_html += " allowScriptAccess='always' showLiveConnect='true' flashvars='"+f_para+"' name='"+f_id+"'></embed>";
	str_html += "</object>";
	return str_html;
}


// °Ë»ö °¡°Ý´ë ÇÃ·¡½Ã  È£Ãâ
function show_flash_Price(f_id,f_url,f_width,f_height,f_trans, f_para){
	show_flash_F(f_id,f_url,f_width,f_height,f_para);
}

/**
 * ´Ü°ñ¸ÅÀåÀ» µî·ÏÇÏ°íÀÚ ÇÒ ¶§ È£ÃâÇÑ´Ù.
 *
 *
 *
 * @author Kim Ju Hyoun
 * @param sId : SHOP_ID
 * @param sGb : SHOP_GUBUN_CODE
 * @param sUrl : SHOP_URL
 */
function regularShopReg( sId, sGb , sUrl ){

	var f = this.document.regularShopForm;
	f.action = "/mypage/member.do";
	f.method.value = "myFavorShopReg";
	f.target = "action_frame";
	f.shop_id.value = sId;
	f.shop_gubun_code.value = sGb;
	f.shop_url.value = sUrl;
	f.submit();

}

/**
* À©µµ¿ì »çÀÌÁî ÀÚµ¿ Á¶Àý
* body onload ½Ã¿¡¸¸ ÀÛµ¿ÇÔ.
* ±×³É ÇÔ¼ö È£ÃâÇÏ¸é Á¦´ë·Î µÇÁö ¾ÊÀ½.
*/
function winResize()
{
    var Dwidth = parseInt(document.body.scrollWidth);
    var Dheight = parseInt(document.body.scrollHeight);
    var divEl = document.createElement("div");
    divEl.style.position = "absolute";
    divEl.style.left = "0px";
    divEl.style.top = "0px";
    divEl.style.width = "100%";
    divEl.style.height = "100%";

    document.body.appendChild(divEl);

    window.resizeBy(Dwidth-divEl.offsetWidth, Dheight-divEl.offsetHeight);
    document.body.removeChild(divEl);
}

/**
 * »óÇ°»ó¼¼ º¸±â
 * @param item_id »óÇ°¹øÈ£
 * @param sale_shop_id ÇØ´ç ¿µ¿ª id (¾ø´Â °æ¿ì '')
 * @param sale_shop_gubun_code ÇØ´ç ¿µ¿ª ±¸ºÐÄÚµå('FO03'Âü°í, ¾ø´Â °æ¿ì '')
 * @param new_flag »õÃ¢¿©ºÎ(boolean°ª, ±âº»Àº ÆäÀÌÁöÀÌµ¿)
 * @param ÅÇ Æ÷Ä¿½º 2 ´Â »óÇ°Æò, 3 Àº »óÇ° Q&A
 * @param ctg_depth Ä«Å×°í¸®¿ë
 * fn_viewItemDetail(item_id, sale_shop_id, sale_shop_gubun_code [, new_flag] [, focus] [, ctg_depth])

function fn_viewItemDetail(item_id, sale_shop_id, sale_shop_gubun_code, new_flag) {
	if(typeof new_flag == "undefined" || new_flag == ""){
		new_flag = false;
	}

	var args = fn_viewItemDetail.arguments;
	var focus = "";
	var ctg_depth = "";

	//¿µ¿ªÁöÁ¤µÈ°Å ¾øÀ¸¸é '±âÅ¸'·Î ¼³Á¤ÇØÁØ´Ù.
	if ( sale_shop_gubun_code = "" ) {
		sale_shop_gubun_code = "99";
	}

	if(args.length > 4 && args[4] != ""){
		focus = "#item_tab" + args[4];
	}

	if(args.length > 5 && args[5] != ""){
		ctg_depth = "&ctg_depth=" + args[5];
	}

	if(!new_flag){
		location.href = "/item/item.do?method=viewItemDetail&item_id=" + item_id + "&sale_shop_id=" + sale_shop_id + "&sale_shop_gubun_code=" + sale_shop_gubun_code + ctg_depth + focus;
	}else{
		window.open("/item/item.do?method=viewItemDetail&item_id=" + item_id + "&sale_shop_id=" + sale_shop_id + "&sale_shop_gubun_code=" + sale_shop_gubun_code + ctg_depth + focus, '','');
	}
}
 */


/**
 * Flash °´Ã¼ °¡Á®¿À±â
 */
function getMovieName(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1)
		return window[movieName];
	else
		return document[movieName];
}

/**
* Àå¹Ù±¸´Ï °¡±â
*/
function fn_goCart(){
	location.href = host_url + "/order/cart.do?method=getShopCartList";
}

/**
* À§½Ã¸®½ºÆ® °¡±â
*/
function fn_goWish(){
	location.href = host_url + "/mypage/member.do?method=listMyWishList&flag=2";
}

/**
* Àü¹®¸ÅÀå - °Ô½ÃÆÇ ¸®½ºÆ® ÆË¾÷
*/
function fn_searchListPop(shop_id, board_type_code) {
	openNoScrollWin('/display/specialshopbbs.do', 'searchBbsList', '°Ô½ÃÆÇÁ¶È¸', '640', '600', '&method=searchBbsListPop&shop_id='+shop_id+'&board_type_code='+board_type_code, 'Y');
}

/**
* Àü¹®¸ÅÀå - °Ô½ÃÆÇ ±Û»ó¼¼ ÆË¾÷
*/
function fn_directViewFormPop(shop_id, board_type_code, noti_seq) {
	  openNoScrollWin('/display/specialshopbbs.do', 'searchBbsList', '°Ô½ÃÆÇÁ¶È¸', '640', '600', '&method=viewBbsPop&shop_id='+shop_id+'&board_type_code='+board_type_code+'&noti_seq='+noti_seq, 'Y');
}

/**
 * onerror »óÇ°ÀÌ¹ÌÁö
 */
function fn_onerror_img(obj, img_src){
	if (obj.removeEventListener){
		obj.removeEventListener("error");
	}else if (obj.detachEvent){
		obj.detachEvent("onerror", fn_onerror_img);
	}else{
		obj.onerror = null;
	}
	obj.src = img_src;
}

/*
 * ÁÖ¹®Á¤º¸ email ¹ß¼Û
 */
function fn_sendOrderInfoMail(order_id){

	var sf = document.saveCartForm;
	var div = "";

	div = "<input type='hidden' name='order_id' value='" + order_id + "'>";

	divCartItem.innerHTML = div;

	sf.method.value = "sendOrderInfoMail";
	sf.action = "/mypage/order.do";
	sf.target = "action_frame";
	sf.submit();
}

/**
 * ¼¥ ÀÌº¥Æ® Áö¿ø ÇÔ¼ö
 **/
function fn_shopSimpleApplyEvent(event_id, win_round)
{
	var frm = document.hdnSendForm;

	frm.method = "post";
	frm.action = "/event/event.do?method=doEventEntry";
	frm.target = "action_frame";

	var hasEle = false;

	for(i = 0; i < frm.elements.length; i++)
	{
		if(frm.elements[i].name == "event_id")
		{
			frm.elements[i].value = event_id;
			hasEle = true;
		}
		 else if(frm.elements[i].name == "win_round")
		{
			frm.elements[i].value = win_round;
			hasEle = true;
		}
	}

	if(!hasEle)
	{
		var eventIdInput = document.createElement("input");
		eventIdInput.type = "hidden"
		eventIdInput.name = "event_id";
		eventIdInput.value = event_id;

		frm.insertBefore(eventIdInput);


		var winRoundInput = document.createElement("input");
		winRoundInput.type = "hidden"
		winRoundInput.name = "win_round";
		winRoundInput.value = win_round;

		frm.insertBefore(winRoundInput);
	}
	frm.submit();
}

/**
 * ¿ìÆí¹øÈ£ °Ë»ö ÆË¾÷
 */
 function fn_zipcode() {
 	var width = 400;
	var height = 420;
	var wid = (screen.width)/2 - width/2 ;
	var hei = (screen.height)/2 - height/2;
	var url  = "/common.do?method=getZipCodeListPop";
	
	var win = window.open(url, "zipcode", "menubar=no, scrollbars=no, resizable=no, width=" + width + ", height=" + height+ ",top=" + hei + ",left=" + wid + ",directories=no,location=no,fullscreen=no,toolbar=no, status=no");
	win.focus();
 }
 
/**
 * ¿ÀºêÁ§Æ®¸¦ ¹è¿­·Î ¸¸µé¾î ÁØ´Ù.
 */
function fn_toArray(obj) {
	if (typeof obj.length == "undefined" || typeof obj.length == "null") {
		var tmpArray = new Array();
		tmpArray[0] = obj;
		return tmpArray;
	}
	return obj;
}

/**
 * 1:1 °í°´»ó´ã ³»¿ª
 */
function fn_viewCounselList(){
	location.href = host_url + "/mypage/mycounsel.do?method=viewCustCounselList";
}

/**
 * My Galleria ¹Ù·Î°¡±â
 */
function fn_viewMyGalleria(){
	location.href = host_url + "/mypage/main.do?method=viewMyPageMain";
}

/**
*	1:1 °í°´ »ó´ãÇÏ±â ÆË¾÷
*/
function fn_goCustCounselPop(opener_method){

	openNoScrollWin('/cs/counsel.do', 'CustCounsel', '', '610', '700', '&method=viewCustCounselPop&popup_yn=' + 'T' + '&opener_method=' + opener_method, 'F');
}

/**
 * 1:1 °í°´ »ó´ãÇÏ±â
 */
function fn_goCustCounsel(){
	location.href = host_url + "/cs/counsel.do?method=viewCustCounselForm";
}


/**
 * »óÇ°»ó¼¼ º¸±â - by ÀåÁø¼º
 * @param item_id »óÇ°¹øÈ£
 * @param unit_id ´ÜÇ°
 * @param sale_shop_id ÇØ´ç ¿µ¿ª id (¾ø´Â °æ¿ì '')
 * @param sale_shop_gubun_code ÇØ´ç ¿µ¿ª ±¸ºÐÄÚµå(¾ø´Â °æ¿ì '')
 * @param new_flag »õÃ¢¿©ºÎ(boolean°ª, ±âº»Àº ÆäÀÌÁöÀÌµ¿)
 * @taget_name »óÇ°ÆòÀÌ³ª »óÇ°Q&A°æ¿ì ÇØ´ç ÅÇÀ¸·Î ÀÌµ¿
 * fn_viewItemDetail(item_id, unit_id, sale_shop_id, sale_shop_gubun_code [, new_flag])
 */
function fn_viewItemDetail(item_id, sale_shop_id, sale_shop_gubun_code, new_flag, taget_name) {

	var param = "";
	
	if(typeof new_flag == "undefined" || new_flag == ""){
		new_flag = false;
	}
	
	//¿µ¿ªÁöÁ¤µÈ°Å ¾øÀ¸¸é '±âÅ¸'·Î ¼³Á¤ÇØÁØ´Ù.
	if (sale_shop_gubun_code == "" ) {
		sale_shop_gubun_code = "90";
	}
	
	if( typeof(taget_name) != "undefined" || taget_name == ""){
	
		param += "#" + taget_name; 
	}

	if(!new_flag){
		location.href = "/item/item.do?method=viewItemDetail&item_id=" + item_id + "&sale_shop_id=" + sale_shop_id + "&sale_shop_gubun_code=" + sale_shop_gubun_code + param;
	}else{
		window.open("/item/item.do?method=viewItemDetail&item_id=" + item_id + "&sale_shop_id=" + sale_shop_id + "&sale_shop_gubun_code=" + sale_shop_gubun_code + param, '','');
	}
}

// ºÐ·ù·Î ¹Ù·Î °¡±â
function fn_viewDispctg(disp_ctg_id) {
	location.href = "/category.do?method=viewDispctg&disp_ctg_id=" + disp_ctg_id;
}

// ±âÈ¹Àü  ¹Ù·Î°¡±â
function fn_viewPlanShop(shop_id) {
	location.href = "/shop/shop.do?method=viewShopTemplateGate&shop_id=" + shop_id;
}

/**
*	Äüºä º¸±â
*/
function fn_quickView(item_id, sale_shop_id, sale_shop_gubun_code) {
	if(item_id == '0' || item_id == '') return;
	var param = "method=getItemWideImgAjaxList&item_id="+item_id+ "&sale_shop_id="+sale_shop_id+ "&sale_shop_gubun_code=" + sale_shop_gubun_code + "&mode=q";
	fn_getValueByAjax("/item/item.do", "GET", param, false, fn_quickViewResult, "text");
}
function fn_quickViewResult(return_value) {
	var obj = document.getElementById("quickview_area");
	var contents = obj.innerHTML;
	contents = return_value;
	obj.innerHTML = contents;
}
function fn_sumqlistOver(idx, e, img_path) {
	var selectObj =document.getElementById('sum_qlist').getElementsByTagName("img");
	for(var i=1;i<=selectObj.length;i++){
		selectObj.item(i-1).className = (idx==i)?"on":"off";
		document.getElementById('bigqimg').src = img_path+e;
	}
}
function fn_sumqlistOut(idx, e) {
	var selectObj = document.getElementById('sum_qlist').getElementsByTagName("img");
	selectObj.item(idx-1).className = "off";
	document.getElementById('bigqimg').src = e;
}

/*
*	»óÇ°¿¡ ¸¶¿ì½º ¿À¹ö½Ã 4°³ ³ª¿À´Â ¾ÆÀÌÄÜÀ» º¸¿©ÁÙ¶§
* 	¸ÕÀú layer ¾ÆÀÌÄÜÀÇ  È£Ãâ ½ºÅ©¸³Æ®¸¦ ¼³Á¤ÇÑ´Ù.
*/
var tempItem;
/**
* Àå¹Ù±¸´Ï ´ã±â
*/
function fn_registCart() {
	_fn_checkShopCart_(new _user_checkbox_(true), tempItem.item_id, -1, 1, tempItem.item_price);
	_fn_registShopCart_(false,tempItem.sale_shop_gubun_code,tempItem.sale_shop_id);
	
	tempItem = null;
}
function fn_registCartGoCart() {
	_fn_checkShopCart_(new _user_checkbox_(true), tempItem.item_id, -1, 1, tempItem.item_price);
	_fn_registShopCart_(true,tempItem.sale_shop_gubun_code,tempItem.sale_shop_id);
	
	tempItem = null;
}
function fn_registWhishList() {
	_fn_checkWishList_(new _user_checkbox_(true), tempItem.item_id, -1, tempItem.item_price);
	_fn_registWishList_(false,tempItem.sale_shop_gubun_code,tempItem.sale_shop_id);;
	
	tempItem = null;
}


function setShowIcoLayer(e,obj,width,layer,over,item) {	
	var div = document.getElementById(layer);
	var atag = div.getElementsByTagName("a");
	
	if(item.item_id == null) {
		var tmpItem = item.split(';!;');
		item = {item_id:tmpItem[0], unit_id:tmpItem[1], sale_shop_id:tmpItem[2], sale_shop_gubun_code:tmpItem[3], multi_unit_yn:tmpItem[4], gift_exists_yn:tmpItem[5], item_price:tmpItem[6]};
	}
	
	tempItem = item;
	 		
	// Äüºä
	atag[0].href = "javascript:fn_quickView('"+item.item_id+"', '"+item.sale_shop_id+"', '"+item.sale_shop_gubun_code+"');";
	
	// Àå¹Ù±¸´Ï
	//atag[1].href = "javascript:_fn_checkShopCart_(new _user_checkbox_(true), "+item.item_id+", -1, 1, "+item.item_price+");javascript:_fn_registShopCart_(false,'"+item.sale_shop_gubun_code+"',"+item.sale_shop_id+");";
	atag[1].href = "javascript:fn_goPage('fn_registCart')";
	
	// Wish List
	//atag[2].href = "javascript:_fn_checkWishList_(new _user_checkbox_(true), "+item.item_id+", -1, "+item.item_price+");javascript:_fn_registWishList_(false,'"+item.sale_shop_gubun_code+"',"+item.sale_shop_id+");";
	atag[2].href = "javascript:fn_goPage('fn_registWhishList');";	
	
	// ¹Ù·Î ±¸¸Å
	//atag[3].href = "javascript:_fn_checkShopCart_(new _user_checkbox_(true), "+item.item_id+", -1, 1, "+item.item_price+");javascript:_fn_registShopCart_(true,'"+item.sale_shop_gubun_code+"',"+item.sale_shop_id+");";
	atag[3].href = "javascript:fn_goPage('fn_registCartGoCart');";
	
	// ¿ø·¡ ÇÔ¼ö È£ÃâÇÑ´Ù.
	showIcoLayer(e,obj,width,layer,over);
}


/**
 * º£½ºÆ® ¼¿·¯ - º£½ºÆ®  top 20
 */
function fn_goTopBest(){

	location.href = host_url + "/display/bestSeller.do?method=viewBestTopAllList";
}
/**
 * º£½ºÆ® ¼¿·¯ - Ä«Å×°í¸® º£½ºÆ®
 */
function fn_goCtgBest(){

	location.href="/display/bestSeller.do?method=viewCtgBestList";
}
/**
 * º£½ºÆ® ¼¿·¯ - ¸®ºä º£½ºÆ®
 */
function fn_goReviewBest(){

	location.href="/display/bestSeller.do?method=viewReviewBestList";
}

/**
 * ºäÆ¼ - º£½ºÆ®  top 20
 */
function fn_goBeautyBestTopAll(){

	location.href="/display/beauty.do?method=viewBeautyBestTopAllList";
}

/**
 * ºäÆ¼ - ºê·£µå º£½ºÆ®
 */
function fn_goBeautyBestBrand(){

	location.href="/display/beauty.do?method=viewBeautyBrandList";
}

/**
 * ºäÆ¼ - »óÇ° º£½ºÆ®
 */
function fn_goBeautyBestItem(){

	location.href="/display/beauty.do?method=viewBeautyBestItemList";
}

/**
 * ºäÆ¼ - ¸®ºä º£½ºÆ®
 */
function fn_goBeautyReviewBest(){

	location.href="/display/beauty.do?method=viewBeautyReviewBestList";
}


/**
 * ¼îÇÎ±âÈ¹Àü¸ÞÀÎ
 */
function fn_goShoppingShop(){

	location.href = host_url + "/shop/shop.do?method=viewShoppingShop";
}


/**
 * ¼îÇÎ±âÈ¹Àü¸ÞÀÎ_Ä«Å×°í¸® »ó¼¼
 */
function fn_goShoppingShop_01(disp_ctg_id){

	location.href = host_url + "/shop/shop.do?method=searchShoppingShop&disp_ctg_id=" + disp_ctg_id+"&searchTerm=";
}



/**
 * °í°´¸¸Á·¼¾ÅÍ ¸ÞÀÎ
 */
function fn_goCustCounselMain(){
	location.href = host_url + "/cs/counsel.do?method=viewCustomerCenterMain";
}

/**
 * ÁÖ¹®¹è¼ÛÁ¶È¸
 */
function fn_goOrderDeliveryState(){
	location.href = host_url + "/mypage/myorder.do?method=searchOrderStateList&flag=1";
}

/**
 * Ãë¼Ò/±³È¯/¹ÝÇ°Á¶È¸
 */
function fn_goOrderClaimState(){

	location.href="/mypage/myorder.do?method=searchClaimStateList&flag=2";
}

/**
 * ¿µ¼öÁõ¹ßÇàÁ¶È¸
 */
function fn_goReceiptState(){

	location.href="/mypage/myorder.do?method=viewMyReceiptList";
}

// ÇÃ·¹½¬¿¡¼­ »óÇ°¿¡ ¿À¹ö µÇ´Â 4°³ÀÇ ¾ÆÀÌÄÜ Å¬¸¯½Ã
function flash_quick(num, item_info) {

	var tmpItem = item_info.split(';!;');
	var item = {item_id:tmpItem[0], unit_id:tmpItem[1], sale_shop_id:tmpItem[2], sale_shop_gubun_code:tmpItem[3], multi_unit_yn:tmpItem[4], gift_exists_yn:tmpItem[5], item_price:tmpItem[6]};
		
	tempItem = item;

	// Äüºä	
	if(num == "1") {
		fn_quickView(item.item_id, item.sale_shop_id, item.sale_shop_gubun_code);
		view_layer('lay_quickview', '780', '500');
	// Àå¹Ù±¸´Ï
	} else if(num == "2") {
		fn_goPage('fn_registCart');
		//_fn_checkShopCart_(new _user_checkbox_(true), item.item_id, -1, 1, item.last_sale_price);
		//_fn_registShopCart_(false, item.sale_shop_gubun_code, item.sale_shop_id);
	// À§½Ã ¸®½ºÆ®
	} else if (num == "3") {
		fn_goPage('fn_registWhishList');	
		//_fn_checkWishList_(new _user_checkbox_(true), item.item_id, -1, item.last_sale_price);
		//_fn_registWishList_(false, item.sale_shop_gubun_code, item.sale_shop_id);
	// ¹Ù·Î ±¸¸Å
	} else if (num == "4") {
		fn_goPage('fn_registCartGoCart');
		//_fn_checkShopCart_(new _user_checkbox_(true), item.item_id, -1, 1, item.last_sale_price);
		//_fn_registShopCart_(true, item.sale_shop_gubun_code, item.sale_shop_id);	
	}
}

/**
* È¸¿ø°¡ÀÔ
*/
function fn_goMemberJoin(){

	location.href = ssl_url + "/mypage/member.do?method=viewMemberAgreeForm";
}

/**
* È¸¿ø ¼öÁ¤_passwordchk
*/
function fn_goMemberJoinUpdChk(){
	location.href = ssl_url + "/mypage/member.do?method=getMemberInfoPasswordChk";
}

/**
* È¸¿ø ¼öÁ¤
*/
function fn_goMemberJoinUpd(){
	location.href = ssl_url + "/mypage/member.do?method=getMemberInfo";
}

/**
* ºäÆ¼Å×½ºÅÍ
*/
function fn_goBeautyTester(){

	location.href="/shop/shop.do?method=viewBeautyTesterMain";
}

/**
* ¸ô-¸ÞÀÎ
*/
function fn_goMallMain(){

	location.href = host_url + "/main.do?method=initMallMain";
}

/**
* °Ô½Ã¹° ½Å°íÇÏ±â
*/
function fn_sendReport(title, board_id, noti_seq, answ_seq, ans_seq, 
					   trgt_bbs_code, item_eval_id, item_quest_id, reply_seq, isPopup, return_url) 
{
/*
	if(typeof isPopup == "undefined" || isPopup == ""){
		isPopup = true;
	} else isPopup = false;
	
	if(typeof return_url == "undefined" || return_url == ""){
		return_url = "";
	}	
*/
	var param = "&method=insertReportForm";
	param += "&board_id=" + board_id;
	param += "&noti_seq=" + noti_seq;
	param += "&answ_seq=" + answ_seq;
	param += "&ans_seq=" + ans_seq;
	param += "&trgt_bbs_code=" + trgt_bbs_code;
	param += "&item_eval_id=" + item_eval_id;
	param += "&item_quest_id=" + item_quest_id;
	param += "&reply_seq=" + reply_seq;
	param += "&title=" + title;
	if(isPopup == "Y") {
		param += "&pop="+isPopup;
	}
	if(return_url != "") {
		param += "&return_url=" + return_url;
	}

	if (isPopup == "Y") {
		openNoScrollWin("/community/community.do", "reportpop", "½Å°íÇÏ±â", 550, 545, param, "Y");
	} else {
		location.href = "/community/community.do?" + param;
	}
}




/**
* Áñ°ÜÃ£±â
*/

function fn_goCustShop(){
	location.href = host_url + "/mypage/member.do?method=getMyCustShopList";
}

/**
* ¼îÇÎ¶ó¿îÁö
*/

function fn_goShoppingLounge(){
	location.href = host_url + "/customer/shoppinglounge.do?method=viewShoppingLoungeMain";
}

/**
* My Galleria ³ªÀÇ ÀÌº¥Æ®
*/

function fn_goMyEvent(){
	location.href = "/event/event.do?method=viewMyEventList";
}


/**
* Brand Shop
*/
function fn_goBrandShop() {
	location.href="/shop/shop.do?method=viewBrandShop";
}

/**
* ½ºÅ¸ÀÏÅ¥ºê »ó¼¼º¸±â
*/
function fn_goStyleCubeDetail(style_cube_id, sub_flag) { //1-new,2-hot,3-beauty,4-coordi,5-man's
	location.href = "/customer/shoppinglounge.do?method=viewStyleCubeImageDtl&style_cube_id="+style_cube_id+"&sub_flag="+sub_flag;
}


/**
 * Áñ°Ü Ã£±â Ãß°¡ - by ÀåÁø¼º
 * @param template_code TEMPLATE_CODE
	CODE_TEMPLATE_TYPE_CODE_CATEGORY				= "10"; //Àü½ÃÄ«Å×°í¸®
	CODE_TEMPLATE_TYPE_CODE_SHOP					= "20"; //ÀÏ¹Ý±âÈ¹¸ÅÀå
	CODE_TEMPLATE_TYPE_CODE_ETC						= "90"; //±âÅ¸ 
 * @param shop_id					Ä«Å×°í¸®¹øÈ£/SHOP¹øÈ£ 
 * @param url						URL
 */
var tmp_template_code = "";
var tmp_shop_id = "";
var tmp_url = "";
function fn_registCustShop(template_code, shop_id, url) {
	if (typeof(template_code) != "undefined" && typeof(template_code) != "null" ) tmp_template_code = template_code;
	if (typeof(shop_id) != "undefined" && typeof(shop_id) != "null" ) tmp_shop_id = shop_id;
	if (typeof(url) != "undefined" && typeof(url) != "null" ) tmp_url = url;

	var custShop = new CustShop();
	
	custShop.shop_gubun_code = tmp_template_code;
	custShop.shop_id = tmp_shop_id;
	custShop.shop_url = tmp_url;
			
	DWRMgr.registCustShop(custShop, fn_custshop_result);
}
function fn_custshop_result(result) {
	if(result == "00") {
		// º¯¼ö ÃÊ±âÈ­
		tmp_template_code = "";
		tmp_shop_id = "";
		tmp_url = "";
		alert("Áñ°ÜÃ£±â¿¡ ÀúÀåµÇ¾ú½À´Ï´Ù.");
	} else if (result == "99") {
		openLoginPop("fn_registCustShop");
	}
}	

/**
* LookBook ¹Ù·Î°¡±â
*/
function fn_goLookBook() {
	location.href = "/shop/shop.do?method=viewLookBookIntro";
}

/**
* ¸Å°ÅÁø¼¥ ¹Ù·Î°¡±â
*/
function fn_goMagazineShop() {
	location.href = "/shop/shop.do?method=viewMagazineShop";
}

//»ó´ã FAQ
/*
	»ó´ã FAQ
	param : faq_l_type_code - FAQ ´ëºÐ·ù ÄÚµå
			faq_m_type_code - FAQ ÁßºÐ·ù ÄÚµå
*/
function fn_goCounselFaq(faq_l_type_code, faq_m_type_code){

//	if( typeof(target) == "undefined" || typeof(target) == "undefined" ){

//		var param = "target=_blank"; 
		
//		location.href = "/cs/counsel.do?method=searchCounselLargeFaq&faq_l_type_code=" + faq_l_type_code + "&faq_m_type_code=" + faq_m_type_code + param;	
//	}else{

		location.href = "/cs/counsel.do?method=searchCounselLargeFaq&faq_l_type_code=" + faq_l_type_code + "&faq_m_type_code=" + faq_m_type_code;
//	}
}

/**
* ½ºÅ¸ÀÏÅ¥ºê º£½ºÆ® WIDE ¹Ù·Î°¡±â
*/
function fn_goStyleCubeBest(style_cube_id, sub_flag, cubeType, cubeFlag) { //cube_id, left/top¸Þ´ºÈ°¼º(1,2,3,4,5), WIDE/LIST, ÄÚ³Ê±¸ºÐ(1-new,2-hot,3-beauty,4-coordi,5-man's)
	location.href = "/customer/shoppinglounge.do?method=goCubeListView&style_cube_id="+style_cube_id+"&sub_flag="+sub_flag+"&cubeType="+cubeType+"&cubeFlag="+cubeFlag;
}

/**
* ºñÈ¸¿ø ¹è¼ÛÁ¶È¸ ÆË¾÷
*/
function fn_goNonMemberPop() {

	openNoScrollWin(ssl_url + '/mypage/myorder.do', 'viewNonMemberPop', 'ºñÈ¸¿ø ÁÖ¹®Á¶È¸', '460', '400', '&method=viewNonMemberPop','F');
}

// ·Î±×ÀÎ½Ã ÁÂÃø Àå¹Ù±¸´Ï, À§½Ã¸®½ºÆ®, ¹è¼Û Á¶È¸
function fn_getRiaSystem(isLogin) {
	try{
		if(typeof(isLogin) != null && typeof(isLogin) != "undefined") {
			opener = null;
		} else {
			fn_getPopLoginFlag();
		}	
								
		var param = "method=getRiaSystemAjax";
		fn_getValueByAjax("/mypage/member.do", "GET", param, false, fn_riaResult, "text");
	}catch(e){
	}
}
function fn_riaResult(return_value) {

	var obj = null;
		try {
			obj = opener.document.getElementById("ria_system");
		}catch(e){
			try {
				obj = top.document.getElementById("ria_system");
			}catch(e1){
				obj = document.getElementById("ria_system");
			}
		}

/* 2009.03.19 Å¸ ½Ã½ºÅÛ¿¡¼­ Top FrameÀ» ÀÌ¿ëÇÏ¿© galleria¼îÇÎ¸ôÀ» body frame·Î ÇÒ¶§ "¾×¼¼½º°¡ °ÅºÎµÇ¾ú½À´Ï´Ù." ¿À·ù ±Øº¹ */
/* updated By Eunho	*/
/*
	if(opener != null) {
		obj = opener.document.getElementById("ria_system");
	} else if(top != null) {
		obj = top.document.getElementById("ria_system");
	} else {
		obj = document.getElementById("ria_system");
	}
*/		
	var contents = obj.innerHTML;
	contents = return_value;
	obj.innerHTML = contents;
}

/**
* ¸íÇ°°ü ¹Ù·Î°¡±â
*/
function fn_goPrestigeShopMain() {
	location.href = "/shop/shop.do?method=viewPrestigeShopMain";
}
/*
*´ë·® ±¸¸Å
*/
function fn_goMassOrderCounsel(){

	location.href = host_url + "/cs/counsel.do?method=viewMassOrderCounselForm";
}

// ·Î±×ÀÎ½Ã »ó´Ü ·Î±×ÀÎ, È¸¿ø°¡ÀÔÀ» --> ·Î±×¾Æ¿ô, È¸¿ø°¡ÀÔ¼öÁ¤À¸·Î ¹Ù²Þ
function fn_getPopLoginFlag() {
	
	var obj_1 = null;
	var obj_2 = null;

	try {
		obj_1 = opener.document.getElementById("login_flag_1");
		obj_2 = opener.document.getElementById("login_flag_2");
	} catch(e) {
		try {
			obj_1 = top.document.getElementById("login_flag_1");
			obj_2 = top.document.getElementById("login_flag_2");
		} catch(e1) {
			obj_1 = document.getElementById("login_flag_1");
			obj_2 = document.getElementById("login_flag_2");
		}
	}

/* 2009.03.19 Å¸ ½Ã½ºÅÛ¿¡¼­ Top FrameÀ» ÀÌ¿ëÇÏ¿© galleria¼îÇÎ¸ôÀ» body frame·Î ÇÒ¶§ "¾×¼¼½º°¡ °ÅºÎµÇ¾ú½À´Ï´Ù." ¿À·ù ±Øº¹ */
/* updated By Eunho	*/
/*
	if(opener != null && typeof(opener) != "undefined") {
		obj_1 = opener.document.getElementById("login_flag_1");
		obj_2 = opener.document.getElementById("login_flag_2");
	} else if(top != null && typeof(top) != "undefined") {
		obj_1 = top.document.getElementById("login_flag_1");
		obj_2 = top.document.getElementById("login_flag_2");
	} else {
		obj_1 = document.getElementById("login_flag_1");
		obj_2 = document.getElementById("login_flag_2");
	}
*/
	var img_tag_1 = obj_1.getElementsByTagName("img");
	var img_tag_2 = obj_2.getElementsByTagName("img");
	var url_1 = replaceStr(img_tag_1[0].src, "login.gif", "logout.gif");
	var url_2 = replaceStr(img_tag_2[0].src, "join.gif", "infoedit.gif");
			
	var contents_1;
	var contents_2;
	
	contents_1 = "<a href='javascript:fn_logOut();'><img src='" + url_1 +"' alt='·Î±×¾Æ¿ô'></a>";
	contents_2 = "<a href=\"javascript:fn_goPage('fn_goMemberJoinUpd');\"><img src='"+ url_2 +"' alt='È¸¿øÁ¤º¸¼öÁ¤'></a>";
	
	obj_1.innerHTML = contents_1;
	obj_2.innerHTML = contents_2;
	
}

//½ºÅ¸ÀÏÅ¥ºê ¸¸µé±â ÆË¾÷
function fn_goStyleCubeApplication() {

	openNoScrollWin('/customer/shoppinglounge.do', 'cubeApplication', 'CUBE ¸¸µé±â', '665', '730', '&method=cubeApplication&kind=stylecube', 'Y');	
}	

//Å¥ºê½ºÅ¸ ÀÀ¸ðÆË¾÷
function fn_goCubeStarApplication() {

	openNoScrollWin('/customer/shoppinglounge.do', 'cubeApplication', 'CUBE ¸¸µé±â', '665', '730', '&method=cubeApplication&kind=cubestar', 'Y');	
}	

/**
* Denim Shop
*/
function fn_goDenimShop() {
	location.href="/shop/shop.do?method=viewDenimShopMain";
}

function fn_goDenimShopStyleSetters() {
	location.href="/shop/shop.do?method=viewDenimShopStyleSettersList";
}


/**
*ÀÌº¥Æ® ÀÀ¸ð
* event_id : ÀÌº¥Æ® ¾ÆÀÌµð 
* win_round : ´çÃ·Â÷¼ö
*/
function fn_giftconVote(event_id, win_round){
	
	var param = "&method=viewGiftConEventPop&event_id=" + event_id + "&win_round=" + win_round + "&pop_yn=T";
	
	openNoScrollWin('/event/event.do', 'eventVote', 'ÀÌº¥Æ® ÀÀ¸ð', '200', '200', param, 'Y');
	//window.open('/event/event.do?' + param, 'eventVote', 'width=280,height=345,scrollbars=no,resizable=no');
}	


/**
* °í°´Á¤º¸º¯°æ ÀÌº¥Æ®  ÀÀ¸ð
* event_id : ÀÌº¥Æ® ¾ÆÀÌµð 
* win_round : ´çÃ·Â÷¼ö
* contents : ÀÀ¿ø ¸Þ½ÃÁö
*/
function fn_giftconCustomer(event_id, win_round, hp_no){

	var param = "&method=viewGiftConEventCustomer&event_id=" + event_id + "&win_round=" + win_round + "&pop_yn=T&hp_no=" + hp_no;
	
	openNoScrollWin('/event/event.do', 'eventVote', 'ÀÌº¥Æ® ÀÀ¸ð', '280', '435', param, 'Y');
	//window.open('/event/event.do?' + param, 'eventVote', 'width=280,height=345,scrollbars=no,resizable=no');
}


/**
* ¼ö´É ÀÌº¥Æ® ÀÀ¸ð
* event_id : ÀÌº¥Æ® ¾ÆÀÌµð 
* win_round : ´çÃ·Â÷¼ö
* contents : ÀÀ¿ø ¸Þ½ÃÁö
*/
function fn_giftconVote2(event_id, win_round, contents){
	var escContents = escape(contents);
	var param = "&method=viewGiftConEventPop&event_id=" + event_id + "&win_round=" + win_round + "&pop_yn=T&contents=" + contents;
	
	openNoScrollWin('/event/event.do', 'eventVote', 'ÀÌº¥Æ® ÀÀ¸ð', '280', '435', param, 'Y');
	//window.open('/event/event.do?' + param, 'eventVote', 'width=280,height=345,scrollbars=no,resizable=no');
}

/**
* G-Illusion
*/
function fn_goG_Illusion() {
	location.href="/shop/shop.do?method=viewG_illusionMain";
}	

/**
* ±âÇÁÆ®¸ÅÀå
*/
function fn_goGiftShop() {
	location.href="/shop/shop.do?method=searchGiftShopList";
}

/**
* Æó¼â¸ÅÀå ¸ÞÀÎ
*/
function fn_goMemberShipMain() {
	location.href="/shop/shop.do?method=viewMemberShipMain";
}


/**
* Baby Shop
*/
function fn_goNewBornBabyShop() {
	location.href="/shop/shop.do?method=viewNewBornMain";
}	

/**
* ÀÌº¥Æ® ¸®½ºÆ®
*/

function fn_goEventList(){
	location.href = host_url + "/event/event.do?method=searchEventMstsList";
}

/**
* ÀÌº¥Æ® ¸ÞÀÎ
*/

function fn_goEventCouponMain(){
	location.href = host_url + "/event/event.do?method=viewEventMain";
}	


/**
* ÄíÆù °¡Á®¿À±â
*/


// ·Î±×ÀÎ½Ã ÁÂÃø Àå¹Ù±¸´Ï, À§½Ã¸®½ºÆ®, ¹è¼Û Á¶È¸
function fn_getCouponCnt() {
	
	var param = "method=getCouponCntAjax";
	fn_getValueByAjax("/mypage/mycash.do", "GET", param, false, fn_couponResult, "text");
}
function fn_couponResult(return_value) {

	var obj = null;

	obj = document.getElementById("coupon_cnt");
				
	var contents = obj.innerHTML;
	contents = return_value;
	obj.innerHTML = contents;
}

/**
* °í°´º° ÄíÆù³»¿ª °¡Á®¿À±â
*/
function fn_getMyCoupon() {

	location.href = host_url + "/mypage/mycash.do?method=listMyCoupon";
	
}

// ¹éÈ­Á¡ °¡±â
function fn_goDept() {
	window.open('http://dept.galleria.co.kr', '', '');
}


// °í°´ ´äº¯ ¿î¿µ Á¤Ã¥
function fn_goManageRule() {
	openNoScrollWin('/common/ContentsManageRule_pop.jsp', 'Rule', 'Rule', '395', '345', '', 'Y');
}


//
function fn_goLancome(disp_ctg_id) {
	location.href = host_url + "/display/beauty.do?method=viewDispctg&disp_ctg_id=" + disp_ctg_id;
}




