var loginmethod = "page";
var topholding1 = "";
var topholding2 = "";
var topholding3 = "";
//var loginmethod = "pop";
document.onkeypress = keydw;

function keydw()
{
	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; 
}

document.onfocusin = bluring;

function bluring()
{
	if(event.srcElement.tagName == "A" || event.srcElement.tagName == "IMG" || event.srcElement.type == "image") 
		document.body.focus();
}

function openToWin(url,width,height){
	window.open(url,'openToWin','toolbar=no,scrollbars=0,resizable=yes,width='+width+',height='+height+',top=200,left=300');
}

function KeyCheckSpaceNo()
{// ½ºÆäÀÌ½º ÀÔ·Â ¹æÁö
	event.returnValue = true;
	
	// 32 : ½ºÆäÀÌ½º
	if (event.keyCode == 32) event.returnValue = false;
}

function KeyCheckOnlyNumber()
{// ¼ýÀÚ¸¸ ÀÔ·Â °¡´É
    event.returnValue = false;
    
    if (event.keyCode == 8 || event.keyCode == 13)
    {// 8 : ¹é½ºÆäÀÌ½º, 13 : ¿£ÅÍÅ°
		event.returnValue = true;
	}
	else
	{
		if(event.keyCode >= 48 && event.keyCode <= 57) event.returnValue = true;
	}
}

function ConfirmReg(source,args){
	if(confirm('µî·Ï ÇÏ½Ã°Ú½À´Ï±î?')){
	}else{
		args.IsValid =false;
		return false;
	}
}

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.01
  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 && d.getElementById) x=d.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 ParentGo(locurl){
	parent.top.location.href = locurl;
}

function getCookie(name) {
	var prefix = name + "=";
	var cookieStartIndex = document.cookie.indexOf(prefix);
	if (cookieStartIndex == -1)
		return (null);
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
	if (cookieEndIndex == -1)
		cookieEndIndex = document.cookie.length;
	return (unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex)));
}

function getSubCookie(name, subname) {
	var prefix = name + "=";
	var cookieStartIndex = document.cookie.indexOf(prefix);
	if (cookieStartIndex == -1)
		return (null);
	var cookieEndIndex = document.cookie.indexOf(";", cookieStartIndex + prefix.length);
	if (cookieEndIndex == -1)
		cookieEndIndex = document.cookie.length;
	var cookies = unescape(document.cookie.substring(cookieStartIndex + prefix.length, cookieEndIndex));
	prefix = subname + "=";
	cookieStartIndex = cookies.indexOf(prefix);
	if (cookieStartIndex == -1)
		return (null);
	cookieEndIndex = cookies.indexOf("&", cookieStartIndex + prefix.length);
	if (cookieEndIndex == -1)
		cookieEndIndex = document.cookie.length;
	return (unescape(cookies.substring(cookieStartIndex + prefix.length, cookieEndIndex)));
}

function Right(str, n){
    if (n <= 0)
       return "";
    else if (n > String(str).length)
       return str;
    else {
       var iLen = String(str).length;
       return String(str).substring(iLen, iLen - n);
    }
}

//°øÅëÇÃ·¯½¬
function EmbededFlash(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 EmbededFlashObj(sourceUrl,objWidth,objHeight){
    document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0' width='"+objWidth+"' height='"+objHeight+"'>");
    document.write("<param name='movie' value='"+sourceUrl+"'>");
    document.write("<param name='quality' value='high'>");
    document.write("<embed src='"+sourceUrl+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+objWidth+"' height='"+objHeight+"'></embed>");
    document.write("</object>");
}

function EmbededFlashNew(sourceUrl,objWidth,objHeight){
	document.write("<OBJECT name='objMainFlash' codeBase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,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 EmbededFlashFile(sourceUrl,objWidth,objHeight){
	document.write("<OBJECT name='objTopFlash' 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 id='embedFlash' src='"+sourceUrl+"' quality='high' WMode='Transparent' bgcolor='#ffffff' width='"+objWidth+"' height='"+objHeight+"' align='middle'");
	document.write("type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
	document.write("</OBJECT>");
}

//°øÅëÇÃ·¯½¬ - Åõ¸íµµ ¾ø¾Ú
function EmbededFlashNoTrans(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='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='Scale' VALUE='ShowAll'>");
	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' bgcolor='#ffffff' width='"+objWidth+"' height='"+objHeight+"' align='middle'");
	document.write("type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer'>");
	document.write("</OBJECT>");
}

function changeEmbed(arg1, arg2, arg3)
{
  document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
  document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' width='"+arg2+"' height='"+arg3+"'>");
  document.write("<param name='movie' value='"+arg1+"'>");
  document.write("<param name='quality' value='high'>");
  document.write("<param name='wmode' value='transparent'>");
  document.write("<embed src='"+arg1+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+arg2+"' height='"+arg3+"'></embed>");
  document.write("</object>");
}

function changeEmbedWithID(arg1, arg2, arg3,arg4)
{
  document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000'");
  document.write("codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' id='"+arg4+"' width='"+arg2+"' height='"+arg3+"'>");
  document.write("<param name='movie' value='"+arg1+"'>");
  document.write("<param name='quality' value='high'>");
  document.write("<param name='wmode' value='transparent'>");
  document.write("<embed src='"+arg1+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+arg2+"' height='"+arg3+"'></embed>");
  document.write("</object>");
}

//°øÅëÇÃ·¯½¬
function EmbededFlashSe(sourceUrl,objWidth,objHeight){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='"+objWidth+"' height='"+objHeight+"'>");
	document.write("<param name='movie' value='"+sourceUrl+"'>");
	document.write("<param name='quality' value='high'>");
	document.write("<embed src='"+sourceUrl+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+objWidth+"' height='"+objHeight+"'></embed>");
	document.write("</object>");
}

//°øÅë¹Ìµð¾î
function EmbededMedia(sourceUrl,objWidth,objHeight){
	document.write("<embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' width='"+objWidth+"' height='"+objHeight+"'");
	document.write("src='"+sourceUrl+"' ShowStatusBar=false autostart='true'");
	document.write("loop='false' enablecontextmenu='false' showcontrols=false bgcolor='#f6f6ec' style='BACKGROUND-COLOR: #f6f6ec'></embed>");
}

function EmbededMediaSe(sourceUrl,objWidth,objHeight){
	document.write("<embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' width='"+objWidth+"' height='"+objHeight+"'");
	document.write("src='"+sourceUrl+"' ShowStatusBar=true autostart='true'");
	document.write("loop='false' enablecontextmenu='true' showcontrols=true bgcolor='#f6f6ec' style='BACKGROUND-COLOR: #f6f6ec'></embed>");
}

function Media(id, name, url, width, height)
{
	document.write("<OBJECT id='" + id + "' name='" + name + "' type='application/x-oleobject' height='" + height +"' width='" + width + "' classid='clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95'>");
	document.write("<PARAM NAME='Filename' VALUE='" + url + "'>");
	document.write("<PARAM NAME='AutoStart' VALUE='1'>");
	document.write("<PARAM NAME='AnimationAtStart' VALUE='0'>");
	document.write("<PARAM NAME='DisplayMode' VALUE='4'>");
	document.write("<PARAM NAME='Enabled' VALUE='true'>");
	document.write("<PARAM NAME='ShowControls' VALUE='1'>");
	document.write("<PARAM NAME='ShowAudioControls' VALUE='1'>");
	document.write("<PARAM NAME='ShowDisplay' VALUE='0'>");
	document.write("<PARAM NAME='ShowGotoBar' VALUE='0'>");
	document.write("<PARAM NAME='ShowPositionControls' VALUE='1'>");
	document.write("<PARAM NAME='ShowStatusBar' VALUE='0'>");
	document.write("<PARAM NAME='Volume' VALUE='0'>");
	document.write("<PARAM NAME='ShowCaptioning' VALUE='0'>");
	document.write("<PARAM NAME='TransparentAtStart' VALUE='1'>");
	document.write("<embed type='application/x-mplayer2' pluginspage='http://microsoft.com/windows/mediaplayer/en/download/' id='" + id + "' name='" + name + "' height='" + height + "' width='" + width + "' src='" + url + "' invokeurls=false displaysize='4' autosize='0'  showcontrols='0' showdisplay='0' showstatusbar='0' animationatstart='1' displaymode='4' enabled='true' filename='" + url + "' showaudiocontrols='0' showgotobar='0' showpositioncontrols='0' volume='0' showcaptioning='0' transparentatstart='1'></embed>");
	document.write("</OBJECT>");
}

/*----¿¹¸ÅÆË¾÷-----*/

//¿¹¸ÅÇÁ·Î¼¼½º ½ÇÇà(°ø¿¬¾ÆÀÌµð¸¸)
function goPerfSaleProcess(idPerf){

	ShowSaleProcess(idPerf);
	return false;
	
}

//¿¹¸Å ½ÇÇà(È¸Â÷ ÁöÁ¤)
function goPerfSaleTime(idperf,idtime){
    ShowSaleProcess(idperf,idtime)
}

//ºü¸¥ ¿¹¸Å
function goQuickSale(){
    if(document.all.ifrmSaleContainer !=null){
        var ifrmSale = document.frames['ifrmSaleContainer'];
        var ifrmUrl = ifrmSale.document.URL.toLowerCase();
        if(ifrmUrl.indexOf("?") !=-1){
		    ifrmUrl = ifrmUrl.substring(0,ifrmUrl.indexOf("?"))
	    }
        if(ifrmUrl.indexOf('perfsaleprocess') !=-1){
            document.frames['ifrmSaleContainer'].SelPerfChange(0);
            return;
        }
    }
    ShowSaleProcess();
}

//ºü¸¥ ¿¹¸Å
function goSeatSale(){
	ShowSaleProcess('','','1');
}

function ShowSaleProcess()
{ 
	if(document.getElementById("divOpacity") && document.getElementById("divSaleContainer"))
	{
	    //document.body.scroll = "no";
	    document.body.scrollTop = 0;
	    
	    var width = 0;
	    var height = 0;
	    var Wheight=document.body.scrollHeight;
	    var divleft = (document.body.clientWidth - width) / 2;
        //var divtop = ((document.body.clientHeight - height) / 2)+document.body.scrollTop;
        var divtop = 80;
        if(divtop < 0){
            divtop = 0;
        }

        var args = ShowSaleProcess.arguments;
        
        var querystring = "";
        if(args.length > 0){
            querystring = "?id="+args[0];
        }
        if(args.length > 1){
            if(querystring==""){
                querystring = "?idtime="+args[1];
            }else{
                querystring += "&idtime="+args[1];
            }
        }
        if(args.length > 2){
            if(querystring==""){
                querystring = "?isseat="+args[2];
            }else{
                querystring += "&isseat="+args[2];
            }
        }
        
        
        //document.getElementById("divOpacity").innerHTML="<div id='bg' style='position:absolute; width:100%; height:"+Wheight+"; top:0px; left:0px; z-index:5; filter:Alpha(Opacity=70); background-color:#000000;'></div>"	
	    //document.getElementById("divOpacity").style.display = "";
	    document.getElementById("divSaleContainer").innerHTML ="<iframe id=ifrmSaleContainer src='/Home/PerfSale/PerfSaleProcess.aspx"+querystring+"' width='"+width+"' height='"+height+"' frameborder=0 marginheight=0 marginwidth=0 scrolling='no' style='background:#f2f2f2;'>"
	    document.getElementById("divSaleContainer").style.width = width;
	    document.getElementById("divSaleContainer").style.height = height;
	    document.getElementById("divSaleContainer").style.top =  divtop;
	    document.getElementById("divSaleContainer").style.left = divleft;
	    document.getElementById("divSaleContainer").style.display = "";
	    
	}
}

function ShowPackageProcess() {
    if (document.getElementById("divOpacity") && document.getElementById("divSaleContainer")) {
        //document.body.scroll = "no";
        document.body.scrollTop = 0;

        var width = 0;
        var height = 0;
        var Wheight = document.body.scrollHeight;
        var divleft = (document.body.clientWidth - width) / 2;
        //var divtop = ((document.body.clientHeight - height) / 2)+document.body.scrollTop;
        var divtop = 80;
        if (divtop < 0) {
            divtop = 0;
        }

        var args = ShowPackageProcess.arguments;

        var querystring = "";
        if (args.length > 0) {
            querystring = "?id=" + args[0];
        }
        if (args.length > 1) {
            if (querystring == "") {
                querystring = "?idtime=" + args[1];
            } else {
                querystring += "&idtime=" + args[1];
            }
        }
        if (args.length > 2) {
            if (querystring == "") {
                querystring = "?isseat=" + args[2];
            } else {
                querystring += "&isseat=" + args[2];
            }
        }


        //document.getElementById("divOpacity").innerHTML="<div id='bg' style='position:absolute; width:100%; height:"+Wheight+"; top:0px; left:0px; z-index:5; filter:Alpha(Opacity=70); background-color:#000000;'></div>"	
        //document.getElementById("divOpacity").style.display = "";
        document.getElementById("divSaleContainer").innerHTML = "<iframe id=ifrmSaleContainer src='/Home/PerfSale/PerfSalePackage.aspx" + querystring + "' width='" + width + "' height='" + height + "' frameborder=0 marginheight=0 marginwidth=0 scrolling='no' style='background:#f2f2f2;'>"
        document.getElementById("divSaleContainer").style.width = width;
        document.getElementById("divSaleContainer").style.height = height;
        document.getElementById("divSaleContainer").style.top = divtop;
        document.getElementById("divSaleContainer").style.left = divleft;
        document.getElementById("divSaleContainer").style.display = "";
    }
}


function ShowPackageSeatProcess() {
    if (document.getElementById("divOpacity") && document.getElementById("divSaleContainer")) {
        //document.body.scroll = "no";
        document.body.scrollTop = 0;

        var width = 0;
        var height = 0;
        var Wheight = document.body.scrollHeight;
        var divleft = (document.body.clientWidth - width) / 2;
        //var divtop = ((document.body.clientHeight - height) / 2)+document.body.scrollTop;
        var divtop = 80;
        if (divtop < 0) {
            divtop = 0;
        }

        var args = ShowPackageSeatProcess.arguments;

        //200911ÆÐÅ°Áö¼öÁ¤
        querystring = "?id=" + args[0] + "&IdPackageItem=" + args[1] + "&isseat=" + args[2];
        querystring += "&IdOrder=" + args[3] + "&idtickettime=" + args[4] + "&idticketseat=" + args[5] + "&pType=" + args[6];
        

        //document.getElementById("divOpacity").innerHTML="<div id='bg' style='position:absolute; width:100%; height:"+Wheight+"; top:0px; left:0px; z-index:5; filter:Alpha(Opacity=70); background-color:#000000;'></div>"	
        //document.getElementById("divOpacity").style.display = "";
        document.getElementById("divSaleContainer").innerHTML = "<iframe id=ifrmSaleContainer src='/Home/PerfSale/PackageSeatChoice.aspx" + querystring + "' width='" + width + "' height='" + height + "' frameborder=0 marginheight=0 marginwidth=0 scrolling='no' style='background:#f2f2f2;'>"
        document.getElementById("divSaleContainer").style.width = width;
        document.getElementById("divSaleContainer").style.height = height;
        document.getElementById("divSaleContainer").style.top = divtop;
        document.getElementById("divSaleContainer").style.left = divleft;
        document.getElementById("divSaleContainer").style.display = "";
    }
}

function ParentResizeSaleArea(width,height){
	 var divleft = (document.body.clientWidth - width) / 2;
     //var divtop = ((document.body.clientHeight - height) / 2)+document.body.scrollTop;
     var divtop = 80;
     if(divtop < 0){
            divtop = 0;
     }
     document.getElementById("divSaleContainer").style.top =  divtop;
	 document.getElementById("divSaleContainer").style.left = divleft;
	 document.getElementById("divSaleContainer").style.width = width;
	 document.getElementById("divSaleContainer").style.height = height;
	 document.getElementById("ifrmSaleContainer").style.width = width;
	 document.getElementById("ifrmSaleContainer").style.height = height;     
}

function ResizeSaleArea(width,height){
	  parent.ParentResizeSaleArea(width,height);
}

function ParentCloseSaleProcess(chksub){

    if(chkLogin==false && chksub){
	    location.href = document.URL.replace("#",""); 
	}else{
        if(document.getElementById("divOpacity") && document.getElementById("divSaleContainer")){
	        document.getElementById("divOpacity").innerHTML = "";
	        document.getElementById("divSaleContainer").innerHTML = "";
	        document.getElementById("divOpacity").style.display = "none";
	        document.getElementById("divSaleContainer").style.display = "none";
	        document.body.scroll = "yes";
        }
    }
}

function CloseSaleProcess(){
    var chkSubLogin = false;
    if(getCookie("cust_id") !="" && getCookie("cust_id") !=null){
        chkSubLogin = true;
    }
    parent.ParentCloseSaleProcess(chkSubLogin);
}

/*----¿¹¸ÅÆË¾÷-----*/


/*----·Î±×ÀÎ-----*/

//ÆË¾÷
function goLoginInPopUp(IdPerf){
    if (loginmethod == "page") {
            location.href = '/Home/Member/LoginPop.aspx?returnurl='+escape(document.URL.replace("#",""));
	}else{
		var wd = 441;
		var he = 390;
	    var winwidth = (screen.width - wd) / 2; 
	    var winheight = (screen.height - he) / 2; 
        var loginurl = "http://www.lotte.com/lotte/sitemap/member/LCLoginMemPop.jsp?addparam1=1&retURL="+escape(document.URL.replace("#",""));
	    win = window.open(loginurl,"lotte_login","toolbar=0,menubar=0, status=no, scrollbars=no,resizable=no,WIDTH=" + wd +",HEIGHT=" + he +',left='+winwidth+',top='+winheight+ ";");
	    win.focus();
	    loginpop.focus();
    }
}

//ÆäÀÌÁö ·Î±×ÀÎ
function goLoginInPage(){
	var wd = 441;
	var he = 390;
	var winwidth = (screen.width - wd) / 2; 
	var winheight = (screen.height - he) / 2; 
	var loginurl = "http://www.lotte.com/lotte/sitemap/member/LCLoginMemPop.jsp?addparam1=1&retURL="+escape(document.URL.replace("#",""));
	win = window.open(loginurl,"lotte_login","toolbar=0,menubar=0, status=no, scrollbars=no,resizable=no,WIDTH=" + wd +",HEIGHT=" + he +',left='+winwidth+',top='+winheight+ ";");
	win.focus();
	return false;
}
/*----·Î±×ÀÎ ÆË¾÷-----*/



function ResizePicture(ImgID,vwidth){
	var imgname = eval("document.all."+ImgID);
	if(imgname !=null){
		if(!imgname.complete){
			setTimeout("ResizePicture('"+ImgID+"','"+vwidth+"')",1000); // ÇÔ¼ö¸¦ ´Ù½Ã È£Ãâ
		}else{
			if(imgname.width > vwidth){
				imgname.style.width = vwidth;
			}
		}
	}
}



function goPerfInfoView(idPerf){// 2007³â 10¿ù 22ÀÏ ¼öÁ¤!!
	var idsPerf = idPerf+'';
	var NowUrl = idsPerf.toLowerCase();
	
	if(NowUrl.indexOf("http://") == -1)
	{
		if(idsPerf.indexOf('-') > 0){
			var IdRecom = idsPerf.split('-');
			location.href='/Home/Collection/Recom.aspx?Id='+IdRecom[1];
		}else{
			location.href='/Home/PerfInfo/PerfInfoDet.aspx?IdPerf='+idPerf;
		}
	}
	else
	{
		location.href = idPerf;
	}
}

function handlerNum(obj) {

	if(obj){
		var sKey = String.fromCharCode(event.keyCode);
		var reg = new RegExp(obj);
		if(!reg.test(sKey)){
			event.returnValue=false;
		}
	}
}

function noSpace(){
	if(event.keyCode==32){
		event.returnValue=false;
	}
}

function flashResize(id,wid,hei){
	var flashEl = 	document.getElementById(id);
	flashEl.style.height = hei + "px";
	flashEl.style.width = wid + "px";
}
function zoom_img(img){
	alert(img);
}

var arrKeys;
var arrValues;
var arrCount = 0;
urlInfo=location.search.split("?");
if(urlInfo.length > 1){
    Query=urlInfo[1].split("%26");
    arrCount = Query.length; 
    arrKeys = new Array(arrCount);
    arrValues = new Array(arrCount);
    for(i=0;i<=arrCount-1;i++){
         param = Query[i].split("=");
         arrKeys[i] = param[0];
         arrValues[i] = param[1];
      }
}

function requestscript(str){
   for(i=0;i<=arrCount-1;i++){
      if (arrKeys[i].toLowerCase()==str.toLowerCase()) return arrValues[i];
   }
   return "";
}


function objmenuItem(url){	// MenuItem Object »ý¼º
	this.url = url;
}

var siteMediumMenu = new Array();
siteMediumMenu["community"] = new objmenuItem(" > <a href='/Home/Community/BoardNotice.aspx'>Ä¿¹Â´ÏÆ¼</a>");
siteMediumMenu["customercenter"] = new objmenuItem(" > <a href='/Home/CustomerCenter/FAQBoard.aspx'>Æ¼ÄÏ°í°´¼¾ÅÍ</a>");
siteMediumMenu["event"] = new objmenuItem(" > <a href='/HOME/EVENT/EventList.aspx'>ÀÌº¥Æ®");
siteMediumMenu["member"] = new objmenuItem(" > <a href='/Home/MyTicket/MyTicketMain.aspx'>¸â¹ö½±/a>");
siteMediumMenu["myticket"] = new objmenuItem(" > <a href='/Home/MyTicket/MyTicketMain.aspx'>MY TICKET</a>");
siteMediumMenu["point"] = new objmenuItem(" > <a href='/Home/MyTicket/MyTicketMain.aspx'>My Ticket</a> > <a href='#'>³ªÀÇ Æ÷ÀÎÆ®Á¤º¸</a>");
siteMediumMenu["myservice"] = new objmenuItem(" > <a href='/Home/MyTicket/MyTicketMain.aspx'>My Ticket</a> > <a href='#'>³ªÀÇ ¼­ºñ½ºÁ¤º¸</a>");
siteMediumMenu["notify"] = new objmenuItem(" > <a href='/Home/MyTicket/MyTicketMain.aspx'>My Ticket</a>");
siteMediumMenu["108"] = new objmenuItem(" > <a href='#'>°ø¿¬Á¤º¸</a> > <a href='#'>¹ÂÁöÄÃÄ¹Ã÷</a>");
siteMediumMenu["112"] = new objmenuItem(" > <a href='#'>°ø¿¬Á¤º¸</a> > <a href='#'>¹ÂÁöÄÃµå¸²°ÉÁî</a>");
siteMediumMenu["perfinfo"] = new objmenuItem(" > <a href='#'>°ø¿¬Á¤º¸</a>");
siteMediumMenu["ticketsale"] = new objmenuItem(" > <a href='/Home/TicketSale/TicketGuide.aspx'>°ø¿¬¿¹¸Å</a>");
siteMediumMenu["tshop"] = new objmenuItem(" > <a href='/Home/TShop/TShopList.aspx'>SHOP</a>");
siteMediumMenu["packageshop"] = new objmenuItem(" > <a href='/Home/PackageShop/PShopList.aspx'>ÆÐÅ°Áö¼¥</a>");

var siteSmallMenu = new Array();
siteSmallMenu["main.aspx"] = new objmenuItem(" > <a href='#'>MAIN</a>");
siteSmallMenu["boardexpection.aspx"] = new objmenuItem(" > <a href='#'>°ø¿¬±â´ëÆò</a>");
siteSmallMenu["boardnotice.aspx"] = new objmenuItem(" > <a href='#'>°øÁö»çÇ×</a>");
siteSmallMenu["boardpostscript.aspx"] = new objmenuItem(" > <a href='#'>°ø¿¬ÈÄ±â</a>");
siteSmallMenu["boardqna.aspx"] = new objmenuItem(" > <a href='#'>°ø¿¬Q&A</a>");
siteSmallMenu["boardreview.aspx"] = new objmenuItem(" > <a href='#'>½ºÆä¼È¸®ºä</a>");
siteSmallMenu["faqboard.aspx"] = new objmenuItem(" > <a href='#'>FAQ</a>");
siteSmallMenu["faqview.aspx"] = new objmenuItem(" > <a href='#'>FAQ</a>");
siteSmallMenu["mentomen.aspx"] = new objmenuItem(" > <a href='#'>ÀÌ¸ÞÀÏ »ó´ã</a>");
siteSmallMenu["onetoonefrm.aspx"] = new objmenuItem(" > <a href='#'>ÀÌ¸ÞÀÏ »ó´ã</a>");
siteSmallMenu["searchorder.aspx"] = new objmenuItem(" > <a href='#'></a>");
siteSmallMenu["eventlist.aspx"] = new objmenuItem(" > <a href='#'>ÁøÇàÁßÀÎ ÀÌº¥Æ®</a>");
siteSmallMenu["eventprizer.aspx"] = new objmenuItem(" > <a href='#'>´çÃ·ÀÚ ¹ßÇ¥</a>");
siteSmallMenu["eventread.aspx"] = new objmenuItem(" > <a href='#'>ÁøÇàÁßÀÎ ÀÌº¥Æ®</a>");
siteSmallMenu["myevent.aspx"] = new objmenuItem(" > <a href='#'>ÀÌº¥Æ® Âü¿©³»¿ª</a>");
siteSmallMenu["myexpection.aspx"] = new objmenuItem(" > <a href='#'>°ø¿¬ ±â´ëÆò</a>");
siteSmallMenu["mymentomen.aspx"] = new objmenuItem(" > <a href='#'>1:1ÀÌ¸ÞÀÏ »ó´ã</a>");
siteSmallMenu["mypostscript.aspx"] = new objmenuItem(" > <a href='#'>°ø¿¬ÈÄ±â</a>");
siteSmallMenu["myqna.aspx"] = new objmenuItem(" > <a href='#'>°ø¿¬ Q&A</a>");
siteSmallMenu["mywaiting.aspx"] = new objmenuItem(" > <a href='#'>¿þÀÌÆÃ¼­ºñ½º</a>");
siteSmallMenu["notifylist.aspx"] = new objmenuItem(" > <a href='#'>¸ÞÀÏ/SMSÁ¤º¸</a>");
siteSmallMenu["notIfyread.aspx"] = new objmenuItem(" > <a href='#'>¸ÞÀÏ/SMSÁ¤º¸</a>");
siteSmallMenu["lottepointlist.aspx"] = new objmenuItem(" > <a href='#'>·Ôµ¥Æ÷ÀÎÆ®</a>");
siteSmallMenu["lpointlist.aspx"] = new objmenuItem(" > <a href='#'>LÆ÷ÀÎÆ®</a>");
siteSmallMenu["couponlist.aspx"] = new objmenuItem(" > <a href='#'>ÇÒÀÎÄíÆù/¿¹¸Å±Ç</a>");
siteSmallMenu["myticketmain.aspx"] = new objmenuItem(" > <a href='#'>¸ÞÀÎ</a>");
siteSmallMenu["orderticketlist.aspx"] = new objmenuItem(" > <a href='#'>¿¹¸ÅÈ®ÀÎ/Ãë¼Ò</a>");
siteSmallMenu["orderticketview.aspx"] = new objmenuItem(" > <a href='#'>¿¹¸ÅÈ®ÀÎ/Ãë¼Ò</a>");
siteSmallMenu["receptionlist.aspx"] = new objmenuItem(" > <a href='#'>¿µ¼öÁõ/¼¼±Ý°è»ê¼­</a>");
//siteSmallMenu["perfdetailinfo.aspx"] = new objmenuItem(" > <a href='#'>°ø¿¬Á¤º¸</a>");
siteSmallMenu["perfplanning.aspx"] = new objmenuItem(" > <a href='#'>±âÈ¹Àü</a>");
siteSmallMenu["ticketguide.aspx"] = new objmenuItem(" > <a href='#'>¿¹¸Å°¡ÀÌµå</a>");
siteSmallMenu["ticketremain.aspx"] = new objmenuItem(" > <a href='#'>ÀÜ¿©¼® ÇöÈ²</a>");
siteSmallMenu["ticketwaiting.aspx"] = new objmenuItem(" > <a href='#'>¿þÀÌÆÃ ¼­ºñ½º</a>");
siteSmallMenu["boarduserguide.aspx"] = new objmenuItem(" > <a href='#'>ÀÌ¿ë °¡ÀÌµå</a>");


function ShowNavigationBar(){
    var NowUrl = document.URL.toLowerCase();
	if(NowUrl.indexOf("?") !=-1){
		NowUrl = NowUrl.substring(0,NowUrl.indexOf("?"))
	}
	var ArNowUrl = NowUrl.split('/');
	var NowFolder = ArNowUrl[ArNowUrl.length-2];
	var NowPath = ArNowUrl[ArNowUrl.length-1];
	document.write(GetBigCategory()+MediumCategory(NowFolder)+EndCategory(NowPath));
}

function GetBigCategory(){
	return "<a href='http://ticket.lotte.com'>HOME</a>";
}

function MediumCategory(folder){
	if(folder=="perfinfo"){
		if(siteMediumMenu[requestscript("idperf")] !=null){
			return siteMediumMenu[requestscript("idperf")].url;
		}
	}else if(siteMediumMenu[folder] != null){
		return siteMediumMenu[folder].url;
	}
	return "";
}

function EndCategory(path){
	if(siteSmallMenu[path] != null)
	{
	   return siteSmallMenu[path].url;
	}
	return "";
} 

function poptheater1(){
    window.open("/Home/Guide/Charlottetheater.htm","theater","width=700,height=600,scrollbars=1");
}

function poptheater2(){
    window.open("/Home/Guide/DisasterUseGuide.htm","theater","width=700,height=600,scrollbars=1");
}