try {
	// flick ¹æÁö
	document.execCommand('BackgroundImageCache', false, true);
} catch(e) {}


document.title = '[·Ôµ¥¹éÈ­Á¡] "Always with you"';


/*
** ÁöÁ¡ »ó¼¼ º¸±â RIA
*****************************/
document.write('<span id="branchRiaArea"></span>');
	
function openRIA(_branchCode) {
  
	if (_branchCode==null) _branchCode = "001";
	scrollTo(0,0);
	var riaArea = document.getElementById("branchRiaArea");
	var browserWidth = document.body.clientWidth;
	var documentWidth = document.body.scrollWidth;
	var browserHeight = document.body.clientHeight;
	var documentHeight = document.body.scrollHeight;
	var sWindowWidth = (documentWidth>browserWidth) ? documentWidth : browserWidth;
	var sWindowHeight = (documentHeight>browserHeight) ? documentHeight : browserHeight;
	var swfPath = "/common/flash/RIA.swf?branchCode="+_branchCode+"&branchCodeUrl=/xml/code_branch_new.xml";
	var sHTML = '';
	sHTML += '<table cellpadding="0" cellspacing="0" border="0" style="position:absolute;left:0px;top:0px;z-index:1000;width:100%;height:'+ sWindowHeight+ '">\n';
	sHTML += '<tr><td>\n';
	sHTML += '<object id="branchRiaFlash" width="100%" height="100%" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
	sHTML += '<param name="allowScriptAccess" value="sameDomain" />\n';
	sHTML += '<param name="movie" value="'+swfPath+'" />\n';
	sHTML += '<param name="bgcolor" value="#000000" />';
	sHTML += '<param name="wmode" value="transparent" />\n';
	sHTML += '<param name="menu" value="false" />\n';
	sHTML += '<param name="quality" value="high" />\n';
	sHTML += '<embed src="'+swfPath+'" name="branchRiaFlash" width="100%" height="100%" wmode="transparent" bgcolor="#000000" menu="false" quality="high" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
	sHTML += '</object>\n';
	sHTML += '</td></tr>\n';
	sHTML += '</table>\n';
	if (riaArea) {
		riaArea.innerHTML = sHTML;
	}
}

function closeRIA() {
	var riaArea = document.getElementById("branchRiaArea");
	if (riaArea) riaArea.innerHTML = "";
}
/*
** 20080918 ÀÌµ¿ÆÈ ¹éÈ­Á¡ ¸ÞÀÎ°³¼± Ãß°¡
*****************************/
function openGuideEvent(_branchCode) {
	if (_branchCode==null) _branchCode = "001";
	scrollTo(0,0);
	var riaArea = document.getElementById("branchRiaArea");
	var browserWidth = document.body.clientWidth;
	var documentWidth = document.body.scrollWidth;
	var browserHeight = document.body.clientHeight;
	var documentHeight = document.body.scrollHeight;
	var sWindowWidth = (documentWidth>browserWidth) ? documentWidth : browserWidth;
	var sWindowHeight = (documentHeight>browserHeight) ? documentHeight : browserHeight;
	var swfPath = "/common/flash/guide_event.swf";
	var sHTML = '';
	sHTML += '<table cellpadding="0" cellspacing="0" border="0" style="position:absolute;left:0px;top:0px;z-index:1000;width:100%;height:'+ sWindowHeight+ '">\n';
	sHTML += '<tr><td>\n';
	sHTML += '<object id="branchRiaFlash" width="100%" height="100%" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
	sHTML += '<param name="allowScriptAccess" value="sameDomain" />\n';
	sHTML += '<param name="movie" value="'+swfPath+'" />\n';
	sHTML += '<param name="bgcolor" value="#000000" />';
	sHTML += '<param name="wmode" value="transparent" />\n';
	sHTML += '<param name="menu" value="false" />\n';
	sHTML += '<param name="quality" value="high" />\n';
	sHTML += '<embed src="'+swfPath+'" name="branchRiaFlash" width="100%" height="100%" wmode="transparent" bgcolor="#000000" menu="false" quality="high" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
	sHTML += '</object>\n';
	sHTML += '</td></tr>\n';
	sHTML += '</table>\n';
	if (riaArea) {
		riaArea.innerHTML = sHTML;
	}
}

function closeGuideEvent() {
	var riaArea = document.getElementById("branchRiaArea");
	if (riaArea) riaArea.innerHTML = "";
}

/*
** 20080918 ÀÌµ¿ÆÈ ¹éÈ­Á¡ ¸ÞÀÎ°³¼± Ãß°¡
*****************************/

function openVodPlayer(v_flv,v_url) {
	scrollTo(0,0);
	var riaArea = document.getElementById("branchRiaArea");
	var browserWidth = document.body.clientWidth;
	var documentWidth = document.body.scrollWidth;
	var browserHeight = document.body.clientHeight;
	var documentHeight = document.body.scrollHeight;
	var sWindowWidth = (documentWidth>browserWidth) ? documentWidth : browserWidth;
	var sWindowHeight = (documentHeight>browserHeight) ? documentHeight : browserHeight;
	var swfPath = "/common/flash/flvPlayer.swf?flvUrl="+v_flv+"&mainUrl="+v_url;
	var sHTML = '';
	sHTML += '<table cellpadding="0" cellspacing="0" border="0" style="position:absolute;left:0px;top:0px;z-index:1000;width:100%;height:'+ sWindowHeight+ '">\n';
	sHTML += '<tr><td>\n';
	sHTML += '<object id="branchRiaFlash" width="100%" height="100%" align="middle" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">\n';
	sHTML += '<param name="allowScriptAccess" value="sameDomain" />\n';
	sHTML += '<param name="movie" value="'+swfPath+'" />\n';
	sHTML += '<param name="bgcolor" value="#000000" />';
	sHTML += '<param name="wmode" value="transparent" />\n';
	sHTML += '<param name="menu" value="false" />\n';
	sHTML += '<param name="quality" value="high" />\n';
	sHTML += '<embed src="'+swfPath+'" name="branchRiaFlash" width="100%" height="100%" wmode="transparent" bgcolor="#000000" menu="false" quality="high" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
	sHTML += '</object>\n';
	sHTML += '</td></tr>\n';
	sHTML += '</table>\n';
	if (riaArea) {
		riaArea.innerHTML = sHTML;
	}
}

function closeVodPlayer() {
	var riaArea = document.getElementById("branchRiaArea");
	if (riaArea) riaArea.innerHTML = "";
}

/*
** ÄíÅ°ÀúÀå
*****************************/
function emSetCookie(cookieName,cookieValue,expireDays,domainName) {
	var domainString = (domainName==null||domainName=="") ? "" : " domain="+domainName+";";
	var expire = new Date();
	expire.setDate(expire.getDate() + expireDays);
	expire = expire.toGMTString();
	document.cookie=cookieName+"="+escape(cookieValue)+"; path=/;"+domainString+" expires="+expire;
}

/*
** ÄíÅ°°¡Á®¿À±â
*****************************/
function emGetCookie(cookieName) {
	var cookieList = document.cookie.split(";");
	var cookieValue = "";
	for (i = 0; i < cookieList.length; i++) {
		if (cookieList[i].indexOf(cookieName+"=") > -1) {
			if (cookieList[i].split("=")[0].replace(/\s/g,"") == cookieName) {
				cookieValue = unescape(cookieList[i].split("=")[1]);
				break;
			}
		}
	}
	return cookieValue;
}



/*
** ºÙ¿©³Ö±â
*****************************/
function copyThis(_id) {
	try {
		document.getElementById(_id).select();
		document.selection.createRange().execCommand("copy");
		alert('Å¬¸³º¸µå¿¡ URLÀÌ º¹»çµÇ¾ú½À´Ï´Ù.\n\nCtrl+V (ºÙ¿©³Ö±â) ´ÜÃàÅ°¸¦ ÀÌ¿ëÇÏ½Ã¸é,\nURLÀ» ºÙ¿© ³ÖÀ¸½Ç ¼ö ÀÖ½À´Ï´Ù.');
	} catch(e) {
		alert("¿À·ù°¡ ¹ß»ýÇÏ¿´½À´Ï´Ù.\n´Ù½Ã ½ÃµµÇØ ÁÖ½Ê½Ã¿À.");
	}
}



/*¼¿·º¹Ú½º*/
function goToThisLink(obj) {
	if (obj) {
		var index = (obj.selectedIndex==-1) ? 0 : obj.selectedIndex;
		var option = obj.options[index];
		var url = option.value;
		var target = option.getAttribute("target");
		if (target==undefined||target=="") target = "_self";
		if (url!="") open(url, target, "");
	}
}

/*input default*/
function ClearText(obj){
		obj.value = "";
}

/*·¹ÀÌ¾î ¿Â¿ÀÇÁ*/
function Show_Layer(obj,total,num) {

	if (document.getElementById(obj.name + num).style.display != "none"){
		document.getElementById(obj.name + num).style.display = "none";
	}
	
	else {
	
		for (i=1;i<total+1;i++) {
			document.getElementById(obj.name + i).style.display = "none";
		}
		document.getElementById(obj.name + num).style.display = "block";
	}
}	

/*ÀÌ¹ÌÁö ¿Â¿ÀÇÁ*/
var ex_on = '';

function Img_OnOff(obj,name) {

	if ( name == '' ) {
		imgElement = obj.name;
	}
	else {
		imgElement = name;  
	}
	
		imgPath = obj.src; 
		imgPathLen = imgPath.length;
		imgPathFlag = imgPath.lastIndexOf("/");
		imgName = imgPath.substring(0,imgPathFlag+1);
		
		obj.src =  imgName + imgElement + "_on.gif";  
	
	
		if ( ex_on != '' && ex_on != imgName + imgElement){
		ex_imgPath.src = ex_on + "_off.gif";
		}

		ex_imgPath = obj
		ex_on = imgName + imgElement
	
}

function Img_OverOut(obj, flag){

	imgPath = obj.src; 
	imgPathLen = imgPath.length;
	imgPathFlag = imgPath.lastIndexOf("-");
	imgName = imgPath.substring(0,imgPathFlag+1);
	
	obj.src = imgName + flag +".gif";		
}

/*¸µÅ©¿¡ Á¡¼±¾ø¾Ú*/	
function allblur() {
  for (i = 0; i < document.links.length; i++) {
    var obj = document.links[i];
    if(obj.addEventListener) obj.addEventListener("focus", oneblur, false);
    else if(obj.attachEvent) obj.attachEvent("onfocus", oneblur);
  }
}
 
function oneblur(e) {
  var evt = e ? e : window.event;

  if(evt.target) evt.target.blur();
  else if(evt.srcElement) evt.srcElement.blur();
}


function setPng24(obj) { 
    obj.width=obj.height=1; 
    obj.className=obj.className.replace(/\bpng24\b/i,''); 
    obj.style.filter = 
    "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
    obj.src='';  
    return ''; 
} 

/*¿µÇÃ¶óÀÚ¸ÞÀÎ °Ë»ö¹Ú½º*/
function Search_View() {
	document.getElementById("Main_Top").style.display = "block";
}

function activxObj(fileName,width,height,show,auto) 
{
  str="<embed src='"+fileName+"' width='"+width+"' height='"+height+"' ShowControls='"+show+"' autostart='"+auto+"' >";
  str=str+"</embed>";
document.write(""+str+"");
}

/********************************************************************************************************
	ÇÃ·¡½Ã
********************************************************************************************************/
function Flash_display(sFName, nWidth, nHeight, sVName, BGColor, Wmode ){	
	document.writeln ('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http:// fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="'+ nWidth + '" height="'+ nHeight + '" id="'+ sVName +'" align="middle">');
	document.writeln ('<param name="allowScriptAccess" value="sameDomain" />');
	document.writeln ('<param name="movie" value="'+ sFName + '" />');
	document.writeln ('<param name="quality" value="high" />');
	document.writeln ('<param name="bgcolor" value="' + BGColor + '" />');
	document.writeln ('<param name="wmode" value="' + Wmode + '" />');
	document.writeln ('<embed src="'+ sFName + '" quality="high" bgcolor="#ffffff" width="'+ nWidth + '" height="'+ nHeight + '" name="'+ sVName +'" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http:// www.macromedia.com/go/getflashplayer" /> ');
	document.writeln ('</object>');	
}

/********************************************************************************************************
	ÆË¾÷Ã¢ ¿ÀÇÂ
********************************************************************************************************/
function uf_popOpen(_url, _target) {
	var positionX = 0;
	var positionY = 0;
//	var positionX = (screen.width-450)/2;
//	var positionY = (screen.height-250)/2;
	if (_target==null) _target = "_blank";
	window.open(_url,_target,"left="+positionX+",top="+positionY+",width=622,height=500,toolbar=no,scrollbars=no,status=yes" );
}

/****** ÆË¾÷Ã¢ ¸®»çÀÌÁî **************************************************************/
function uf_popResize() {

	// FireFoxÀÏ °æ¿ì
	if ( window.navigator.userAgent.indexOf("Firefox") != -1 ) {
		popFF();
	}
	
	// IE 6, 7 ÀÏ °æ¿ì
	if ( window.navigator.userAgent.indexOf("MSIE 6") != -1 || window.navigator.userAgent.indexOf("MSIE 7") != -1 ) {
		popIE();
	}
}

function popFF() {
	var thisX = document.getElementById("offsetTable").offsetWidth;
	var thisY = document.getElementById("offsetTable").offsetHeight;
	
	var maxThisX = screen.width - 50;
	var maxThisY = screen.height - 80;
	
	// Å¬¶óÀÌ¾ðÆ® width, height¸¦ Á¦¿ÜÇÑ FrameÀÇ °ªÀ» Ãß°¡ÇØÁà¾ß Á¦´ë·Î Ç¥ÇöµÊ.
	var marginY = 50;
	var marginX = 18;

/*	°¡·Î·Î ±æ¾îÁú °æ¿ì
	if( thisX > maxThisX ) {
		window.scrollbars.visible = true;
		thisX = maxThisX;
	} else {
		window.scrollbars.visible = false;
//		document.getElementsByTagName("body")[0].style.overflow = "hidden";
	}
*/
	
	if( thisY > maxThisY - marginY ) {
		window.scrollbars.visible = true;
		
		thisX += 16;
		thisY = maxThisY - marginY;
	} else {
		window.scrollbars.visible = false;
	}
	
	window.resizeTo( thisX+marginX, thisY+marginY );
}

function popIE() {
	var thisX = document.getElementById("offsetTable").offsetWidth;
	var thisY = document.getElementById("offsetTable").offsetHeight;
	
	var maxThisX = screen.width - 50;
	var maxThisY = screen.height - 80;
	
	var xScroll = 16;

	if ( window.navigator.userAgent.indexOf("MSIE 6") != -1 ) { // 6.0
		var marginY = 58; //
		var marginX = 22;

	} else if ( window.navigator.userAgent.indexOf("MSIE 7") != -1 ) {	// 7.0
		var marginY = 71;	//
		var marginX = 22;
	}
	
/*	°¡·Î·Î ±æ¾îÁú °æ¿ì
	if( thisX > maxThisX ) {
		window.document.body.scroll = "yes";
		thisX = maxThisX;
	} else {
		window.document.body.scroll = "no";
	}
*/

	if( thisY > maxThisY - marginY ) {
		window.document.body.scroll = "yes";
		thisX += xScroll;
		thisY = maxThisY - marginY;
		isScroll = true;
	} else {
		window.document.body.scroll = "no";
	}
	
	window.resizeTo( thisX+marginX, thisY+marginY );
}

/****** ÆË¾÷Ã¢ ¸®»çÀÌÁî **************************************************************/





try {
	$E.addAction("onLoad", "allBlur", "allblur()");
} catch(e) {
	//window.onload = allblur;
}




function resetImageSize(_id) {
	try {
		if (_id==null) _id = "imageResizeArea";
		var area = $(_id);
		var imgs = area.getElementsByTagName("IMG");
		var maxWidth = area.getW()-56;
		for (var i=0; i<imgs.length; i++) {
			if (parseInt(imgs[i].offsetWidth)>maxWidth) {
				imgs[i].style.width = maxWidth + "px";
			}
		}
	} catch(e) {
	
	}
}

function resetImageSizeYoung(_id) {
	try {
		if (_id==null) _id = "imageResizeArea";
		var area = $(_id);
		var imgs = area.getElementsByTagName("IMG");
		var maxWidth = area.getW();
		for (var i=0; i<imgs.length; i++) {
			if (parseInt(imgs[i].offsetWidth)>maxWidth) {
				imgs[i].style.width = maxWidth + "px";
			}
		}
	} catch(e) {
	
	}
}



// ÀÎÅÍ³Ý Àü´Ü & ½Å¹®±¤°í
function openBrosure(_url) {
	var posX = 0;
	var posY = 0;
	var posW = screen.width;
	var posH = screen.height;

	open(_url, "BrosureWindow","left="+posX+",top="+posY+",width="+posW+",height="+posH+",toolbar=no,scrollbars=auto,status=no,resizable=yes" );
}

// ·Ôµ¥¿µÇÃÄ«µå
function openYoungpleCard() {
	goPage('card_young');
}

// ·Ôµ¥¹éÈ­Á¡¼Ò°³
function openFooterAbout() {
	goPage('lotte');
}

// °³ÀÎÁ¤º¸º¸È£Á¤Ã¥
function openFooterPolicy() {
	goPage('private');
}

// ÀÌ¿ë¾à°ü
function openFooterArticle() {
	window.open("http://www.lottetown.com/cust/cust_agreement.jsp", "_blank", "");
}

// ·Ôµ¥ÆÐ¹Ð¸®È¸¿ø¼Ò°³
function openFooterFamily() {
	window.open("http://www.lottetown.com/cust/cust_guide.jsp", "_blank", "");
}

// È¸¿øÅ»Åð
function goLeave() {
	location.href = "http://member.lottetown.com/door/user/withdrawl.jsp?sid=DEPT";
}

// ¿µ¹®È¸»ç¼Ò°³
function goEnglish() {
	location.href = LOTTE_ROOT + "/english/index.jsp";
}

// ÀÏ¹®È¸»ç¼Ò°³
function goJapanese() {
	location.href = LOTTE_ROOT + "/japanese/index.jsp";
}

// Áß¹®È¸»ç¼Ò°³
function goChinese() {
	location.href = LOTTE_ROOT + "/chinese/index.jsp";
}

// µµ¿ò¸»ÆË¾÷
function uf_popHelp() {
	window.open("/common/jsp/popup/p_help.jsp","help","width=725,height=410,toolbar=no,scrollbars=no,status=no");
}


// ÁöÁ¡ Ã£±â Ria
document.write('<span id="branchSearchRiaArea"></span>');
function openBranchSearch(position) {
	if (position == null){
		yposition = 84;
		xposition = 0;
		align = "center";
	} else if (position == "index"){
		yposition = 59;
		xposition = 18;
		align = "left";
	}
	var riaArea = document.getElementById("branchSearchRiaArea");
	var s = '';
	s += '<div style="position:absolute;left:0px;top:0px;width:100%;height:1px;text-align:'+ align +';z-index:10;">\n';
	s += '<div style="position:relative;width:960px;height:1px;">\n';
	s += '<div style="position:absolute;left:'+ xposition +'px;top:'+ yposition +'px;z-index:10;">\n';
	s += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="520" height="350" align="middle">\n';
	s += '<param name="allowScriptAccess" value="always" />\n';
	s += '<param name="movie" value="' + kidoMenu.getTopBranchFlashPath() + '?' + kidoMenu.getTopBranchFlashParameter() + '" />\n';
	s += '<param name="quality" value="high" />\n';
	s += '<param name="wmode" value="transparent" />\n';
	s += '<param name="bgcolor" value="#ffffff" />\n';
	s += '<embed src="' + kidoMenu.getTopBranchFlashPath() + '?' + kidoMenu.getTopBranchFlashParameter() + '" quality="high" bgcolor="#ffffff" width="520" height="350" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
	s += '</object>\n';
	s += '</div>\n';
	s += '</div>\n';
	s += '</div>\n';
	riaArea.innerHTML = s;
}

function openBranchSearch(position,posx) {
	
	if (position == null){
		yposition = 84;
		xposition = -50;
		align = "center";
	} else if (position == "index"){
		yposition = 59; //59
		xposition = -50; //
		align = "center";
	}
	var riaArea = document.getElementById("branchSearchRiaArea");
	var s = '';
	s += '<div style="position:absolute;left:0px;top:0px;width:100%;height:1px;text-align:'+ align +';z-index:10;">\n';
	s += '<div style="position:relative;width:960px;height:1px;">\n';
	s += '<div style="position:absolute;left:'+ xposition +'px;top:'+ yposition +'px;z-index:10;">\n';
	s += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="520" height="350" align="middle">\n';
	s += '<param name="allowScriptAccess" value="always" />\n';
	s += '<param name="movie" value="' + kidoMenu.getTopBranchFlashPath() + '?' + kidoMenu.getTopBranchFlashParameter() + '" />\n';
	s += '<param name="quality" value="high" />\n';
	s += '<param name="wmode" value="transparent" />\n';
	s += '<param name="bgcolor" value="#ffffff" />\n';
	s += '<embed src="' + kidoMenu.getTopBranchFlashPath() + '?' + kidoMenu.getTopBranchFlashParameter() + '" quality="high" bgcolor="#ffffff" width="520" height="350" align="middle" allowScriptAccess="always" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />\n';
	s += '</object>\n';
	s += '</div>\n';
	s += '</div>\n';
	s += '</div>\n';
	riaArea.innerHTML = s;
}

function closeBranchSearch() {
	var riaArea = document.getElementById("branchSearchRiaArea");
	riaArea.innerHTML = "";
}

// ºÏ°æÁ¡
function goBeijingMain() {
	location.href="http://www.intimelotte.com.cn";
}
// lotte outlets
function goLotteoutletsMain() {
	location.href="http://www.lotteoutlets.com";
}
// ¸ð½ºÅ©¹ÙÁ¡
function goRussiaMain() {
	location.href="http://www.lotteplaza.ru";
}
// ¿¡ºñ´º¿¤
function goAvenuelMain() {
	open('http://www.avenuel.co.kr/');
}
	

// ¿¡ºñ´º¿¤
function mainFlash_goAvenuel() {
	open('http://www.avenuel.co.kr/');
}