	/*
	*/

	var paramFlashVarsMypage	= "";
	var paramFlashVarsCustomer	= "";
	var paramFlashVarsMember	= "";
	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 = "https://member.kolon.com";
	var strFdsLoginUrl = "";
	var paramFlashVarsLogin	= "";

	var strSecureSwfUrl = "https://member.kolon.com";
	var strSwfUrl = "http://member.kolon.com";

	function SetCookie(cookieName,cookieValue,nDays) {
		document.cookie = cookieName+"="+escape(cookieValue);
	}

    //페이지 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">');
	  	 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,
					secuId					: secuId
                   };

         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();

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

		layerCustomerFlex.style.width = "100%";
		AppCustomer.style.width = "960";
		if(AppCustomer.movie != strSwfUrl + "/flex/AppCustomerBrand.swf"){
			document.getElementById('AppCustomer').movie = strSwfUrl + "/flex/AppCustomerBrand.swf";
		}else{
			AppCustomer.showCustomerFlex();
		}

		lockScroll();
	}

	function closeCustomerLayer(){
		layerCustomerFlex.style.width = "0";
		AppCustomer.style.width = "0";
		releaseScroll();
	}

	//마이페이지 창 열기
	function openMypageLayer(flval){
		closeCustomerLayer();

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

		paramFlashVarsMypage = flval;
		layerMypageFlex.style.width = "100%";
		AppMypage.style.width = "960";
		if(AppMypage.movie != strSwfUrl + "/flex/AppMypageBrand.swf"){
			document.getElementById('AppMypage').movie = strSwfUrl + "/flex/AppMypageBrand.swf";
		}else{
			AppMypage.showMypageFlex();
		}

		lockScroll();
	}
	function closeMypageLayer(){
		AppMypage.style.width = "0";
		layerMypageFlex.style.width = "0";
		releaseScroll();
	}

	//로그인 창 열기
	function openLoginLayer(flval){
		//closeLoginLayer();
		//setHash(setAddHash(flval,"app","login"));
		paramFlashVarsLogin = flval;
		layerLoginFlex.style.width = document.body.clientWidth;
		AppLogin.style.width = document.body.clientWidth;
		AppLogin.focus();
		if(AppLogin.movie != strSecureSwfUrl + "/flex/AppLogin.swf"){
			document.getElementById('AppLogin').movie = strSecureSwfUrl + "/flex/AppLogin.swf";
		}else{
			AppLogin.showLoginFlex();
		}
	}
	function closeLoginLayer(){
		layerLoginFlex.style.width = "100%";
		AppLogin.style.width = "0";
	}

	//아이디/비번찾기 창 열기
	function openFindLayer(flval){
		paramFlashVarsFind = flval;
		layerFindFlex.style.width = "100%";
		AppFind.style.width = document.body.clientWidth;
		AppFind.focus();
		if(AppFind.movie != strSecureSwfUrl + "/flex/AppFind.swf"){
			document.getElementById('AppFind').movie = strSecureSwfUrl + "/flex/AppFind.swf";
		}else{
			AppFind.showFindFlex();
		}
	}
	function closeFindLayer(){
		layerFindFlex.style.width = "100%";
		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 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();
	}

	function lockScroll() {
//		window.scroll(0, 0);
//		document.body.style.overflowY = "hidden";
	}

	function releaseScroll() {
//		document.body.style.overflowY = "scroll";
	}

	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;
	}

	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;
				}
			}
		}
	}


		/* Get the current location hash excluding the '#' symbol. */
	function getHash() {
	   // It would be nice if we could use document.location.hash here,
	   // but it's faulty sometimes.
	   var idx = document.location.href.indexOf('#');
	   return (idx >= 0) ? 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.
	   if (hash == '') hash = '#'
;
	   document.ifrm_flex.location.href = strSwfUrl + "/flex/redirect.html?"+hash
	   document.location.hash = hash;
	}

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