	//Àü¿ªº¯¼ö
	var paramFlashVarsLogin	= "";
	var paramFlashVarsMypage	= "";
	var paramFlashVarsCustomer	= "";
	var paramFlashVarsMember	= "";
	var paramFlashVarsShop	= "";
	var paramFlashVarsFind	= "";
	var paramFlashVarsChk	= "";
	var from_code1	= "";
	var site_const	= "";
	var loginX	= "";
	var loginY	= "";
	var loginHorizontalAlign	= "";
	var loginVerticalAlign	= "";
	var cust_id	= "";
	var cust_pass	= "";
	var strFdsUrl = "";
	var strFdsMemberUrl = "";
	var strFdsLoginUrl = "";
	var swfUrl_ssl	="";
	var strConfigUrl = "/flex/config.xml";
	var siteTitle ="";

	/**
	 * ÇÃ·¹½¬ ÆÄÀÏ¸í º¯¼ö.
	 */
	var flashShop = "ShopNew.swf";
	var flashCustomer = "AppCustomer.swf";
	var flashLogin = "AppLogin.swf";
	var flashMypage = "AppMypage.swf";
	var flashFind = "AppFind.swf";

    /**
	 * ÄíÅ° ÀÛ¼º.
	 */
	function SetCookie(cookieName,cookieValue,nDays) {
		 var today = new Date();
		 var expire = new Date();
		 if (nDays==null || nDays==0) nDays=1;
		 expire.setTime(today.getTime() + 3600000*24*nDays);
		 document.cookie = cookieName+"="+escape(cookieValue)
						 + ";expires="+expire.toGMTString();
	}

    /**
	 * ÆäÀÌÁö swf ÅÂ±× Ã³¸®
	 */
	 function swfTagWrite(swfId,swfUrl,swfWidth,swfHeight,swfWmode,swfFlashVars){
		 document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		 document.write('id="' + swfId + '" width="'+swfWidth+'" height="'+swfHeight+'"');
	  	 document.write('codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab#version=9,0,0,0">');
	  	 document.write('<param name="movie" value="'+ swfUrl +'" />');
	  	 document.write('<param name="quality" value="high" />');
	  	 document.write('<param name="wmode" value="'+ swfWmode +'" />');
	  	 document.write('<param name="flashVars" value="'+ swfFlashVars +'" />');
//	  	 document.write('<param name="bgcolor" value="#869ca7" />');
	  	 document.write('<param name="allowScriptAccess" value="sameDomain" />');
	  	 document.write('<param name="allowFullScreen" value="true" />');

	  	 document.write('<embed src="'+swfUrl+'" quality="high" bgcolor="#869ca7"');
	  	 document.write(' width="'+swfWidth+'" height="'+swfHeight+'" name="'+swfId+'" align="middle"');
	  	 document.write(' play="true"');
	  	 document.write(' loop="false"');
	  	 document.write(' quality="high"');
	  	 document.write(' flashVars="'+ swfFlashVars +'"');
	  	 document.write(' allowScriptAccess="sameDomain"');
	  	 document.write(' allowFullScreen="true"');
	  	 document.write(' type="application/x-shockwave-flash"');
	  	 document.write(' pluginspage="http://www.adobe.com/go/getflashplayer">');
	  	 document.write('</embed>');
	  	 document.write('</object>');
	 }
	/**
	 * swf¿¡¼­ È£Ãâ Àü¿ªº¯¼ö¿¡ ÀúÀåµÈ ÆÄ¶ó¹ÌÅÍ Àü´Þ
	 */
    function getFlexParams() {
        var rtnObj = new Object();

         rtnObj = {
					paramFlashVarsLogin		: paramFlashVarsLogin,
					paramFlashVarsMypage	: paramFlashVarsMypage,
					paramFlashVarsCustomer	: paramFlashVarsCustomer,
					paramFlashVarsMember	: paramFlashVarsMember,
					paramFlashVarsFind		: paramFlashVarsFind,
					from_code1				: from_code1,
					site_const				: site_const,
					loginX					: loginX,
					loginY					: loginY,
					loginHorizontalAlign	: loginHorizontalAlign,
					loginVerticalAlign		: loginVerticalAlign,
					cust_id					: cust_id,
					cust_pass				: cust_pass,
					strFdsUrl				: strFdsUrl,
					strFdsMemberUrl			: strFdsMemberUrl,
					strFdsLoginUrl			: strFdsLoginUrl,
					strConfigUrl			: strConfigUrl
                   };

         return rtnObj;

    }
	/**
	 *
	 */
	function setFlexParams(paramName,paramValue){
		//alert(document[paramName]);
		document[paramName] = paramValue;
	}

	//alert show
	function alertShow(param){
	    alert(param);
	}

    //eval Execute
    function evalExec(val){
	   eval(val);
    }
    //eval Execute Return Value
    function evalExecReturn(val){
	  return eval(val);
    }
	/**
	 * °í°´¼¾ÅÍ Ã¢¿­±â
	 */
	function openCustomerLayer(flval){
		closeMypageLayer('com');
//		closeShopLayer('com');

		setHash(setAddHash(flval,"app","customer"));

		layerCustomerFlex.style.width = "100%";
		AppCustomer.style.width = "960";
		if(AppCustomer.movie != swfUrl + flashCustomer){
			document.getElementById('AppCustomer').movie = swfUrl + flashCustomer;
		}else{
			AppCustomer.showCustomerFlex();
		}

		lockScroll();
	}
	/**
	 * °í°´¼¾ÅÍ Ã¢ ´Ý±â
	 */
	function closeCustomerLayer(cmode){
		layerCustomerFlex.style.width = "0";
		AppCustomer.style.width = "0";

		if(cmode != 'com'){
			currUrl = document.location.href;
			if(currUrl.indexOf("main_shop.jsp") != -1){
			document.location.href = "/";
			}
		}
	}
	/**
	 * ¸¶ÀÌÆäÀÌÁö Ã¢ ¿­±â
	 */
	function openMypageLayer(flval){
		closeCustomerLayer('com');
		setHash(setAddHash(flval,"app","mypage"));
		layerMypageFlex.style.width = "100%";
		paramFlashVarsMypage = flval;
		AppMypage.style.width = "960";
		if(AppMypage.movie != swfUrl + flashMypage){
			document.getElementById('AppMypage').movie = swfUrl + flashMypage;
		}else{
			AppMypage.showMypageFlex();
		}
	}
	/**
	 * ¸¶ÀÌÆäÀÌÁö Ã¢ ´Ý±â
	 */
	function closeMypageLayer(mmode){
		layerMypageFlex.style.width = "0";
		AppMypage.style.width = "0";

		if(mmode != 'com'){
			currUrl = document.location.href;
			if(currUrl.indexOf("main_shop.jsp") != -1){
			document.location.href = "/";
			}
		}
	}
	/**
	 * ¼îÇÎ¸ô ¿­±â
	 */
	function openShopLayer(flval){

		closeCustomerLayer('com');
		closeMypageLayer('com');

		var curHash = getHash();
		setHash(setAddHash(flval,"app","shop"));
		var nextHash = getHash();        //setHashÈÄ ´Ù½Ã get
		layerShopFlex.style.width = "100%";
		paramFlashVarsShop = flval;
		AppShop.style.width = "960";

		if(AppShop.movie != swfUrl + flashShop){
			document.getElementById('AppShop').movie = swfUrl + flashShop;
		}else{
			AppShop.pageChange(curHash);
		}
	}
	/**
	 * ¼îÇÎ¸ô ´Ý±â
	 */
	function closeShopLayer(smode){
		AppShop.style.width = "0";
		layerShopFlex.style.width = "0";

		if(smode != 'com'){
			currUrl = document.location.href;
			if(currUrl.indexOf("main_shop.jsp") != -1){
			document.location.href = "/";
			}
		}
	}

	/**
	 * ·Î±×ÀÎ Ã¢ ¿­±â
	 */
	function openLoginLayer(flval){
		/*  sslÀû¿ë½Ã º¸¾È¹®Á¦·Î  ÀÓ½Ã¹æÆíÀ¸·Î swf¸¦ ¸Å¹ø ·ÎµùÅä·Ï º¯°æ */
		if(AppLogin.movie != "/flex/none.swf"){
			document.getElementById('AppLogin').movie = "/flex/none.swf";
		}
		paramFlashVarsLogin = flval;
		layerLoginFlex.style.width = "100%";
		AppLogin.style.width = document.documentElement.offsetWidth;
		AppLogin.focus();
		document.getElementById('AppLogin').movie = swfUrl_ssl + flashLogin;
/*
		if(AppLogin.movie != swfUrl_ssl + flashLogin){
			document.getElementById('AppLogin').movie = swfUrl_ssl + flashLogin;
		}else{
			AppLogin.showLoginFlex();
		}
*/
	 }
	/**
	 * ·Î±×ÀÎ Ã¢ ´Ý±â
	 */
	function closeLoginLayer(){
		layerLoginFlex.style.width = "0";
		AppLogin.style.width = "0";
	}
	/**
	 * ¾ÆÀÌµð/ºñ¹øÃ£±â Ã¢ ¿­±â
	 */
	function openFindLayer(flval){
		/*  sslÀû¿ë½Ã º¸¾È¹®Á¦·Î  ÀÓ½Ã¹æÆíÀ¸·Î swf¸¦ ¸Å¹ø ·ÎµùÅä·Ï º¯°æ */

		if(AppLogin.movie != "/flex/none.swf"){
			document.getElementById('AppFind').movie = "/flex/none.swf";
		}
		paramFlashVarsFind = flval;
		layerFindFlex.style.width = "100%";
		AppFind.style.width = document.body.clientWidth;
		AppFind.focus();
			document.getElementById('AppFind').movie = strFdsMemberUrl + "/flex/" + flashFind;
/*
		if(AppFind.movie != swfUrl_ssl + flashFind){
			document.getElementById('AppFind').movie = swfUrl_ssl + flashFind;
		}else{
			AppFind.showFindFlex();
		}
*/
	}
	/**
	 * ¾ÆÀÌµð/ºñ¹øÃ£±â Ã¢ ´Ý±â
	 */
	function closeFindLayer(){
		layerFindFlex.style.width = "0";
		AppFind.style.width = "0";
	}

	/**
	 * ¸µÅ©
	 */
	function gotoLink(urlVal){
		location.href = urlVal;
	}
	/**
	 * À©µµ¿ì »õÃ¢¿­±â.
	 */
	function goUrlNew(urlVal){
		 var newWin=window.open(urlVal,"","");
	}
	/**
	 * À©µµ¿ì »õÃ¢¿­±â
	 */
	function openWindow(url){
		window.open(url, "", "width=416, height=220, scrollbars=yes, left=20, top=20");
	}
	/**
	 * À©µµ¿ì »õÃ¢¿­±â
	 */
	function openWindowFull(url,winName,winProperty){
		window.open(url, winName, winProperty);
	}
	/**
	 * ±âÁ¸È¸¿ø°¡ÀÔ ¹× ½Ç¸íÀÎÁõ Ã¢ ¶ç¿ì±â.
	 */
	function openPrejoin(url,cust_id,cust_pass){
		window.open("", "flexPrejoin", "width=416, height=220, scrollbars=yes, left=20, top=20");
		var f_name = document.f_prejoin;
		f_name.cust_id.value = cust_id;
		f_name.cust_pass.value = cust_pass;
		f_name.from_code1.value = from_code1;
		f_name.site_const.value = site_const;
		f_name.target = "flexPrejoin";
		f_name.action = url;
		f_name.submit();
	}

	/**
	 * ÆäÀÌÁö ¸®·Îµù.
	 */
	function pageReload(){
		location.reload();
	}
	/**
	 * hash¿¡ °ª Ãß°¡.
	 */
	function setAddHash(curHash,hashName,hashVal){
		var returnHash = "";
		var changeOk = "";
		if(curHash != ""){
			var arrCurHash = curHash.split("&");
			for(var i=0; i<arrCurHash.length; i++){
				var arrCurHashSplit = arrCurHash[i].split("=");
				var curHashName = arrCurHashSplit[0];
				var curHashVal = arrCurHashSplit[1];
				if(curHashName == hashName){
					curHashVal = hashVal;
					changeOk = "yes";
				}
				if(returnHash != "") returnHash = returnHash + "&";
				if(curHashName!="")	returnHash = returnHash + curHashName + "=" + curHashVal;
			}
		}

		if(changeOk=="")returnHash = returnHash + "&" + hashName + "=" + hashVal;
		return returnHash;
	}
	/**
	 * ÆäÀÌÁö ·Îµù½Ã hash¸¦ ÅëÇÑ ApplicationÈ£Ãâ.
	 */
	function getFirstApp(){
		var	str = getHash();
		var arrUrl = str.split("&");
		for(var i=0; i<arrUrl.length; i++){
			var tmpVal = arrUrl[i].split("=");
			if(tmpVal[0] == "app"){
				switch(tmpVal[1]){
					case "mypage":
						openMypageLayer(str);
						break;
					case "customer":
						openCustomerLayer(str);
						break;
					case "login":
						openLoginLayer(str);
						break;
					case "shop":
						openShopLayer(str);
						break;
				}
			}
		}
	}


		/* Get the current location hash excluding the '#' symbol. */
	function getHash() {
	   var idx = document.location.href.indexOf('#');
	   var idxFlex =decodeURI(document.location.href.substr(idx+1));
		if (idx < 0){
			return decodeURI(document.location.href.substr(idx+1))
		} else {
			var idxShop = idxFlex.indexOf('app=shop');
			if (idxShop >=0){
			   	var paramsArray = idxFlex.split("&");
			   	var map = "";
				for (j = 0; j < paramsArray.length; j++){
					var param =  paramsArray[j];
					var index = param.indexOf("=");
						if (index > 0) {
							var kk = param.substr(index + 1);
							if (param.substr(index + 1).toUpperCase() != "SHOP"){
								map += param.substr(index + 1) +"/";
							}
						}
				}
	 			var tmp = map.split("/");
				var i=0;

				for (i = 0; i < tmp.length; i++){
				//¸ðµâ °ª¿¡ µû¸¥ ÆäÀÌÁö º¯È¯È£Ãâ.
				switch (tmp[0].toUpperCase()) {
					case "CATEGORY" :
						location.href="/shop/list.jsp?category_id="+tmp[4]+"&category_cl="+tmp[8];
						break;
					case "CATEGORYMAIN" :
						location.href="/shop/list.jsp?category_id="+tmp[3]+"&category_cl="+tmp[4];
						break;
					case "COORDIROOM" :
						location.href="/shop/coordiRoom.jsp";
						break;
					case "COORDIROOM_DETAIL" :
						location.href="/shop/coordiRoom.jsp";
						break;
					case "PLUSSHOP" :
						location.href="/shop/list.jsp?category_id="+tmp[9];
						break;
					case "PRODUCT" :
						location.href="/shop/item/itemDetail.jsp?item_id="+tmp[1];
						break;
					case "INPRODUCT" :
					location.href="/shop/intoProduct/intoProduct.jsp";
						break;
					case "REVIEW" :
						location.href="/shop/itemCommentList.jsp";
						break;
					case "SALE" :
						location.href="/shop/list.jsp?category_id="+tmp[1];
						break;
					case "SEARCH" :
						location.href="/shop/searchMain.jsp?search_word="+tmp[1];
						break;
					case "SPECIAL" :
						location.href="/shop/special.jsp";
						break;
					case "SPECIAL_MAIN" :
						location.href="/shop/special.jsp";
						break;
					case "LINE" :
						location.href="/shop/lineList.jsp";
						break;
					case "LINE_MAIN" :
						location.href="/shop/lineList.jsp";
						break;
					case "STYLE" :
						location.href="/shop/styleList.jsp";
						break;
					case "EVENT" :
						break;
					case "EVENT_MAIN" :
						location.href="/shop/main.jsp";
						break;
					case "MAIN" :
						location.href="/shop/main.jsp";
					default :
						return "";
						break;
					}
				}
			} else {return decodeURI(document.location.href.substr(idx+1));}
		}
	}


	/* Get the current location hash excluding the '#' symbol. */
	function setHash(hash) {
	   // It would be nice if we could use document.location.hash here,
	   // but it's faulty sometimes.
		document.title= siteTitle;
	   var redirect = hash;

	   if (redirect.indexOf("param=Category") != -1){

	   	   var split= hash.split('/');
	   	   redirect = split[0]+"/"+split[1]+"/"+split[2]+"/"+split[3]+"/"+split[4]+"//";

	   }
	   if (hash == '') hash = '#';

	   document.ifrm_flex.location.href = swfUrl + "redirect.html?"+redirect;
	   document.location.hash = hash;
	}

	/* Get the current location href */
	function getHref() {
		// Simply return the location href
		return document.location.href;
	}

	/**ÇÃ·¡½¬ ¸µÅ© */
	function flashLink(val){
		openShopLayer(val);
		//setHash(val);
		//AppShop.pageChange();
	}
	/**ÇÃ·¡½¬ ¸µÅ© */
	function flashLink2(val){
		document.location.href = "/shopping/main_shop.jsp"+val;
	}
	function shopSearch(strSearch){
		openShopLayer("app=shop&param=Search/"+strSearch);
	}

	function initializeInipay() {
		document.ifrm_inipay.location.href = swfUrl + "inipay41.html";
	}

	function removeInipay() {
		document.ifrm_inipay.location.href = "about:blank";
	}

	function executeInipay(obj) {
		return document.ifrm_inipay.executeInipay(obj);
	}

	function requestInipay() {
		AppShop.requestInipay();
	}


	function paySuccess(obj){

//			alert(obj.POINT_CY_AMT
		AppShop.paySuccess(obj);
	}

	function payFail(){
		AppShop.payFail();
	}


	/******************************************************************/
	// Mypage¿¡¼­ ½Å¿ëÄ«µå °áÁ¦ÇÏ±â Ã³¸®ÇÏ´Â ÇÔ¼ö
	/******************************************************************/
	function mypage_initializeInipay() {
		document.ifrm_inipay.location.href = swfUrl + "mypage_inipay41.html";
	}

	function mypage_removeInipay() {
		document.ifrm_inipay.location.href = "about:blank";
	}

	function mypage_executeInipay(obj) {
		return document.ifrm_inipay.mypage_executeInipay(obj);
	}

	function mypage_requestInipay() {
		AppMypage.mypage_requestInipay();
	}


	function mypage_paySuccess(obj){
		AppMypage.mypage_paySuccess(obj);
	}

	function mypage_payFail(){
		AppMypage.mypage_payFail();
	}
	/******************************************************************/


	var tmpHtml = "";
	function getHtmlHeight(htmlVal){
		htmlForm.action=swfUrl + "getHtmlHeight.jsp";
		htmlForm.htmlVal.value = htmlVal;
		htmlForm.submit();
	}
	function giveHtml(val){
		AppShop.setHtmlHeight(val);
	}
	/** OVERTURE Ãß°¡ °áÁ¦¿Ï·áÈÄ **/
	function setOverTure(item_id,org_amt,val){
		document.ifrm_html.location.href = swfUrl + "overture.jsp?item_id=" + item_id + "&ORG_AMT="+org_amt+"&val="+val;
	}
	/** OVERTURE Ãß°¡ °áÁ¦ ¿Ï·áÀü **/
	function setOverTure2(userId,org_amt,val){
		document.ifrm_html.location.href = swfUrl + "overture2.jsp?userId=" + userId + "&ORG_AMT="+org_amt+"&val="+val;
	}
	function viewCart(){
		AppShop.viewCart();
	}
	function pageReloadAndChannelCheckDate(){
		document.ifrm_html.location.href = "/authChannel/channelCheck.jsp";
	}
