	// B2C 제휴 공통 헤더(2005.04.27)
	function LotteAffCommonHeader(mallcode){
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=160 marginHeight=0 marginWidth=0 name=B2CCommonHeader scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_header_html.lotte?SHOPTP=COMMON ></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	} // End of LotteAffCommonHeader 
	
	

	//B2C 제휴 공통 헤더(상단한줄)
	function LotteAffCommon2Header(mallcode){
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=160 marginHeight=0 marginWidth=0 name=B2CCommonHeader scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_header_html.lotte?SHOPTP=SINGLE&mallcode="+mallcode+"></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	} // End of LotteAffCommonHeader 



	// B2C 제휴 공통 풋터(상단한줄)
	function LotteAffCommon2Footer(mallcode){	
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td width=100%>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=226 marginHeight=0 marginWidth=0 name=B2CCommonFooter scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_footer_html.lotte?SHOPTP=SINGLE&mallcode="+mallcode+"></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	} 
	
	
	// B2C 제휴 공통 풋터(2005.04.27)
	function LotteAffCommonFooter(mallcode){	
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td width=100%>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=226 marginHeight=0 marginWidth=0 name=B2CCommonFooter scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_footer_html.lotte?SHOPTP=COMMON></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	} // End of LotteAffCommonFooter 



	/*******************************************
	 * 리브로 몰인몰 헤더 (SHOPTP=libro)
	 * 2009.11.05
	 *******************************************/

	function LotteLibroRentalHeader(mallcode){
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=120 marginHeight=0 marginWidth=0 name=B2CCommonHeader scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_header_html.lotte?SHOPTP=LIBRO></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}

	/*******************************************
	 * 리브로 몰인몰 풋터 (SHOPTP=libro)
	 * 2009.11.05
	 *******************************************/

	function LotteLibroRentalFooter(mallcode){	
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td width=100%>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=226 marginHeight=0 marginWidth=0 name=B2CCommonFooter scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_footer_html.lotte?SHOPTP=LIBRO></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}
	
	
	// 맞춤 이사서비스 헤더(2003.07.22)

	function LotteB2ELotteMovingHeader(mallcode){
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=160 marginHeight=0 marginWidth=0 name=B2CCommonHeader scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_header_html.lotte?SHOPTP=LOTTEMOVING ></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}



	// 이사서비스 풋터(2003.07.22)

	function LotteB2ELotteMovingFooter(mallcode){	
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td width=100%>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=226 marginHeight=0 marginWidth=0 name=B2CCommonFooter scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_footer_html.lotte?SHOPTP=MOVING></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}
	/*******************************************
	 * 1200M 몰인몰 헤더 (SHOPTP=1200M)
	 * 2008.07.11
	 *******************************************/

	function LotteB2E_1200MRentalHeader(mallcode) {
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=120 marginHeight=0 marginWidth=0 name=B2CCommonHeader scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_header_html.lotte?SHOPTP=1200M ></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}

	/*******************************************
	 * 1200M 몰인몰 풋터 (SHOPTP=1200M)
	 * 2008.07.11
	 *******************************************/

	function LotteB2E_1200MRentalFooter(mallcode){
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td width=100%>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=195 marginHeight=0 marginWidth=0 name=B2CCommonFooter scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_footer_html.lotte?SHOPTP=1200M></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}



	/*******************************************
	 * KTF 몰인몰 헤더 (SHOPTP=KTF)
	 * 2008.07.17
	 *******************************************/

	function LotteB2E_KTFMNSRentalHeader(mallcode){
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=160 marginHeight=0 marginWidth=0 name=B2CCommonHeader scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_header_html.lotte?SHOPTP=KTF ></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}

	/*******************************************
	 * KTF 몰인몰 푸터 (SHOPTP=KTF)
	 * 2008.07.17
	 *******************************************/

	function LotteB2E_KTFMNSRentalFooter(mallcode){	
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td width=100%>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=226 marginHeight=0 marginWidth=0 name=B2CCommonFooter scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_footer_html.lotte?SHOPTP=KTF></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}

	/*******************************************
	 * YEPP 몰인몰 헤더 (SHOPTP=YEPP)
	 * 2008.07.17
	 *******************************************/

	function LotteB2E_YEPPRentalHeader(mallcode){
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=160 marginHeight=0 marginWidth=0 name=B2CCommonHeader scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_header_html.lotte?SHOPTP=YEPP ></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}

	/*******************************************
	 * YEPP 몰인몰 푸터 (SHOPTP=YEPP)
	 * 2008.07.17
	 *******************************************/

	function LotteB2E_YEPPRentalFooter(mallcode){	
		document.write ("<center>");
		document.write ("<table height=0% width=100% border=0 cellpadding=0 cellspacing=0>");
		document.write ("	<tr> ");
		document.write ("		<td width=100%>");
		document.write ("		<IFRAME frameBorder=0 width=100% height=226 marginHeight=0 marginWidth=0 name=B2CCommonFooter scrolling=no src=http://www.lotte.com/common/include/aff/forward.aff_footer_html.lotte?SHOPTP=YEPP></IFRAME>");
		document.write ("		</td>");
		document.write ("	</tr>");
		document.write ("</table>");
		document.write ("</center>");
	}

/** 제휴사용 **/
	function newXMLHttpRequest() {
	  var xmlreq = false;
	  if (window.XMLHttpRequest) {
	    xmlreq = new XMLHttpRequest();
	  } else if (window.ActiveXObject) {
	    try {
	      xmlreq = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch (e1) {
	      try {
	        xmlreq = new ActiveXObject("Microsoft.XMLHTTP");

	      } catch (e2) {     }
	    }
	  }
	  return xmlreq;
	}

	function fnChkLogin_J(ty, tracking, frm, returl, member_gubun, fncName) {
//		document.domain = "lotte.com";
		var  reUrl  = "";
		var result = false;
		var xmlHttp = false;
		
		if (ty == null) {
			ty = "";
		}

		if ( typeof(returl) == "undefined" ) {
			returl = "";
		}
		if ( typeof(member_gubun) == "undefined" ) {
			member_gubun = "";
		}
		if ( typeof(frm) == "undefined" ) {
			frm = "";
		}
		if ( typeof(tracking) == "undefined" ) {
			tracking = "";
		}
		
		if ( typeof(fncName) == "undefined" ) {
			fncName = "";
		}
		var winName = "loginPop";
		var params = "";
		var features = "width=375,height=400,status=yes,toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes";

		xmlHttp = newXMLHttpRequest();

		var params = "";
		params = "?sty=join&tracking="+tracking+"&tobject="+frm+"&ret="+returl+"&member_gubun="+member_gubun+"&func="+fncName;
		xmlHttp.open("GET", "http://www.lotte.com/member/loginChk.lotte",true);

		xmlHttp.onreadystatechange=function() { // 2. 
			if (xmlHttp.readyState==4) {           // 4. 

				if(xmlHttp.status == 200)            // 5. 
				{
					result = xmlHttp.responseText;
					if (result == "false") {
						window.open("http://www.lotte.com/member/login/forward.LCLoginMem_pop.lotte"+params,winName,features);
					} else {
						if ( frm != "" ) {
							if (typeof(eval("document."+frm)) != "undefined" ) {
								eval("window.document."+frm).submit();
							} else {
								window.location.reload();
							}
						} else if (fncName != '') {
							eval(fncName);
						} else if (returl != "") {
							location.href = returl;
						} else {
							location.href = "http://www.lotte.com/";
							location.reload();
						}
					}
				}
			}
		}
		xmlHttp.send(null);
		return result;
	}

	fn_Logout = function(url) {
		if(userInfo != null && Const.BZ_TP_CD_B2E.equals(userInfo.getBz_tp_cd())) {
			popup({url:"http://www.lotte.com/member/goLogout.lotte", winname:"logoutPop", title:"", type:"s",param:{returnurl:url}, autoresize:false});
		}
	}

 	function getCookie( name ){
        var nameOfCookie = name + "=";
        var x = 0;
        var returnVal = "";
        var endOfCookie;
        var encodeURI;

        while ( x <= document.cookie.length ) { 
	          var y = (x+nameOfCookie.length);
	          if ( document.cookie.substring( x, y ) == nameOfCookie ) {
	                  returnVal = unescape( document.cookie.substring( y, endOfCookie ) );
	                  
	                  if ( returnVal == "1047") {
	                  	return "1";
	                  } else {
	                  	return returnVal;
	                  }
	          }
	          
	          x = document.cookie.indexOf( " ", x ) + 1;
            if ( x == 0 )
          	  break;
        }
        
        return "";
	}

