﻿<!--

/* --------------------------------------------------------
    LG아트센터 리뉴얼 홈페이지 기본 스크립트
-------------------------------------------------------- */

// 전역 이벤트
document.onkeypress = jsf_keydown;
document.onfocusin = jsf_bluring;

// 텍스트박스에서 ENTER 키를 칠 경우 이벤트 전파 방지
function jsf_keydown()
{
	if(event.keyCode == 13)
	{
		if(navigator.appName.charAt(0) == "N")
		{
			if(event.target.type == "text")		return false;
			else return true;
		}
		else if(navigator.appName.charAt(0) == "M")
		{
			if(event.srcElement.type == "text")	return false;
			else return true;
		}
		return true;
	}
	else
		return true; 
}

// 포커스가 잡힐 경우 테두리 표시선 제거 (A, IMG, IMAGE 태그)
function jsf_bluring()
{
	if(event.srcElement.tagName == "A" || event.srcElement.tagName == "IMG" || event.srcElement.type == "image") 
		document.body.focus();
}

// 이미지처리
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

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_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

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 jsf_GoToBalconyMain()
{
    parent.top.location.href = '<%=OLD_SiteHeaderUnsecure%>/Home/Main/Clubbalcony_Main.aspx';
}

function jsf_GoToBalconyAbsUrl(url)
{
    parent.top.location.href = url;
}

function jsf_GoToBalconyRefUrl(url)
{
    parent.top.location.href = 'http://www.lgart.com' + url;
}

// Object 로딩(Media)
function jsf_LoadEmbededObject(objID, sourceUrl, objWidth, objHeight){
	document.write("<OBJECT id='"+objID+"' type='application/x-oleobject' height='"+objHeight+"' width='"+objWidth+"' classid='clsid:6bf52a52-394a-11d3-b153-00c04f79faa6'>");
	document.write("<PARAM NAME='URL' VALUE='"+sourceUrl+"'>");
	document.write("<PARAM NAME='rate' VALUE='1'>");
	document.write("<PARAM NAME='balance' VALUE='0'>");
	document.write("<PARAM NAME='currentPosition' VALUE='0'>");
	document.write("<PARAM NAME='defaultFrame' VALUE=''>");
	document.write("<PARAM NAME='playCount' VALUE='1'>");
	document.write("<PARAM NAME='autoStart' VALUE='0'>");
	document.write("<PARAM NAME='currentMarker' VALUE='0'>");
	document.write("<PARAM NAME='invokeURLs' VALUE='-1'>");
	document.write("<PARAM NAME='baseURL' VALUE=''>");
	document.write("<PARAM NAME='volume' VALUE='50'>");
	document.write("<PARAM NAME='mute' VALUE='0'>");
	document.write("<PARAM NAME='uiMode' VALUE='full'>");
	document.write("<PARAM NAME='stretchToFit' VALUE='-1'>");
	document.write("<PARAM NAME='windowlessVideo' VALUE='0'>");
	document.write("<PARAM NAME='enabled' VALUE='-1'>");
	document.write("<PARAM NAME='enableContextMenu' VALUE='-1'>");
	document.write("<PARAM NAME='fullScreen' VALUE='0'>");
	document.write("<PARAM NAME='SAMIStyle' VALUE=''>");
	document.write("<PARAM NAME='SAMILang' VALUE=''>");
	document.write("<PARAM NAME='SAMIFilename' VALUE=''>");
	document.write("<PARAM NAME='captioningID' VALUE=''>");
	document.write("<PARAM NAME='enableErrorDialogs' VALUE='0'>");
	document.write("<PARAM NAME='_cx' VALUE='13229'>");
	document.write("<PARAM NAME='_cy' VALUE='9525'>");
	document.write("<embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='"+objID+"' height='"+objHeight+"' width='"+objWidth+"' src='"+sourceUrl+"' enablecontextmenu=false ShowStatusBar='true' autostart='true' loop='false'></embed>");
	document.write("</OBJECT>");
}

// Falsh 로딩
function jsf_LoadEmbededFlash(sourceUrl, objWidth, objHeight)
{
	document.write("<OBJECT codeBase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0'");
	document.write("height='"+objHeight+"' width='"+objWidth+"' align='middle' classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000'>");
	document.write("<PARAM NAME='FlashVars' VALUE=''>");
	document.write("<PARAM NAME='Movie' VALUE='"+sourceUrl+"'>");
	document.write("<PARAM NAME='Src' VALUE='"+sourceUrl+"'>");
	document.write("<PARAM NAME='WMode' VALUE='Transparent'>");
	document.write("<PARAM NAME='Play' VALUE='-1'>");
	document.write("<PARAM NAME='Loop' VALUE='-1'>");
	document.write("<PARAM NAME='Quality' VALUE='High'>");
	document.write("<PARAM NAME='SAlign' VALUE=''>");
	document.write("<PARAM NAME='Menu' VALUE='-1'>");
	document.write("<PARAM NAME='Base' VALUE=''>");
	document.write("<PARAM NAME='DeviceFont' VALUE='0'>");
	document.write("<PARAM NAME='EmbedMovie' VALUE='0'>");
	document.write("<PARAM NAME='BGColor' VALUE=''>");
	document.write("<PARAM NAME='SWRemote' VALUE=''>");
	document.write("<PARAM NAME='MovieData' VALUE=''>");
	document.write("<param name='allowScriptAccess' value='always' />");
	document.write("<PARAM NAME='SeamlessTabbing' VALUE='1'>");
	document.write("<PARAM NAME='Profile' VALUE='0'>");
	document.write("<PARAM NAME='ProfileAddress' VALUE=''>");
	document.write("<PARAM NAME='ProfilePort' VALUE='0'>");
	document.write("<embed src='"+sourceUrl+"' quality='high' WMode='Transparent' width='"+objWidth+"' height='"+objHeight+"' align='middle'");
	document.write("type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
	document.write("</OBJECT>");
}

// 공연상세 포토 크게 보기
function jsf_PerfPhotoBigView(sImageUrl)
{
    document.all.bigimg.src = sImageUrl;
}

/* ---------------------------
   예매 팝업(START)
--------------------------- */

// 공연키를 이용한 티켓 예매창 팝업

function jsf_GoPerfSaleProcess(jsp_IdPerf)
{
    var jsl_PopupWidth = 890;
    var jsl_PopupHeight = 620;
    var jsl_PopupLeftPos = (screen.width - jsl_PopupWidth) / 2;
    var jsl_PopupTopPos = (screen.height - jsl_PopupHeight) / 2;
    
    var jsl_TicketPopupID = window.open('http://ticket.lgart.com/Home/PerfSale/PerfSaleProcess2009.aspx?Id=' + jsp_IdPerf, 'pop_perfsale', 'width=' + jsl_PopupWidth + ',height=' + jsl_PopupHeight + ',left=' + jsl_PopupLeftPos + ',top=' + jsl_PopupTopPos);
    
    jsl_TicketPopupID.focus();
}

// 공연키를 이용한 패키지 예매창 팝업

function jsf_GoPackageSaleProcess(jsp_IdPerf)
{
    var jsl_PopupWidth = 890;
    var jsl_PopupHeight = 620;
    var jsl_PopupLeftPos = (screen.width - jsl_PopupWidth) / 2;
    var jsl_PopupTopPos = (screen.height - jsl_PopupHeight) / 2;
    
    var jsl_PackagePopupID = window.open('http://ticket.lgart.com/Home/PerfSale/PackageSaleProcess2009.aspx?Id=' + jsp_IdPerf, 'pop_perfsale', 'width=' + jsl_PopupWidth + ',height=' + jsl_PopupHeight + ',left=' + jsl_PopupLeftPos + ',top=' + jsl_PopupTopPos);
    
    jsl_PackagePopupID.focus();
}

/* ---------------------------
   예매 팝업(END)
--------------------------- */

/* ---------------------------
   마이페이지 팝업(START)
--------------------------- */

// 공연타입과 주문번호를 이용한 마이페이지 상세 팝업

// 공연/패키지 상세 팝업창
function jsf_GoDetailInfo(jsp_IdType, jsp_IdOrder, jsp_Site)
{
    var jsl_OrderDetailPopupID;
    
    var jsl_PopupWidth = 890;
    var jsl_PopupHeight = 620;
    var jsl_PopupLeftPos = (screen.width - jsl_PopupWidth) / 2;
    var jsl_PopupTopPos = (screen.height - jsl_PopupHeight) / 2;
    
    if (jsp_IdType == '1469') 
    {// 티켓상세
        if(jsp_Site == 'BestPlay')
            jsl_OrderDetailPopupID = window.open('http://ticket.lgart.com/Home/MyTicket/OrderTicketView2009.aspx?IdOrder=' + jsp_IdOrder, 'pop_ticketorddetail', 'width=' + jsl_PopupWidth + ',height=' + jsl_PopupHeight + ',left=' + jsl_PopupLeftPos + ',top=' + jsl_PopupTopPos + ',scrollbars=yes');
    }
    else if (jsp_IdType == '1470')
    {// 패키지상세 
        jsl_OrderDetailPopupID = window.open('http://ticket.lgart.com/Home/MyTicket/OrderPackageView2009.aspx?IdOrder=' + jsp_IdOrder, 'pop_packageorddetail', 'width=' + jsl_PopupWidth + ',height=' + jsl_PopupHeight + ',left=' + jsl_PopupLeftPos + ',top=' + jsl_PopupTopPos + ',scrollbars=yes');
    }
    
    jsl_OrderDetailPopupID.focus();
}

// 공연/패키지 상세 자체 이동
function jsf_GoDetailInfoSelf(jsp_IdType, jsp_IdOrder, jsp_Site, jsp_Disp, jsp_Page)
{
    if (jsp_IdType == '1469') 
    {// 티켓상세
        if(jsp_Site == 'BestPlay')
            location.href = "http://ticket.lgart.com/Home/MyTicket/OrderTicketView2009.aspx?IdOrder=" + jsp_IdOrder + "&disp=" + jsp_Disp + "&page=" + jsp_Page;
    }
    else if (jsp_IdType == '1470')
    {// 패키지상세 
        location.href = "http://ticket.lgart.com/Home/MyTicket/OrderPackageView2009.aspx?IdOrder=" + jsp_IdOrder + "&disp=" + jsp_Disp + "&page=" + jsp_Page;
    }
}

// 패키지 아이템키와 관련 공연키를 이용한 좌석지정 팝업
function jsf_GoPackageSeatChoiceProcess(jsp_IdPackageItem, jsp_idPackagePerf)
{
    var jsl_SeatChoicePopupID;
    
    var jsl_PopupWidth = 890;
    var jsl_PopupHeight = 620;
    var jsl_PopupLeftPos = (screen.width - jsl_PopupWidth) / 2;
    var jsl_PopupTopPos = (screen.height - jsl_PopupHeight) / 2;
    
    jsl_SeatChoicePopupID = window.open('http://ticket.lgart.com/Home/PerfSale/PackageSeatChoiceProcess2009.aspx?IdPackItem=' + jsp_IdPackageItem + '&Id=' + jsp_idPackagePerf, 'pop_ticketorddetail', 'width=' + jsl_PopupWidth + ',height=' + jsl_PopupHeight + ',left=' + jsl_PopupLeftPos + ',top=' + jsl_PopupTopPos);
    
    jsl_SeatChoicePopupID.focus();
}

// 패키지 선택좌석 상세보기 (팝업창용)
function jsf_GoPackageSeatDetailInfo(jsp_IdTrans, jsp_IdOrder)
{
	location.href ="http://ticket.lgart.com/Home/MyTicket/OrderTicketView2009.aspx?IdOrder=" + jsp_IdTrans + "&IdPackOrd=" + jsp_IdOrder;
}

// 패키지 선택좌석 상세보기 (자체이동)
function jsf_GoPackageSeatDetailInfoSelf(jsp_IdTrans, jsp_IdOrder, jsp_Disp, jsp_Page)
{
	location.href ="http://ticket.lgart.com/Home/MyTicket/OrderTicketView2009.aspx?IdOrder=" + jsp_IdTrans + "&IdPackOrd=" + jsp_IdOrder + "&disp=" + jsp_Disp + "&page=" + jsp_Page;
}

/* ---------------------------
   마이페이지 팝업(END)
--------------------------- */

//-->

