var loginmethod = "page";
//var loginmethod = "pop";
var lnbmenucode = "";
//var topholding1 = "";
//var topholding2 = "";
//var topholding3 = "";
document.onkeypress = keydw;

var isDOM = (document.getElementById ? true : false);
var isIE4 = ((document.all && !isDOM) ? true : false);
var isNS4 = (document.layers ? true : false);
var isNS = navigator.appName == "Netscape";

function getRef(id) {
    if (isDOM) return document.getElementById(id);
    if (isIE4) return document.all[id];
    if (isNS4) return document.layers[id];
}

function ShowDivQuick() {

    var divQuick = '<DIV id=\"divMenu\" style=\"position:absolute;DISPLAY: inline; WIDTH: 54px; HEIGHT: 15px\" ms_positioning=\"FlowLayout\">';
    divQuick += '<table width=\"54\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">';
    divQuick += '<tr>';
    divQuick += '<td><script language="javascript">EmbededFlash("/include/swf/top.swf", 23, 37);</script></td>';
    divQuick += '</tr>';
    divQuick += '</table>';
    divQuick += '</DIV>';
    document.write(divQuick);

    if (isNS4) {
        var divMenu = document["divMenu"];
        divMenu.top = top.pageYOffset + 50;
        divMenu.visibility = "visible";
        moveRightEdge();
    } else if (isDOM) {
        var divMenu = getRef('divMenu');
        divMenu.style.top = (isNS ? window.pageYOffset : Math.max(document.documentElement.scrollTop, document.body.scrollTop)) + 150;
        divMenu.style.visibility = "visible";
        moveRightEdge();
    }
}


function moveRightEdge() {

    var yMenuFrom, yMenuTo, yOffset, timeoutNextCheck;

    if (isNS4) {
        yMenuFrom = leftdiv.top;
        yMenuTo = windows.pageYOffset;   // À§ÂÊ À§Ä¡
    } else if (isDOM) {
        yMenuFrom = parseInt(divMenu.style.top, 10);
        yMenuTo = (isNS ? window.pageYOffset : Math.max(document.documentElement.scrollTop, document.body.scrollTop)) + 160; // À§ÂÊ À§Ä¡
    }
    timeoutNextCheck = 40;

    if (yMenuFrom != yMenuTo) {
        yOffset = Math.ceil(Math.abs(yMenuTo - yMenuFrom) / 20);
        if (yMenuTo < yMenuFrom)
            yOffset = -yOffset;
        if (isNS4)
            leftdiv.top += yOffset;
        else if (isDOM)
            divMenu.style.top = parseInt(divMenu.style.top, 10) + yOffset;
        timeoutNextCheck = 10;
    }

    divMenu.style.left = "932px";
    /*
    if (document.documentElement.clientWidth <= 900) {
        divMenu.style.left = "905px";
    } else {
        divMenu.style.left = 905 + ((document.documentElement.clientWidth - 900) / 2) + "px";
    }
    */
    setTimeout("moveRightEdge()", timeoutNextCheck);
}


function GoTop() {
    window.scrollTo(0, 0);
}


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 setCookie(name, value, expiredays) {
    var todayDate = new Date();
    todayDate.setDate(todayDate.getDate() + expiredays);
    document.cookie = name + "=" + escape(value) + "; path=/; expires=" + todayDate.toGMTString() + ";"
}

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) {

    var sDomainUrlSe = "";
    var sCurUrlSe = document.URL.toLowerCase();
    var iCenterPosSe = sCurUrlSe.indexOf('?');
    var iUrlLengthSe = sCurUrlSe.length;

    if (iCenterPosSe != -1) {
        sDomainUrlSe = sCurUrlSe.substr(0, iCenterPosSe);
    } else {
        sDomainUrlSe = sCurUrlSe;
    }

    var ihttpAdd = "http://";
    if (sDomainUrlSe.indexOf('https://') != -1) {
        ihttpAdd = "https://";
    }

    document.write("<OBJECT codeBase='" + ihttpAdd + "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=''" + ihttpAdd + "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 goOpenPerfSale(idPerf) {
    var openWidth = 1000;
    var openHeight = 528;

    var winwidth = (screen.width - openWidth) / 2;
    var winheight = (screen.height - openHeight) / 2;
    var wini = window.open('/Home/PerfSale/PerfSaleProcess.aspx?Id=' + idPerf, 'perfSales', 'width=' + openWidth + ',height=' + openHeight + ',left=' + winwidth + ',top=' + winheight);
    wini.focus();
    //return false;

}

//¿¹¸ÅÇÁ·Î¼¼½º ½ÇÇà(°ø¿¬¾ÆÀÌµð¸¸)
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 (getSubCookie("TICKET", "ID") != "1-12CE5810B59F434F96") {
        	alert('¿¹¸ÅÁøÇàÁßÀÌ ¾Æ´Õ´Ï´Ù.');
        	return;
    	}
	*/

	if(document.getElementById("divOpacity") && document.getElementById("divSaleContainer"))
	{
	    window.scrollTo(0, 0)
	    
	    var width = 0;
	    var height = 0;
	    var Wheight = document.documentElement.scrollHeight;
	    var divleft = (document.documentElement.clientWidth - width) / 2;
	    //var divtop = ((screen.availHeight - height) / 2); //+document.documentElement.scrollTop;
	    var divtop = ((document.documentElement.clientHeight - height) / 2);  //+ document.documentElement.scrollTop;
        //var divtop = 20;
        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+"px; top:0px; left:0px; z-index:5; opacity:0.5; filter:alpha(opacity=50); -ms-filter:alpha(opacity=50); 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 ParentResizeSaleArea(width, height) {

	 var divleft = (document.documentElement.clientWidth - width) / 2;
	 //var divtop = ((screen.availHeight - height) / 2); // + document.documentElement.scrollTop;
	 var divtop = ((document.documentElement.clientHeight - height) / 2);
	 //var divtop = 20;
     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";
        }
    }
}

function CloseSaleProcess(){
    var chkSubLogin = false;
    if (getSubCookie("TICKET", "LOID") != "" && getSubCookie("TICKET", "LOID") != null) {
        chkSubLogin = true;
    }
    parent.ParentCloseSaleProcess(chkSubLogin);
}


function OpenPerfSalePopup(jsPSIdPerf) {
    goOpenPerfSale(jsPSIdPerf)
}

function OpenPackageSalePopup(jsPSIdPerf) {
    var openWidth = 998;
    var openHeight = 520;

    var winwidth = (screen.width - openWidth) / 2;
    var winheight = (screen.height - openHeight) / 2;
    var wini = window.open('/Home/PerfSale/PackageSalePopup.aspx?Id=' + jsPSIdPerf, 'PackageSale', 'width=' + openWidth + ',height=' + openHeight + ',left=' + winwidth + ',top=' + winheight);
    wini.focus();
    return false;
}

/*----¿¹¸ÅÆË¾÷-----*/


/*----·Î±×ÀÎ-----*/

//ÆË¾÷
function goLoginBookSale(IdPerf) {
    if (confirm('·Î±×ÀÎÀ» ÇÏ½Ã°Ú½À´Ï±î')) {
        if (loginmethod == "page") {

            if (opener.parent.window) {
                opener.parent.location.href = "/Home/MemberShip/Login.aspx?ret_url=" + escape(opener.document.URL.replace("#", "").replace("PerfInfoDet.aspx", "PerfInfo.aspx"));
            }
            else {
                opener.location.href = '/Home/MemberShip/Login.aspx?ret_url=' + escape(opener.document.URL.replace("#", "").replace("PerfInfoDet.aspx", "PerfInfo.aspx"));
            }
            
            self.close();
        } else {
            /*
            var wd = 500;
            var he = 300;
            var winwidth = (screen.width - wd) / 2; 
            var winheight = (screen.height - he) / 2;
            var loginurl = '/Home/MemberShip/LoginPop.aspx?returnurl=' + escape(document.URL.replace("#", ""));
            win = window.open(loginurl, "tdf_login", "toolbar=0,menubar=0, status=no, scrollbars=no,resizable=no,WIDTH=" + wd + ",HEIGHT=" + he + ',left=' + winwidth + ',top=' + winheight + ";");
            win.focus();
            loginpop.focus();
            */
        }
    } else {
        self.close();
    }
}

//ÆäÀÌÁö ·Î±×ÀÎ
function goLoginInPage() {
    var wd = 520;
    var he = 335;
	var winwidth = (screen.width - wd) / 2; 
	var winheight = (screen.height - he) / 2;
	var loginurl = '/Home/MemberShip/Login.aspx?ret_url=' + escape("/Home/MemberShip/LoginAct.aspx");
	win = window.open(loginurl,"tdf_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["perfinfo"] = new objmenuItem(" <img src='/images/common/icon_arr01.gif' alt='°ø¿¬¼Ò°³'><a href='/Home/PerfInfo/PerfInfo.aspx?IdPerfGroup=2'>°ø¿¬¼Ò°³</a> ");
siteMediumMenu["ticket"] = new objmenuItem(" <img src='/images/common/icon_arr01.gif' alt='¿¹¸ÅÇÏ±â'><a href='#'>¿¹¸ÅÇÏ±â</a> ");
siteMediumMenu["community"] = new objmenuItem(" <img src='/images/common/icon_arr01.gif' alt='Ä¿¹Â´ÏÆ¼'><a href='#'>Ä¿¹Â´ÏÆ¼</a> ");
siteMediumMenu["eventmgmt"] = new objmenuItem(" <img src='/images/common/icon_arr01.gif' alt='ÀÌº¥Æ®'><a href='#'>ÀÌº¥Æ®</a> ");
siteMediumMenu["membership"] = new objmenuItem(" <img src='/images/common/icon_arr01.gif' alt='¸â¹ö½±'><a href='#'>¸â¹ö½±</a> ");
siteMediumMenu["intro"] = new objmenuItem(" <img src='/images/common/icon_arr01.gif' alt='¿¡ÀÌÄÞ¼Ò°³'><a href='#'>¿¡ÀÌÄÞ¼Ò°³</a> ");
siteMediumMenu["myticket"] = new objmenuItem(" <img src='/images/common/icon_arr01.gif' alt='¸¶ÀÌÆäÀÌÁö'><a href='#'>¸¶ÀÌÆäÀÌÁö</a> ");

var siteSmallMenu = new Array();
siteSmallMenu["main.aspx"] = new objmenuItem(" <a href='#'><font class='txt_l t03 b'>¸ÞÀÎÆäÀÌÁö</font></a>");

siteSmallMenu["perfinfo.aspx"] = new objmenuItem(" <img src='/images/common/icon_arr01.gif' alt='°ø¿¬ÀÛÇ° ¼Ò°³'> <span>°ø¿¬ÀÛÇ° ¼Ò°³</span>");


siteSmallMenu["infomation.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Intro/Infomation.aspx'><font class='txt_l t03'>¿¡ÀÌÄÞÀÎÅÍ³»¼Å³¯</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>ÀÎ»ç¸»</font></a>");
siteSmallMenu["history.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Intro/Infomation.aspx'><font class='txt_l t03'>¿¡ÀÌÄÞÀÎÅÍ³»¼Å³¯</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>¿¬Çõ/±â±¸Ç¥</font></a>");
siteSmallMenu["organization.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Intro/Infomation.aspx'><font class='txt_l t03'>¿¡ÀÌÄÞÀÎÅÍ³»¼Å³¯</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>Á¶Á÷±¸¼º</font></a>");
siteSmallMenu["guide.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Intro/Guide.aspx'><font class='txt_l t03'>ÀÌ¿ë¾È³»</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>ÀÌ¿ë¾È³»</font></a>");
siteSmallMenu["roadinfo.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Intro/Guide.aspx'><font class='txt_l t03'>ÀÌ¿ë¾È³»</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>¿À½Ã´Â±æ</font></a>");
siteSmallMenu["seatinfo.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Intro/Guide.aspx'><font class='txt_l t03'>ÀÌ¿ë¾È³»</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>ÁÂ¼®¾È³»</font></a>");
siteSmallMenu["mainhall.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Institution/MainHall.aspx'><font class='txt_l t03'>±âº»½Ã¼³</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>´ë°ø¿¬Àå</font></a>");
siteSmallMenu["exhibition1.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Institution/MainHall.aspx'><font class='txt_l t03'>±âº»½Ã¼³</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>Á¦1 Àü½Ã½Ç</font></a>");
siteSmallMenu["exhibition2.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Institution/MainHall.aspx'><font class='txt_l t03'>±âº»½Ã¼³</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>Á¦2 Àü½Ã½Ç</font></a>");
siteSmallMenu["mechanism.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Institution/Mechanism.aspx'><font class='txt_l t03'>ºÎ´ë½Ã¼³</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>±â°è½Ç/Àü±â½Ç</font></a>");
siteSmallMenu["parking.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Institution/Mechanism.aspx'><font class='txt_l t03'>ºÎ´ë½Ã¼³</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>ÁÖÂ÷½Ã¼³</font></a>");
siteSmallMenu["etcmechanism.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='/Home/Institution/Mechanism.aspx'><font class='txt_l t03'>ºÎ´ë½Ã¼³</font></a> <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>±âÅ¸½Ã¼³</font></a>");

siteSmallMenu["searchschedule.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>ÀüÃ¼ÀÏÁ¤</font></a>");
siteSmallMenu["monthschedule.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>¿ù°£ÀÏÁ¤</font></a>");
siteSmallMenu["yearschedule.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>³â°£ÀÏÁ¤</font></a>");

siteSmallMenu["perflist.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>°ø¿¬°Ë»ö</font></a>");
siteSmallMenu["perfdetailinfo.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>°ø¿¬Á¤º¸</font></a>");
siteSmallMenu["perfplanning.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>±âÈ¹Àü</font></a>");

siteSmallMenu["rentinfomation.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>´ë°ü¾È³»</font></a>");
siteSmallMenu["rentrule.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>´ë°ü±Ô¾à</font></a>");
siteSmallMenu["rentfee.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>´ë°ü»ç¿ë·á</font></a>");

siteSmallMenu["boardnotice.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>°øÁö»çÇ×</font></a>");
siteSmallMenu["boardperfnews.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>°ø¿¬´º½º</font></a>");
siteSmallMenu["boardfree.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>ÀÚÀ¯°Ô½ÃÆÇ</font></a>");

siteSmallMenu["orderticketlist.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>¿¹¸ÅÈ®ÀÎ/Ãë¼Ò</font></a>");
siteSmallMenu["orderticketview.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>¿¹¸ÅÈ®ÀÎ/Ãë¼Ò</font></a>");
siteSmallMenu["receptionlist.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>¿µ¼öÁõ/¼¼±Ý°è»ê¼­</font></a>");
siteSmallMenu["memberinfoupt.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>È¸¿øÁ¤º¸ º¯°æ</font></a>");
siteSmallMenu["memberout.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>È¸¿øÅ»Åð</font></a>");

siteSmallMenu["login.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>·Î±×ÀÎ ÇÏ±â</font></a>");
siteSmallMenu["namecheck.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>È¸¿ø°¡ÀÔ</font></a>");
siteSmallMenu["memberjoin.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>È¸¿ø°¡ÀÔ</font></a>");
siteSmallMenu["agree.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>È¸¿ø°¡ÀÔ</font></a>");
siteSmallMenu["memberprotect.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>°³ÀÎÁ¤º¸ Ãë±Þ¹æÄ§</font></a>");
siteSmallMenu["idpwfind.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>¾ÆÀÌµð/ÆÐ½º¿öµå Ã£±â</font></a>");

siteSmallMenu["sitemap.aspx"] = new objmenuItem(" <img src='/images/common/arr2.gif' align='bottom'> <a href='#'><font class='txt_l t03 b'>»çÀÌÆ®¸Ê</font></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 "<span class='blind'>ÇöÀç ÆäÀÌÁö À§Ä¡ :</span> <img src='/images/common/icon_home.gif' alt=''><a href='/Home/Main.aspx'>HOME</a> ";
}

function MediumCategory(folder){
	if(siteMediumMenu[folder] != null){
		return siteMediumMenu[folder].url;
	}
	return "";
}

function EndCategory(path){
	if(siteSmallMenu[path] != null)
	{
	   return siteSmallMenu[path].url;
	}
	return "";
}

//ÀÌº¥Æ®°ü¸® ½ÃÀÛ
function OpenEventApply(jsPSIdEvent, jsPSMenuGb) 
{
    var jsLSUrl = "/Home/EventMgmt/EventApply.aspx?idEvent=" + jsPSIdEvent + "&MenuGb=" + jsPSMenuGb;
    var jsLSWindowName = "PopEventApply";

    var jsLSTop = (window.screen.height - 573) / 2;
    var jsLSLeft = (window.screen.width - 976) / 2;

    var jsLSWindowSet = "top=" + jsLSTop + " ,left=" + jsLSLeft;
    var jsLSWindowStyle = jsLSWindowSet + ", width=435, height=580, toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=no";

    var wini = window.open(jsLSUrl, jsLSWindowName, jsLSWindowStyle);

    wini.focus();
}
//ÀÌº¥Æ®°ü¸® ³¡


//ÆË¾÷°ü¸® ½ÃÀÛ
function ClosePopupAd(jsPSDisPlay, jsPSCookieName) {
    if (jsPSCookieName.length > 0) {
        setCookie(jsPSCookieName, "done", 1);
    }

    document.getElementById(jsPSDisPlay).style.display = 'none';
}

function OpenPopupAd(jsPSDisPlay, jsPSIdPopupAd, jsPSIfrmStyle) {
    //	document.getElementById(jsPSDisPlay).style.display = (document.getElementById(jsPSDisPlay).style.display == "block") ? "none" : "block";
    document.getElementById(jsPSDisPlay).innerHTML = "<iframe id='popupAd_" + jsPSIdPopupAd + "_ifrm' src='/Common/Element/SiteMgmt/PopupAd/PopupAd.aspx?dpId=" + jsPSDisPlay + "&IdPopupAd=" + jsPSIdPopupAd + "' style='" + jsPSIfrmStyle + "' marginheight=0 marginwidth=0 frameborder=0 scrolling=auto background=buttonface></iframe>";
}

function ClosePopupBnr(jsPSDisPlay, jsPSCookieName) {
    if (jsPSCookieName.length > 0) {
        setCookie(jsPSCookieName, "done", 1);
    }

    document.getElementById(jsPSDisPlay).style.display = 'none';
}

function OpenPopupBnr(jsPSDisPlay, jsPSIdPopupBnr, jsPSIfrmStyle) {
    //	document.getElementById(jsPSDisPlay).style.display = (document.getElementById(jsPSDisPlay).style.display == "block") ? "none" : "block";
    document.getElementById(jsPSDisPlay).innerHTML = "<iframe id='popupBnr_ifrm' src='/Common/Element/SiteMgmt/PopupBnr/PopupBnr.aspx?dpId=" + jsPSDisPlay + "&IdPopupBnr=" + jsPSIdPopupBnr + "' style='" + jsPSIfrmStyle + "' marginheight=0 marginwidth=0 frameborder=0 scrolling=auto background=buttonface></iframe>";
}
//ÆË¾÷°ü¸® ³¡

var jsGSTopMenuDepth1 = 0
var jsGSTopMenuDepth2 = 0
var jsGSLeftMenuDepth1 = 0
var jsGSLeftMenuDepth2 = 0

function SetMenuDepth() 
{
    var jsLSUrl = document.URL.toLowerCase();

    var jsLAUrl = jsLSUrl.split('?');
    var jsLSPage = jsLAUrl[0];
    var jsLSParam = jsLAUrl[1];

    if (jsLSPage.indexOf("perfinfo.aspx") != -1) {
        if (jsLSParam.indexOf("idperfgroup=13") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 2; jsGSLeftMenuDepth1 = 2; jsGSLeftMenuDepth2 = 0; }
        else if (jsLSParam.indexOf("idperfgroup=12") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 1; jsGSLeftMenuDepth2 = 0; }
        else if (jsLSParam.indexOf("idperfgroup=11") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 10; }
        else if (jsLSParam.indexOf("idperfgroup=10") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 9; }
        else if (jsLSParam.indexOf("idperfgroup=9") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 8; }
        else if (jsLSParam.indexOf("idperfgroup=8") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 7; }
        else if (jsLSParam.indexOf("idperfgroup=7") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 6; }
        else if (jsLSParam.indexOf("idperfgroup=6") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 5; }
        else if (jsLSParam.indexOf("idperfgroup=5") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 4; }
        else if (jsLSParam.indexOf("idperfgroup=4") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 3; }
        else if (jsLSParam.indexOf("idperfgroup=3") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 2; }
        else if (jsLSParam.indexOf("idperfgroup=2") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 1; }
        else if (jsLSParam.indexOf("idperfgroup=1") != -1) { jsGSTopMenuDepth1 = 0; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 0; jsGSLeftMenuDepth2 = 0; }

    }
    else if (jsLSPage.indexOf("planspace.aspx") != -1) { jsGSTopMenuDepth1 = 1; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 3; jsGSLeftMenuDepth2 = 0; }  
    else if (jsLSPage.indexOf("ticketbookinglist.aspx") != -1) { jsGSTopMenuDepth1 = 1; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 3; jsGSLeftMenuDepth2 = 0; }
    else if (jsLSPage.indexOf("ticketbookinginfo.aspx") != -1) { jsGSTopMenuDepth1 = 1; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 3; jsGSLeftMenuDepth2 = 1; }
    else if (jsLSPage.indexOf("normalnotice.aspx") != -1) { jsGSTopMenuDepth1 = 2; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 4; jsGSLeftMenuDepth2 = 0; }
    else if (jsLSPage.indexOf("perfcomment.aspx") != -1) { jsGSTopMenuDepth1 = 2; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 4; jsGSLeftMenuDepth2 = 1; }
    else if (jsLSPage.indexOf("freeboard.aspx") != -1) { jsGSTopMenuDepth1 = 2; jsGSTopMenuDepth2 = 2; jsGSLeftMenuDepth1 = 4; jsGSLeftMenuDepth2 = 2; }
    else if (jsLSPage.indexOf("event.aspx") != -1) {
        if (jsLSParam.indexOf("menugb=4") != -1) { jsGSTopMenuDepth1 = 3; jsGSTopMenuDepth2 = 2; jsGSLeftMenuDepth1 = 5; jsGSLeftMenuDepth2 = 2; }
        else if (jsLSParam.indexOf("menugb=2") != -1) { jsGSTopMenuDepth1 = 3; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 5; jsGSLeftMenuDepth2 = 1; }
        else if (jsLSParam.indexOf("menugb=1") != -1) { jsGSTopMenuDepth1 = 3; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 5; jsGSLeftMenuDepth2 = 0; }
    }
    else if (jsLSPage.indexOf("member.aspx") != -1) { jsGSTopMenuDepth1 = 4; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 6; jsGSLeftMenuDepth2 = 0; }
    else if (jsLSPage.indexOf("login.aspx") != -1) { jsGSTopMenuDepth1 = 4; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 6; jsGSLeftMenuDepth2 = 1; }
    else if (jsLSPage.indexOf("idpwfind.aspx") != -1) { jsGSTopMenuDepth1 = 4; jsGSTopMenuDepth2 = 2; jsGSLeftMenuDepth1 = 6; jsGSLeftMenuDepth2 = 2; }
    else if (jsLSPage.indexOf("joinstep01.aspx") != -1) { jsGSTopMenuDepth1 = 4; jsGSTopMenuDepth2 = 3; jsGSLeftMenuDepth1 = 6; jsGSLeftMenuDepth2 = 3; }
    else if (jsLSPage.indexOf("privatemodify.aspx") != -1) { jsGSTopMenuDepth1 = 4; jsGSTopMenuDepth2 = 4; jsGSLeftMenuDepth1 = 6; jsGSLeftMenuDepth2 = 4; }
    else if (jsLSPage.indexOf("faq.aspx") != -1) { jsGSTopMenuDepth1 = 4; jsGSTopMenuDepth2 = 5; jsGSLeftMenuDepth1 = 6; jsGSLeftMenuDepth2 = 5; }
    else if (jsLSPage.indexOf("acomintro.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 0; }
    else if (jsLSPage.indexOf("ceogreeting.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 1; }
    else if (jsLSPage.indexOf("perfhistory01.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 2; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 2; }
    else if (jsLSPage.indexOf("perfhistory02.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 2; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 2; }
    else if (jsLSPage.indexOf("perfaward.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 3; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 3; }
    else if (jsLSPage.indexOf("rehearsalroom.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 4; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 4; }
    else if (jsLSPage.indexOf("rehearsalroomrent.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 4; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 4; }
    else if (jsLSPage.indexOf("bigtoptheater.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 5; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 5; }
    else if (jsLSPage.indexOf("bigtoprent.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 5; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 5; }
    else if (jsLSPage.indexOf("organization.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 6; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 6; }
    else if (jsLSPage.indexOf("locationinfo.aspx") != -1) { jsGSTopMenuDepth1 = 5; jsGSTopMenuDepth2 = 7; jsGSLeftMenuDepth1 = 7; jsGSLeftMenuDepth2 = 7; }
    else if (jsLSPage.indexOf("orderticketlist.aspx") != -1) { jsGSTopMenuDepth1 = 6; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 8; jsGSLeftMenuDepth2 = 0; }
    else if (jsLSPage.indexOf("orderticketview.aspx") != -1) { jsGSTopMenuDepth1 = 6; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 8; jsGSLeftMenuDepth2 = 0; }
    else if (jsLSPage.indexOf("orderpackageview.aspx") != -1) { jsGSTopMenuDepth1 = 6; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 8; jsGSLeftMenuDepth2 = 0; }
    else if (jsLSPage.indexOf("myreceipt.aspx") != -1) { jsGSTopMenuDepth1 = 6; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 8; jsGSLeftMenuDepth2 = 1; }
    else if (jsLSPage.indexOf("mycoupon.aspx") != -1) { jsGSTopMenuDepth1 = 6; jsGSTopMenuDepth2 = 0; jsGSLeftMenuDepth1 = 8; jsGSLeftMenuDepth2 = 2; }
    else if (jsLSPage.indexOf("serviceagreement.aspx") != -1) { jsGSTopMenuDepth1 = 6; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 9; jsGSLeftMenuDepth2 = 0; }
    else if (jsLSPage.indexOf("privateprotect.aspx") != -1) { jsGSTopMenuDepth1 = 6; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 9; jsGSLeftMenuDepth2 = 1; }
    else if (jsLSPage.indexOf("refusalmail.aspx") != -1) { jsGSTopMenuDepth1 = 6; jsGSTopMenuDepth2 = 1; jsGSLeftMenuDepth1 = 9; jsGSLeftMenuDepth2 = 2; }
}