//lotte_index.jsp


function flash_CM(_rootDomain, _flashType){

  var mensUrl = '/lotte/sitemap/mens_index.jsp?tracking=MH_RIGHTLOGO_03';
	var mainLogUrl = '';
	//mainLogUrl += '&rootDomain=http://www.lotte.com'; // ·çÆ®µµ¸ÞÀÎ
	mainLogUrl += '&rootDomain='+_rootDomain; // ·çÆ®µµ¸ÞÀÎ
	mainLogUrl += '&comMainLogoUrl=/'; // ·Ôµ¥´åÄÄ ¸ÞÀÎ·Î°í URL
	mainLogUrl += '&deptMainLogoUrl=/lotte/sitemap/dpt_index.jsp?tracking=GCB_DPTLOGO'; // ·Ôµ¥¹éÈ­Á¡ ¸ÞÀÎ·Î°í URL
	mainLogUrl += '&youngMainLogoUrl=/lotte/sitemap/young_index.jsp?tracking=GCB_YPLLOGO'; // ¿µÇÃ¶óÀÚ ¸ÞÀÎ·Î°í URL
	mainLogUrl += '&foodMainLogoUrl=/lotte/sitemap/food_index.jsp'; // ·Ôµ¥½ÄÇ°°ü ¸ÞÀÎ·Î°í URL

	mensUrl = encodeURIComponent(mensUrl);//url encode
	mainLogUrl += '&mensMainLogoUrl= '+mensUrl; // ¸àÁî ¸ÞÀÎ·Î°í URL
    flashCM('http://flash.lotte.com/lotte/flash/GnbLeft.swf', '201', '799',
             'swfPath=http://image.lotte.com/lotte/flash/&callbackLink=callbackLink&callbackMouseLeave=callbackMouseLeave&callbackTabOver=callbackTabOver&xmlURL=http://image.lotte.com/lotte/flash/xml/main/flashGnbMain.xml'+_flashType+mainLogUrl,
             '#ffffff', 'transparent', 'GnbLeft');
    var _global_page = "page_lotte_com";
}


function callbackLink(_link, _target) {
	var link = _link;
	var target = _target;
	if (target == '_top') {
		top.location.href = link;
	} else if (target == '_self') {
		self.location.href = link;
	} else if (target == '_blank') {
		window.open(link,"","");
	} else {
		location.href = link;
	}
	return false;
}


function callbackTabOver(_page){
	if (typeof _isMainGCB == "undefined"){
		var movie;
		if (navigator.appName.indexOf("Microsoft") != -1){
			movie = window["GnbLeft"];
		} else {
			movie =  document["GnbLeft"];
		}

		if(_page == "page_lotte_com")
			movie.height = 799;
		else if(_page == "page_lotte_dept")
			movie.height = 543;
		else if(_page == "page_young")
			movie.height = 543;
		else if(_page == "page_mens")
			movie.height = 543;
		else if(_page == "page_food")
			movie.height = 543;
	}
}


function callbackMouseLeave(_page) {
	var movie;

	if (navigator.appName.indexOf("Microsoft") != -1) {
		movie = window["GnbLeft"];
	} else {
		movie =  document["GnbLeft"];
	}

	if (typeof _isMainGCB != "undefined"){
		if (_isMainGCB === true)
			movie.height = 799;
	}else if (_page == "page_lotte_dept" || _page == "page_young" || _page == "page_mens" || _page == "page_food"){
		movie.height = 543;
	}else{
		movie.height = 799;
	}
	movie.width = 201;
}


function callbackSubMenu() {
	var movie;
	if (navigator.appName.indexOf("Microsoft") != -1) {
		movie = window["GnbLeft"];
	} else {
		movie = document["GnbLeft"];
	}

	movie.width = 299;
	movie.height = 799;
}


//LCCommonHeader.jsp
/*************************************************************
·Î±×ÀÎ Ã³¸®
*************************************************************/
function goLogin(url){
	var wd = 441;
	var he = 390;
	win = window.open(url, 'lotte_login', 'toolbar=0, menubar=0, status=no, scrollbars=no, resizable=no, WIDTH=' + wd +', HEIGHT=' + he + ';');
}


/*************************************************************
°Ë»ö : ¼öÁ¤(°Ë»öÃ¢±¤°í ¼­ºñ½ºÃß°¡ 2008.09.26)
*************************************************************/
function handlePress(e){
	var whichCode = (window.Event) ? e.which : e.keyCode;
	if (e.keyCode == 13) {
	   topSub();
	}
}


function CheckStr(strOriginal, strFind, strChange){
	var position, strOri_Length;
	position = strOriginal.indexOf(strFind);
	while (position != -1){
	  strOriginal = strOriginal.replace(strFind, strChange);
	  position    = strOriginal.indexOf(strFind);
	}
	strOri_Length = strOriginal.length;
	return strOri_Length;
}


function cob_alert() {
	alert('¼­ºñ½º Á¡°ËÁßÀÔ´Ï´Ù.');
	return ;
}


function selectFLD(FLD, fldText){
	document.frmSearch.SRCHFIELD.value=FLD;
	$('searchFLDDiv').update(fldText);
	$('main_search_sel').style.display="none";
}


var blgnbAllCategory = false;
function swfComplete(){
	blgnbAllCategory = true;
}

function callbackLink(_link, _target){
	if(_target=='_top'){
		top.location.href = _link;
	}else if(_target=='_self'){
		self.location.href = _link;
	}else{
		self.location.href = _link;
	}
	return false;
}


function toggleDiv(name, val){
	if(document.getElementById(name).style.display != val) {
		document.getElementById(name).style.display = val;
	}
}


function toggleDiv2(name) {
	if(document.getElementById(name).style.display == "none") {
		document.getElementById(name).style.display = "block";
	} else {
		document.getElementById(name).style.display = "none";
	}
}


function flashCallback(param){
	window.open(param,'move');
}


function menuOpen_lotte(){
	var movie;
	//FullDownMenu Object,EmbedÀÇ id,nameÀÇ ÀÌ¸§ÀÔ´Ï´Ù.
	if (navigator.appName.indexOf("Microsoft") != -1){
		movie = window["FullDownMenu"];
	}else{
		movie =  document["FullDownMenu"];
	}
	movie.height = 133;
}


function menuClose_lotte(){
	var movie;
	//FullDownMenu Object,EmbedÀÇ id,nameÀÇ ÀÌ¸§ÀÔ´Ï´Ù.
	if (navigator.appName.indexOf("Microsoft") != -1){
		movie = window["FullDownMenu"];
	}else{
		movie =  document["FullDownMenu"];
	}
	movie.height = 20;
}


function flashCMHeader(_SIMAGE_ROOT_,MALLCODE,rootDomain,strFlashRoot,strCaALLType,dispGb,b2ceGb,strGb){
	var strB2e = "";
	var data = '';

	if(MALLCODE == "-33" || MALLCODE == "-43" || MALLCODE == "-44" || MALLCODE == "-49"
	 || MALLCODE == "-50" || MALLCODE == "-2017" || MALLCODE == "-2030" || MALLCODE == "-2027" || MALLCODE == "-2033" ) {
	 	dispGb = "02";
		data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_zze.png$$ÇØ¿Ü»óÇ°¸ô ÂÅ$$$$/lotte/sitemap/category/LCCategoryHome_ZZE.jsp?curDispNo=044126&curDepth=2&tracking=GCB_ZZE$$25$$_self&&';
		data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_allthat.png$$¸íÇ°È­ÀåÇ° Ä¿¹Â´ÏÆ¼$$$$/lotte/sitemap/allthatbeauty/LCAllThatBeautyMain.jsp?tracking=M_COMMUNITY_2$$35$$_self&&';
		data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_coffee.png$$Ä¿ÇÇ¹Ú½º$$$$/lotte/sitemap/category/LCCategoryHome_006.jsp?curDispNo=044146&curDepth=2&tracking=GCB_COFFEE$$53$$_self&&';
		data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_oulet.png$$·Ôµ¥¾Æ¿ï·¿$$$$http://mall.lotteoutlets.com/lo_index.jsp?tracking=M_MALL_11$$19$$_blank';
	} else if (MALLCODE == "-9") {
		strB2e = "B2E";
		dispGb = "03";
	} else {
		//strB2e = "B2E";
		/*
		var data = '0$$02$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_insu.png$$º¸Çè$$$$/lotte/sitemap/common/LCMovePageForTracking.jsp?tracking=GCB_INSU&amp;url=http://insu.lotte.com/insurance/index.jsp$$_self&&';
			data += '0$$02$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_book.png$$µµ¼­$$$$/lotte/sitemap/common/LCMovePageForTracking.jsp?tracking=GCB_BOOK&amp;url=http://book.lotte.com$$_self&&';
			data += '0$$02$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_ticket.png$$Æ¼ÄÏ$$$$/lotte/sitemap/common/LCMovePageForTracking.jsp?tracking=GCB_TICKET&amp;url=http://ticket.lotte.com/Home/Main.aspx$$_self&&';
			data += '0$$03$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_book.png$$µµ¼­$$$$/lotte/sitemap/common/LCMovePageForTracking.jsp?tracking=GCB_BOOK&amp;url=http://book.lotte.com$$_self&&';
			data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_zze.png$$ÇØ¿Ü»óÇ°¸ô ÂÅ$$$$/lotte/sitemap/category/LCCategoryHome_ZZE.jsp?curDispNo=044126&curDepth=2&tracking=GCB_ZZE$$_self&&';
			data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_uniqlo.png$$À¯´ÏÅ¬·Î$$$$/lotte/sitemap/common/LCMovePageForTracking.jsp?tracking=GCB_UNIQLO&amp;url=http://www.uniqlo.kr/Lap.jsp?site=9000008998&mngID=$:LCMAIL_USER_SHOPPING.MNGNO:$&template=index.jsp$$_self&&';
			data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_super.png$$·Ôµ¥½´ÆÛ$$$$/lotte/sitemap/common/LCMovePageForTracking.jsp?tracking=GCB_SUPER&amp;url=http://super.lotte.com/affi/affiliationMain.action$cooper_id=110682$$_self&&';
			data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_ns.png$$³ó¼ö»ê ½ÄÇ°°ü$$$$/lotte/sitemap/category/LCCategoryHome_NS.jsp?curDispNo=044174&curDepth=2&tracking=GCB_NS$$_self&&';
			data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_m_community.png$$¿Ã´ñºäÆ¼$$¸íÇ°È­ÀåÇ° Ä¿¹Â´ÏÆ¼$$/lotte/sitemap/allthatbeauty/LCAllThatBeautyMain.jsp?tracking=M_COMMUNITY_2$$_self&&';
			data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_ecoupon.png$$e-ÄíÆù¸ô$$ÇÒÀÎ, ¼±¹°ÄíÆù$$/lotte/sitemap/category/LCCategoryHomeOnlineCoupon.jsp?curDispNo=044181&curDepth=2$$_self&&';
			data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_ink.png$$À×Å©¼­Ä¡$$ÇÁ¸°ÅÍ.À×Å© Àü¹®¸ÅÀå$$/lotte/sitemap/category/LCCategoryJungcaInk.jsp?curDispNo=044103033&curDepth=3&tracking=GCB_INK$$_self&&';
			if(strGb == 1){
				data += '1$$01$$http://image.lotte.com/lotte/images/renewal/common/icon/icon_new_coffee.png$$Ä¿ÇÇ¹Ú½º$$$$/lotte/sitemap/category/LCCategoryHome_006.jsp?curDispNo=044146&curDepth=2&tracking=GCB_COFFEE$$_self';
			}else{
				data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_new_coffee.png$$Ä¿ÇÇ¹Ú½º$$$$/lotte/sitemap/category/LCCategoryHome_006.jsp?curDispNo=044146&curDepth=2&tracking=GCB_COFFEE$$_self';
			}
		*/
		data +=  '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_zze.png$$ÇØ¿Ü»óÇ°¸ô ÂÅ$$$$/lotte/sitemap/category/LCCategoryHome_ZZE.jsp?curDispNo=044126&curDepth=2&tracking=GCB_ZZE$$25$$_self&&';
		data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_allthat.png$$¸íÇ°È­ÀåÇ° Ä¿¹Â´ÏÆ¼$$$$/lotte/sitemap/allthatbeauty/LCAllThatBeautyMain.jsp?tracking=M_COMMUNITY_2$$35$$_self&&';
		data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_coffee.png$$Ä¿ÇÇ¹Ú½º$$$$/lotte/sitemap/category/LCCategoryHome_006.jsp?curDispNo=044146&curDepth=2&tracking=GCB_COFFEE$$53$$_self&&';
		data += '1$$01$$'+_SIMAGE_ROOT_+'/lotte/images/renewal/common/icon/icon_oulet.png$$·Ôµ¥¾Æ¿ï·¿$$$$http://mall.lotteoutlets.com/lo_index.jsp?tracking=M_MALL_11$$19$$_blank';
	}

	data = encodeURIComponent(data);
	var mens = rootDomain+'/lotte/sitemap/category/LCCategoryHome_Mens.jsp?curDispNo=045130&curDepth=2';
	mens = encodeURIComponent(mens);
	var mensUrl = '/lotte/sitemap/mens_index.jsp?tracking=GCB_MENLOGO';
	var mainLogUrl = '';
		mainLogUrl += '&comMainLogoUrl=/'; // ·Ôµ¥´åÄÄ ¸ÞÀÎ·Î°í URL
		mainLogUrl += '&deptMainLogoUrl=/lotte/sitemap/dpt_index.jsp?tracking=GCB_DPTLOGO'; // ·Ôµ¥¹éÈ­Á¡ ¸ÞÀÎ·Î°í URL
		mainLogUrl += '&youngMainLogoUrl=/lotte/sitemap/young_index.jsp?tracking=GCB_YPLLOGO'; // ¿µÇÃ¶óÀÚ ¸ÞÀÎ·Î°í URL
		mainLogUrl += '&foodMainLogoUrl=/lotte/sitemap/food_index.jsp'; // ·Ôµ¥½ÄÇ°°ü ¸ÞÀÎ·Î°í URL
		mensUrl = encodeURIComponent(mensUrl);//url encode
		mainLogUrl += '&mensMainLogoUrl= '+mensUrl; // ¸àÁî ¸ÞÀÎ·Î°í URL
	flashCM(strFlashRoot+"/lotte/flash/GnbAllCategory.swf", "1", "1", "swfPath="+_SIMAGE_ROOT_+"/lotte/flash/&mensLink="+mens+"&callbackClose=menuClose&callbackMouseLeave=menuClose&callbackLink=mainBannerLink&page="+strCaALLType+"&data="+data+"&dispGb="+dispGb+"&deptYn=Y&b2ce="+b2ceGb+"&rootDomain="+rootDomain+mainLogUrl+"&xmlURL="+_SIMAGE_ROOT_+"/lotte/flash/xml/main/GnbAllCategory"+strB2e+".xml", "#ffffff", "transparent", "GnbAllCategory");
}


function flashCMMallCd(strFlashRoot, rootDomain, strMallCd){
	var swf = '';
	var vars = '';
	var id = '';
	if(strMallCd == "1"){
		var link1 = '/lotte/sitemap/dpt_index.jsp?tracking=H1_RIGHTLOGO_01';
		var link2 = '/lotte/sitemap/young_index.jsp?tracking=H1_RIGHTLOGO_02';
		var link3 = '/lotte/sitemap/mens_index.jsp?tracking=H1_RIGHTLOGO_03';
		link3 = encodeURIComponent(link3);
		swf = strFlashRoot+'/lotte/flash/091207_lottemain_gcb01_top03.swf';
		vars = 'link1='+link1+'&link2='+link2+'&link3='+link3+'&target1=_self&target2=_self&target3=_self&rootDomain='+rootDomain+'&callbackLink=callbackLink';
		id = '091207_lottemain_gcb01_top03';
	}else if(strMallCd == "2"){
		var link1 = '/lotte/sitemap/young_index.jsp?tracking=H2_RIGHTLOGO_01';
		var link2 = '/lotte/sitemap/mens_index.jsp?tracking=H2_RIGHTLOGO_02';
		swf = strFlashRoot+'/lotte/flash/091208_GNB_B1_De_01_top02.swf';
		vars = 'link1='+link1+'&link2='+encodeURIComponent(link2)+'&target1=_self&target2=_self&rootDomain='+rootDomain+'&callbackLink=callbackLink';
		id = '091208_GNB_B1_De_01_top02';
	}else if(strMallCd == "3"){
		var link1 = '/lotte/sitemap/dpt_index.jsp?tracking=H3_RIGHTLOGO_01';
		var link2 = '/lotte/sitemap/mens_index.jsp?tracking=H3_RIGHTLOGO_02';
		swf = strFlashRoot+'/lotte/flash/091208_GNB_B1_Young_01_top02.swf';
		vars = 'link1='+link1+'&link2='+encodeURIComponent(link2)+'&target1=_self&target2=_self&rootDomain='+rootDomain+'&callbackLink=callbackLink';
		id = '091208_GNB_B1_Young_01_top02';
	}else if(strMallCd == "4"){
		var link1 = '/lotte/sitemap/dpt_index.jsp?tracking=H4_RIGHTLOGO_01';
		var link2 = '/lotte/sitemap/young_index.jsp?tracking=H4_RIGHTLOGO_02';
		swf = strFlashRoot+'/lotte/flash/091207_GNB_B1_Mens_011_top02.swf';
		vars = 'link1='+link1+'&link2='+link2+'&target1=_self&target2=_self&rootDomain='+rootDomain+'&callbackLink=callbackLink';
		id = '091207_GNB_B1_Mens_011_top02';
	}else if(strMallCd == "5"){
		var link1 = '/lotte/sitemap/young_index.jsp?tracking=H2_RIGHTLOGO_01';
		var link2 = '/lotte/sitemap/mens_index.jsp?tracking=H2_RIGHTLOGO_02';
		swf = strFlashRoot+'/lotte/flash/091208_GNB_B1_De_01_top02.swf';
		vars = 'link1='+link1+'&link2='+encodeURIComponent(link2)+'&target1=_self&target2=_self&rootDomain='+rootDomain+'&callbackLink=callbackLink';
		id = '091208_GNB_B1_De_01_top02';
	}else if(strMallCd == "6"){
		var link1 = '/lotte/sitemap/dpt_index.jsp?tracking=MM_RIGHTLOGO_01';
		var link2 = '/lotte/sitemap/young_index.jsp?tracking=MM_RIGHTLOGO_02';
		var link3 = '/lotte/sitemap/mens_index.jsp?tracking=H1_RIGHTLOGO_03';
		link3 = encodeURIComponent(link3);
		swf = strFlashRoot+'/lotte/flash/100719_lottemain_gcb01_top02_W.swf';
		vars = 'link1='+link1+'&link2='+link2+'&link3='+link3+'&target1=_self&target2=_self&target3=_self&rootDomain='+rootDomain+'&callbackLink=callbackLink';
		id = '100719_lottemain_gcb01_top02_W';
	}
	if(strMallCd == "6"){
		flashCM(swf,'291','72',vars,'#ffffff','transparent',id);
	}else{
		flashCM(swf,'281','72',vars,'#ffffff','transparent',id);
	}
}


function flashCMMallCd2(strTrackingType, strFlashRoot, rootDomain){
	var link11 = '/lotte/sitemap/dpt_index.jsp?tracking='+strTrackingType+'RIGHTLOGO_01';
	var link22 = '/lotte/sitemap/young_index.jsp?tracking='+strTrackingType+'RIGHTLOGO_02';
	var link33 = '/lotte/sitemap/mens_index.jsp?tracking='+strTrackingType+'RIGHTLOGO_03';
	link33 = encodeURIComponent(link33);
	flashCM(strFlashRoot+'/lotte/flash/091207_lottemain_gcb01_top02.swf','296','50','callbackLink=callbackLink&link1='+link11+'&link2='+link22+'&link3='+link33+'&target1=_self&target2=_self&target3=_self&rootDomain='+rootDomain,'#ffffff','transparent','091207_lottemain_gcb01_top02');
}
//LCCommonFooter.jsp
function MM_findObj(n, d) { //v4.0
	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=MM_findObj(n,d.layers[i].document);
	if(!x && document.getElementById) x=document.getElementById(n); return x;
}


function MM_showHideLayers() { //v3.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }
    obj.visibility=v; }
}


function viewTime(n){
	var layer_foot01 = document.getElementById('layer_foot02');
	if(n=='0'){
		layer_foot01.style.display = 'block';
	}else if(n=='1'){
		layer_foot01.style.display = 'none';
	}
}


function viewOline(n){
	var layer_foot02 = document.getElementById('layer_foot01');
	if(n=='0'){
		layer_foot02.style.display = 'block';
	}else if(n=='1'){
		layer_foot02.style.display = 'none';
	}
}


function shoppingPassportOpen() {
	msgOpen();
	var objAjax = new Ajax.Request(
			"/lotte/sitemap/member/LCShoppingPassport.jsp",
            {
                method: "post",
                parameters:"",
                onLoading : showSPProgress,
                onComplete: showSPResponse
            });
}


function showSPResponse(originalRequest){
    $("passport_zone").update(originalRequest.responseText);
    var height = $("passport_zone").clientHeight;
    $("passport_zone_iframe").style.height = height +"px";
    $("passport_zone_iframe").style.display="block";
}


function shoppingPassportClose(){
	msgClose();
	$("passport_zone_iframe").style.display="none";
}


function shoppingPassportTabAjax(url) {
	var objAjax = new Ajax.Request(
            url,
            {
                method: "post",
                parameters:"",
                onLoading : showSPTabProgress,
                onComplete: showSPTabResponse
            });
}


function showSPTabResponse(originalRequest){
    $("shoppingPassportTabAjax").update(originalRequest.responseText);
    $("shoppingPassportTabAjax").style.display="block";
}


function showSPTabProgress(originalRequest){
	$("shoppingPassportTabAjax").update("<div style=\"height:117px;width:100%;text-align:center;padding-top:40px;\"><img src=\"https://simage.lotte.com/lotte/images/lotte_progress.gif\"></div>");
    $("shoppingPassportTabAjax").style.display="block";
}