// #####	Layout	##### //
//BrowserTitle
document.title = "SACTICKET";

//ÆäÀÌÁö ÀÌµ¿ÇÔ¼ö
function GoUrl(name, win) {
	//alert(name);
	if (name == null || name.value=="") {
			alert("¼­ºñ½º ÁØºñÁßÀÔ´Ï´Ù.");
			return;	
	} else {
		if (win == null) {
			if(name.indexOf("(") != -1) 	{
				eval(name);
			}else	{
				document.location.href = eval(name);
			}
		} else {
				window.open(eval(name), win);
		}
	}
}

function goLinkUrl(link, target){
	GoUrl('loc_'+link);
}

function goLink(link){
	//alert('loc_'+link);
	sd = link.split('/');
	//alert(link+"/"+sd[2]+":"+sd[3]);
	document.location.href= pub+"/genre/play/play_view.jsp?seq="+sd[0];
}
//::::::::::::::::::::::::::::::::::::::::::::::::::·Î±×ÀÎ½Ã º¯¼öÃ³¸®:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
//·Î±×ÀÎº¯¼ö
var ISLOGINED = "";
var str_cookie = document.cookie ;
var str_idx = str_cookie.indexOf("user_div");

//alert("str_idx:"+str_cookie.indexOf("user_div=1")+"::::"+str_idx);

if (str_idx>-1){
	//var str_cookie1 = str_cookie.substr(str_idx,10); 
	if (str_cookie.indexOf("user_div=1")>0){
		//alert(str_cookie1);
		ISLOGINED = "1";	
	} else {
		ISLOGINED = "";	//·Î±×ÀÎ¾ÈÇßÀ»¶§
	}
}
//document.writeln("±ÇÇÑ:"+ISLOGINED);

//ÄíÅ°»èÁ¦
function delcookie(){       		
		ISLOGINED = "";
		GoUrl('loc_kba');
 }

//::::::::::::::::::::::::::::::::::::::::::::::::::·Î±×ÀÎ½Ã º¯¼öÃ³¸®:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

/* HeaderWrap */
function setsearchSelectBox() {
	document.getElementById("searchSelectBox").style.display = "";
	document.getElementById("searchDiv").innerHTML = "ÅëÇÕ°Ë»ö <img src='../../images/common/bul/bul_arrow02.gif' alt='ºÐ·ù¼±ÅÃ' />";
}

function setsearchSelectDiv(str,n) {
	document.searchform1.genre.value=n;
	document.getElementById("searchDiv").innerHTML = str+" <img src='../../images/common/bul/bul_arrow02.gif' alt='ºÐ·ù¼±ÅÃ' />";
	document.getElementById("searchSelectBox").style.display = "none";	
	document.searchform1.searchKey.focus();
}

function inFocusNull(obj){
	obj.value="";
}

function TotalSearch() {
	if (document.searchform1.searchKey.value=="" || document.searchform1.searchKey.value=="°Ë»ö¾î¸¦ ÀÔ·Â")	{
		alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇØ ÁÖ½Ê½Ã¿ä");
		document.searchform1.searchKey.focus();
		return;
	}	
	document.searchform1.submit();
}

// °Ë»ö¾î ÀÔ·ÂÃ¢¿¡¼­ ¿£ÅÍ½Ã °Ë»ö
function TotalcheckEnter(){
	if(event.keyCode == 13) TotalSearch();
}

function headerWrap() {
	document.write('<div id="hearder-container">');
	document.write('	<div class="hearderTop">');
	document.write('		<div class="mainLogo"><a href="'+pub+'/index.jsp"><img src="../../images/main/logo.gif" alt="SAC Ticket" /></a></div>');
			
	document.write('		<div class="mainTopSearchForm">');
	document.write('		<form name="searchform1" method="post" action="/play/play_search.jsp">');	
	document.write('			<div class="searchSelect" onclick=javascript:setsearchSelectBox() id="searchDiv">ÅëÇÕ°Ë»ö<img src="../../images/common/bul/bul_arrow02.gif" alt="ºÐ·ù¼±ÅÃ" /></div>');
	document.write('			<div class="searchSelectBox" id="searchSelectBox"  style="display:none;">');
	document.write('				<ul>');
	document.write('					<li><a href=javascript:setsearchSelectDiv("ÅëÇÕ°Ë»ö") >ÅëÇÕ°Ë»ö</a></li>');
	document.write('					<li><a href=javascript:setsearchSelectDiv("°ø¿¬")>°ø¿¬</a></li>');
	document.write('					<li><a href=javascript:setsearchSelectDiv("À½¾Ç")>À½¾Ç</a></li>');
	document.write('					<li><a href=javascript:setsearchSelectDiv("Àü½Ã")>Àü½Ã</a></li>');
	document.write('					<li><a href=javascript:setsearchSelectDiv("ºäÆ¼ÇÃ¶óÀÌÇÁ")>ºäÆ¼ÇÃ¶óÀÌÇÁ</a></li>');
	document.write('					<li><a href=javascript:setsearchSelectDiv("°­ÁÂ")>°­ÁÂ</a></li>');
	document.write('					<li><a href=javascript:setsearchSelectDiv("VOD")>VOD</a></li>');
	document.write('					<li><a href=javascript:setsearchSelectDiv("Ãâ¿¬Áø")>Ãâ¿¬Áø</a></li>');
	document.write('				</ul>');
	document.write('			</div>');
	document.write('			<input type="hidden" name="TotalSch" />');
	document.write('			<input type="text" name="TotalKwd" class="inpFaqSearch" value="°Ë»ö¾î¸¦ ÀÔ·Â" onFocus="inFocusNull(this)" />');
	document.write('			<p class="searchBtn"><a href=javascript:TotalSearch()><img src="../../images/main/btnSearch.gif" alt="°Ë»ö" /></a></p>');
	document.write('		</div>');
	document.write('		</form>');
	
	document.write('		<div class="mainTopMenu">');
	document.write('			<ul class="mainTopLinkMenu">');

	if (ISLOGINED==""){
			document.write('				<li><a href=javascript:GoUrl("loc_kaa")><img src="../../images/main/linkMenuLogin.gif" alt="·Î±×ÀÎ" /></a></li>');
			document.write('				<li><a href=javascript:GoUrl("loc_laa")><img src="../../images/main/linkMenuMember.gif" alt="È¸¿ø°¡ÀÔ" /></a></li>');
	} else {
			document.write('				<li><a href=javascript:delcookie()><img src="../../images/main/linkMenuLogout.gif" alt="·Î±×¾Æ¿ô" /></a></li>');
			document.write('				<li><a href=javascript:GoUrl("loc_maa")><img src="../../images/main/linkMenuInfoedit.gif" alt="Á¤º¸¼öÁ¤" /></a></li>');
	}
	document.write('				<li><a href=javascript:GoUrl("loc_ma")><img src="../../images/main/mlinkMenuInfoedit.gif" alt="¸¶ÀÌÆäÀÌÁö" /></a></li>');
	document.write('				<li class="study"><a href="http://www.sacticket.co.kr/SacLecture/index.jsp" target="_blank"><img src="../../images/main/linkMenuStudy.gif" alt="°­ÁÂ" /></a></li>');
	document.write('				<li><a href=javascript:GoUrl("loc_j")><img src="../../images/main/linkMenuDesk.gif" alt="°í°´¼¾ÅÍ" /></a></li>');
	document.write('				<li><a href=javascript:GoUrl("sitemap")><img src="../../images/main/linkMenuSitemap.gif" alt="»çÀÌÆ®¸Ê" /></a></li>');
	document.write('				<li><a href=javascript:GoUrl("eng")><img src="../../images/main/linkMenuEnglish.gif" alt="English" /></a></li>');
	document.write('			</ul>');
	document.write('			<ul class="mainSpecialMenu">');
	document.write('				<li><a href=javascript:GoUrl("loc_gaa")><img src="../../images/main/menu01.gif" alt="SAC Friends" /></a></li>');
	document.write('				<li><a href=javascript:GoUrl("loc_haa")><img src="../../images/main/menu02.gif" alt="SAC Tour" /></a></li>');
	document.write('				<li class="last"><a href=javascript:GoUrl("loc_iaa")><img src="../../images/main/menu03.gif" alt="¾ÆÆ®¶ó¿îÁö" /></a></li>');
	document.write('			</ul>');
	document.write('		</div>');
	document.write('	</div>');
	document.write('	<div class="hearderGnb">');
	flashMenu(pub+'/images/swf/gnb.swf','gnb','100%','50', true, 'xml_url='+pub+'/common/xml/gnbXmlData.xml&font_url='+pub+'/images/swf/yoon340.swf&code='+depth1+'|'+depth2+'|'+depth3);
	document.write('	</div>');
	document.write('</div>');
}



function Location() {
	document.write('<div class="locationWrap">');
	document.write(toploc);
	document.write('</div>');
}

/* left */
function setLnbSize(h){
	var container = document.getElementById("lnbBox");
	container.style.height = h+"px";
	//alert("setLnbSize("+h+")");
}

function leftWrap() {
	//alert(depth1);
	//document.write('<div id="lnbBox" style="position:absolute; width:170px; z-index:4; border:1px solid black" class="leftWrap">'); 
	document.write('<div class="leftWrap" >'); 
	document.write('	<div id="lnbBox" class="leftFlash">');
	flashMenu(pub+'/images/swf/lnb.swf','lnb','100%','100%', true, 'xml_url='+pub+'/common/xml/lnbXmlData_'+depth1+'.xml&font_url='+pub+'/images/swf/yoon340.swf&code='+depth1+'|'+depth2+'|'+depth3);
	document.write('	</div>');

	if(	depth1 =="l" || depth1 =="k")  { //È¸¿ø°¡ÀÔ½Ã¸¸ ³ëÃâ
	document.write('<div class="memberBanner">');
	document.write('	<p><img src="../../images/etc/lnbTxt01.gif" alt="¿¹¼úÀÇÀü´ç ¸â¹ö½± È¸¿ø SACTicket °¡ÀÔÇÏ±â" /></p>');
	document.write('	<p class="mgt15 mgb15"><img src="../../images/etc/lnbTxt02.gif" alt="¿¹¼úÀÇÀü´ç °ñµå,ºí·ç, ¿ì¸®VÇÃ·¡Æ¼´½ ,ºñ¾¾ÇÃ·¡Æ¼´½ °í°´´Ôµé Áß¿¡¼­ SACTicket È¸¿ø°¡ÀÔÀ» ÇÏ½Ã¸é ¼ö¼ö·á ¾ø´Â ºü¸¥¿¹¸Å,°ø¿¬Á¤º¸ ´º½º·¹ÅÍ, ÀÌº¥Æ®ÀÀ¸ð µî ´Ù¾çÇÑ ¼­ºñ½º ÀÌ¿ëÀÌ °¡´ÉÇÏ½Ê´Ï´Ù." /></p>');
	document.write('	<p><a href="../../utility/member/member_offline_membership.jsp"><img src="../../images/common/btn/btnMemberEnter.gif" alt="È¸¿ø°¡ÀÔ" /></a></p>');
	document.write('</div>');
	}
	
	document.write('<div class="lnbTxt" id="lnbTxt">');
	document.write('	<ul>');
	//if(depth1=="b" ||depth1=="c" ||depth1=="d"||depth1=="e"||depth1=="f") {
	if(depth1=="b" ||depth1=="c") {
	document.write('		<li><a href=javascript:GoUrl("loc_eaa")><img src="../../images/etc/lpMenu01.gif" alt="ÆÐÅ°Áö¿¹¸Å" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_eba")><img src="../../images/etc/lpMenu02.gif" alt="Å×¸¶¿¹¸Å" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_fba")><img src="../../images/etc/lpMenu03.gif" alt="°ø°£ Á¤º¸" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_fca")><img src="../../images/etc/lpMenu04.gif" alt="°ø¿¬¡¤Àü½Ã ÀÏÁ¤" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_faa")><img src="../../images/etc/lpMenu05.gif" alt="¿¹¸Å °¡ÀÌµå" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_fda")><img src="../../images/etc/lpMenu06.gif" alt="¿¹¸Å±Ç µî·Ï" /></a></li>');	
	}
	if(depth1=="d") {
	document.write('		<li><a href=javascript:GoUrl("loc_eaa")><img src="../../images/etc/lpMenu01.gif" alt="ÆÐÅ°Áö¿¹¸Å" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_eba")><img src="../../images/etc/lpMenu02.gif" alt="Å×¸¶¿¹¸Å" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_fba")><img src="../../images/etc/lpMenu07.gif" alt="Àü½ÃÈ¸Àå Á¤º¸" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_fcb")><img src="../../images/etc/lpMenu08.gif" alt="°ø¿¬¡¤Àü½Ã ÀÏÁ¤" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_faa")><img src="../../images/etc/lpMenu05.gif" alt="¿¹¸Å °¡ÀÌµå" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_fda")><img src="../../images/etc/lpMenu06.gif" alt="¿¹¸Å±Ç µî·Ï" /></a></li>');		
	}
	if(depth1=="e") {
	document.write('		<li><a href=javascript:GoUrl("loc_fba")><img src="../../images/etc/lpMenu03.gif" alt="°ø°£ Á¤º¸" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_fcb")><img src="../../images/etc/lpMenu04.gif" alt="°ø¿¬¡¤Àü½Ã ÀÏÁ¤" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_faa")><img src="../../images/etc/lpMenu05.gif" alt="¿¹¸Å °¡ÀÌµå" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_fda")><img src="../../images/etc/lpMenu06.gif" alt="¿¹¸Å±Ç µî·Ï" /></a></li>');		
	}
	if(depth1=="f") {
	document.write('		<li><a href=javascript:GoUrl("loc_eaa")><img src="../../images/etc/lpMenu01.gif" alt="ÆÐÅ°Áö¿¹¸Å" /></a></li>');
	document.write('		<li><a href=javascript:GoUrl("loc_eba")><img src="../../images/etc/lpMenu02.gif" alt="Å×¸¶¿¹¸Å" /></a></li>');
	}
	document.write('	</ul>');
	document.write('</div>');

	//ÀÌº¥Æ® ¹è³Ê Ç¥½Ã

	document.write('<div class="eventBanner">');
	document.write('	<ul>');

	for (event_i=0;banner_cnt>event_i ;event_i++ )	{	
		document.write('		<li><a href="'+banner_link[event_i]+'"><img src="'+pub+'/upload/'+banner_img[event_i]+'" alt="'+banner_ttl[event_i]+'" /></a></li>');
	}
	document.write('	</ul>');
	document.write('</div>');
	document.write('</div>'); 	

}

/* h3Title */
function h3Title() {
	document.write('<h3><img src="'+pub+'/images/tit/h3Tit'+menu_code+'.gif" alt="'+eval("tit_"+menu_code)+'" /></h3>'); 
}		
		
/* footer 
function footerWrap() {
	document.write('<div id="footer-container"></div>'); 
}*/

/* footer 

function footerWrap() {	
	document.write('<div id="footer-container">');
	document.write('	<div class="footerLogo"><img src="../../images/main/footerLogo.gif" alt="¿¹¼úÀÇÀü´ç" /></div>');
	document.write('	<div class="footerText">');
	document.write('		<div class="footerAddress"><img src="../../images/main/footerAddress.gif" alt="¼­¿ï½Ã ¼­ÃÊ±¸ ³²ºÎ¼øÈ¯·Î 2406(¼­ÃÊµ¿ 700¹øÁö) ¿¹¼úÀÇ Àü´ç / »ç¾÷ÀÚ µî·Ï¹øÈ£:214-82-00264 / Åë½ÅÆÇ¸Å¾÷½Å°í ¼­ÃÊ Á¦0È£" /></div>');
	document.write('		<div class="footerCopy">');
	document.write('			<img src="../../images/main/footerCopy.gif" alt="SAC TICKET °í°´¼¾ÅÍ:02-580-1300 | Copyright 2010 Seoul Arts Center All right Reserved." usemap="#footerMap"/>');
	document.write('			<map name="footerMap" id="footerMap">');
	document.write('			<area shape="rect" coords="166,-12,291,10" href="mailto:Webmaster@sacticket.co.kr" title="Webmaster@sacticket.co.kr"/>');
	document.write('			</map>');
	document.write('		</div>');
	document.write('	</div>');
	document.write('</div>');

	//alert(document.getElementById("footer-container").style.top);
}*/
function footerWrap() {	
	document.write('<div id="footer-container">');
	document.write('	<div class="footerLogo"><a href="http://www.sac.or.kr" target="_blank"><img src="../../images/main/footerLogo.gif" alt="¿¹¼úÀÇÀü´ç" /></a></div>');
	document.write('	<div class="footerText">');
	document.write('		<div class="footerAddress"><a href="/webhome/etc/etc/privateinfo.jsp">°³ÀÎÁ¤º¸Ãë±Þ¹æÄ§</a> | <a href="/webhome/etc/etc/agreement.jsp">ÀÌ¿ë¾à°ü</a> | »ç¾÷ÀÚ µî·Ï¹øÈ£ 214-82-00264 | Åë½ÅÆÇ¸Å¾÷½Å°í ¼­ÃÊ Á¦ 0706È£<br />¼­¿ï½Ã ¼­ÃÊ±¸ ³²ºÎ¼øÈ¯·Î 2406(¼­ÃÊµ¿ 700¹øÁö) ¿¹¼úÀÇÀü´ç | ´ëÇ¥ÀÚ ±èÀå½Ç</div>');
	document.write('		<div class="footerCopy">SAC TICKET °í°´¼¾ÅÍ 02-580-1300 | Webmaster@sacticket.co.kr Copyright 2010. Seoul Arts Center All right Reserved.</div>');
	document.write('	</div>');
	document.write('</div>');

	//alert(document.getElementById("footer-container").style.top);
}
	
	
/* h3Title */
function quickWrap() {
	/*
	if (window.addEventListener)
	window.addEventListener("load", staticbar, false)
	else if (window.attachEvent)
	window.attachEvent("onload", staticbar)
	else if (document.getElementById)
	window.onload=staticbar
	*/

	document.write('<div id="quickMenu-container">Äüºäº¸±â</div>');

	access_view(pub+"/common/jsp/quick.jsp","quickMenu-container");		
}


//:::::::::::::::::::::::::::::::::::::::::::::::::Äü¸Þ´º °ü·Ã ½ºÅ©¸³Æ®:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      oldonload();
      func();
    }
  }
}

function getPosition(){
	var start = parseInt(document.getElementById("quickMenu-container").style.top, 0);
	var end   = document.documentElement.scrollTop + 0;
	var term  = 1;

	if ( start != end ) {
		var scale = Math.ceil( Math.abs( end - start ) / 2 );
		
		if ( end < start )	
		scale = -scale;
		document.getElementById("quickMenu-container").style.top = start + scale + "px";
		term = 1;
	}
	setTimeout ("getPosition()", term);
}
function moveBanner() {
	if (!document.getElementById("quickMenu-container")) return false;
	document.getElementById("quickMenu-container").style.top = document.documentElement.scrollTop + "px";
	getPosition();
	return true;
}
addLoadEvent(moveBanner);



function flashMenu(url,id,width,height,trans,flashvars){
	var strFlashTag = new String();  
	if (navigator.appName.indexOf("Microsoft") != -1)    {
		strFlashTag += '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ';
		strFlashTag += 'codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=version=9,0,0,0" width="' + width + '" id="' + id + '" height="' + height + '">';
		strFlashTag += '<param name="movie" value="' + url + '"/>';      
		strFlashTag += '<param name="FlashVars" value="' + flashvars + '"/>';
		strFlashTag += '<param name="quality" value="best"/>';
		//strFlashTag += '<param name="bgcolor" value="' + bgcolor + '"/>';
		strFlashTag += '<param name="menu" value="false"/>';
		//strFlashTag += '<param name="salign" value="LT"/>';
		//strFlashTag += '<param name="scale" value="noscale"/>';
		if(trans==true){
			strFlashTag += '<param name="wmode" value="transparent"/>';
		}
		else{
			strFlashTag += '<param name="wmode" value="opaque"/>';
		}
		strFlashTag += '<param name="allowScriptAccess" value="sameDomain"/>';
		strFlashTag += '</object>';
	}
	else{
		strFlashTag += '<embed src="' + url + '?' + flashvars + '" ';
		strFlashTag += 'quality="best" ';
		//strFlashTag += 'bgcolor="' + bgcolor + '" ';
		strFlashTag += 'width="' + width + '" ';
		strFlashTag += 'height="' + height + '" ';
		strFlashTag += 'menu="false" ';
		strFlashTag += 'name="'+id+'" ';
		//strFlashTag += 'scale="noscale" ';
		//strFlashTag += 'salign="LT" ';
		if(trans==true){
			strFlashTag += 'wmode="transparent" ';
		}
		else{
			strFlashTag += 'wmode="opaque" ';
		}
		strFlashTag += 'allowScriptAccess="sameDomain" ';
		//strFlashTag += '<param name="FlashVars" value="' + flashvars + '"/>';
		strFlashTag += '</embed>';
	}
	document.write(strFlashTag);
}

/**
* themeVisual¿¡¼­ ºü¸¥¿¹¸Å È£Ãâ
*/
var flex_play_company_cd = "";
var flex_reg_company_cd = "";
var flex_program_cd = "";
var flex_popDiv="Y";

var PlayDate = "";
var PlaySeqCd = "";
var RegCompanyCd = "";
var ProgramCd = "";
var PlayDate = "";
var PlayStTime = "";
var PlaceCd = "";

var PackageUse ="";

function SetPackage(){
	PackageUse ="Y";	
}

function RetPackage(){
	PackageUse ="N";	
}

function quickTicket(str){	  
	RetPackage();  //ÆÐÅ°Áö°¡ ¾Æ´Ò¶§´Â  ÆÐÅ°Áö º¯¼ö N·Î ¼³Á¤
	//alert("ºü¸¥¿¹¸Å:"+str);
	flex_play_company_cd = "";
	flex_reg_company_cd = "";
	flex_program_cd = "";

	if (str==undefined){
		///alert("0000");
		flex_popDiv ="Y"; //»óÇ°È£Ãâ
		//checkIpinOK();
	} else {
		//ÇÃ·¹½¬¿¡¼­ ³Ñ¾î¿À´Â ÇÔ¼ö´Â ","°ú ¾Õ¿¡ seq¹øÈ£°¡ Æ÷ÇÔµÇ¹Ç·Î ÀÌ°ÍÀ» °øÅëÇü½Ä¿¡ ¸Â°Ô º¯È­
		//alert("1111");
		if(str.indexOf(",")>0) {
			//alert(str.indexOf(","));
			str =str.substring(str.indexOf(",")+1,str.length) ;			
			var spVal = str.split(',');			
		} else {
			var spVal = str.split('/');
			//alert("spVal:"+spVal);
		}

		
		//alert("spVal.length:"+spVal.length);
		if(spVal.length==4) {	
			flex_seq =spVal[0];
			flex_play_company_cd =spVal[1];
			flex_reg_company_cd =spVal[2];
			flex_program_cd =spVal[3];					
			if(flex_play_company_cd=="") {
				flex_popDiv ="Y"; //»óÇ°È£Ãâ				
			} else {	
				flex_popDiv ="P"; //ÆÐÅ°ÁöÈ£Ãâ
				alert("flex_popDiv:"+flex_popDiv);
			}
			//checkIpinOK();
		} else if(spVal.length==3) {	
			flex_reg_company_cd =spVal[1];
			flex_program_cd =spVal[2];				
		} else {
			flex_popDiv ="Y"; //»óÇ°È£Ãâ
			//checkIpinOK();
		}		
	}
	//alert("flex_reg_company_cd:"+flex_reg_company_cd);
	//alert("flex_program_cd:"+flex_program_cd);
	//alert("flexStart");
	
	//ÇÃ·º½º °ü·Ã layer View
	displayEle('quickLayerLogin','');
	//layer¿¡ iframe»ý¼º
	RegCompanyCd = flex_reg_company_cd;
	ProgramCd = flex_program_cd;

	access_view(pub+'/common/jsp/flex_certiframe.jsp?RegCompanyCd='+flex_reg_company_cd+'&ProgramCd='+flex_program_cd,'quickLayerLogin');
	Dimact();

}

function quickTicketPackage(str){	  
	
	flex_play_company_cd = "";
	flex_reg_company_cd = "";
	flex_program_cd = "";

	if (str==undefined){
		///alert("0000");
		flex_popDiv ="Y"; //»óÇ°È£Ãâ
		//checkIpinOK();
	} else {
		//ÇÃ·¹½¬¿¡¼­ ³Ñ¾î¿À´Â ÇÔ¼ö´Â ","°ú ¾Õ¿¡ seq¹øÈ£°¡ Æ÷ÇÔµÇ¹Ç·Î ÀÌ°ÍÀ» °øÅëÇü½Ä¿¡ ¸Â°Ô º¯È­
		//alert("1111");
		if(str.indexOf(",")>0) {
			//alert(str.indexOf(","));
			str =str.substring(str.indexOf(",")+1,str.length) ;			
			var spVal = str.split(',');			
		} else {
			var spVal = str.split('/');
			//alert("spVal:"+spVal);
		}

		
		//alert("spVal.length:"+spVal.length);
		if(spVal.length==4) {	
			flex_seq =spVal[0];
			flex_play_company_cd =spVal[1];
			flex_reg_company_cd =spVal[2];
			flex_program_cd =spVal[3];		
		} else if(spVal.length==3) {	
			flex_reg_company_cd =spVal[1];
			flex_program_cd =spVal[2];				
		} 	
	}
	//alert("flex_reg_company_cd:"+flex_reg_company_cd);
	//alert("flex_program_cd:"+flex_program_cd);
	//alert("flexStart");
	
	//ÇÃ·º½º °ü·Ã layer View
	displayEle('quickLayerLogin','');
	//layer¿¡ iframe»ý¼º
	RegCompanyCd = flex_reg_company_cd;
	ProgramCd = flex_program_cd;

	access_view(pub+'/common/jsp/flex_certiframe.jsp?PackageUse='+PackageUse+'&RegCompanyCd='+flex_reg_company_cd+'&ProgramCd='+flex_program_cd,'quickLayerLogin');
	Dimact();
			

}


//¿¹¸ÅÇÏ±â(È¸Â÷ ¹× ½Ã°£Á¤º¸ Æ÷ÇÔ ÇÃ·¢½º È£Ãâ)
function quickTicketDetail(var1,var2,var3) {
	    RetPackage();  //ÆÐÅ°Áö°¡ ¾Æ´Ò¶§´Â  ÆÐÅ°Áö º¯¼ö N·Î ¼³Á¤
		RegCompanyCd = var1;
		ProgramCd = var2;
		PlaceCd = var3;
		var spVal2 = document.getElementById("infoSeq").value.split(',');
		PlayDate = document.getElementById("infoDate").value;
		PlaySeqCd = spVal2[0];
		PlayStTime = spVal2[1];


		//alert(document.getElementById("infoSeq").value);
		//ÇÃ·º½º °ü·Ã layer View
		displayEle('quickLayerLogin','');
		//layer¿¡ iframe»ý¼º
		access_view(pub+'/common/jsp/flex_certiframe.jsp?RegCompanyCd='+RegCompanyCd+'&ProgramCd='+ProgramCd+'&PlayDate='+PlayDate+'&PlaySeqCd='+PlaySeqCd+'&PlayStTime='+PlayStTime+'&PlaceCd='+PlaceCd,'quickLayerLogin');
		Dimact();
}

//¿¹¸ÅÇÏ±â(½Ç¸íÀÎÁõ ¹× Áßº¹µî±Þ ¼±ÅÃÈÄ Ã³¸®)
function quickTicketReDetail() {	
	   // alert(pub+'/common/jsp/flex_certiframe.jsp?RegCompanyCd='+RegCompanyCd+'&ProgramCd='+ProgramCd+'&PlayDate='+PlayDate+'&PlaySeqCd='+PlaySeqCd+'&PlayStTime='+PlayStTime+'&PlaceCd='+PlaceCd);
		access_view(pub+'/common/jsp/flex_certiframe.jsp?PackageUse='+PackageUse+'&RegCompanyCd='+RegCompanyCd+'&ProgramCd='+ProgramCd+'&PlayDate='+PlayDate+'&PlaySeqCd='+PlaySeqCd+'&PlayStTime='+PlayStTime+'&PlaceCd='+PlaceCd,'quickLayerLogin');
		Dimact();
}
/* png ie6 */

function setPng24(obj) { 
	obj.width=obj.height=1; 
	obj.className=obj.className.replace(/\bpng24\b/i,''); 
	obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+ obj.src +"',sizingMethod='image');" 
	obj.src='';  
	return ''; 
}

/* ·¹ÀÌ¾î ÆË¾÷ ¶ç¿ì±â */
function ViewLayer2(str){
	//alert(document.getElementById(str).style.display);
	document.getElementById(str).style.display=''
 }

function HideLayer2(str){
	document.getElementById(str).style.display='none'
 }

/* altBox */
function initAlt(id){
	var target = document.getElementById(id); 
	target.style.display = (target.style.display == 'block' ? 'none':'block');
}

/* ÀÌ¹ÌÁö ·Ñ¿À¹ö */
function imgover(imgEl) {
	var imgEl = document.getElementById(imgEl);
	imgEl.src = imgEl.src.replace(".gif", "_on.gif");
}
function imgout(imgEl) {
	var imgEl = document.getElementById(imgEl);
	imgEl.src = imgEl.src.replace("_on.gif", ".gif");
}

function imgon() {
	this.src = this.src.replace("_off.gif", "_on.gif");
}
function imgoff() {
	this.src = this.src.replace("_on.gif", "_off.gif");
}


/* ÅÇ¸Þ´º */
function initTab(menuElId) {
	var tabMenu = document.getElementById(menuElId).getElementsByTagName("a");
	for(i=0; i<tabMenu.length; i++) {
		thismenu = tabMenu.item(i);
		thismenu.menuContainer = document.getElementById(menuElId);
		thismenu.targetEl = document.getElementById(tabMenu.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.getElementsByTagName("img").item(0).onmouseover = imgoff;
		thismenu.getElementsByTagName("img").item(0).onmouseout = imgoff;
		thismenu.onclick = tabClick;
	}
	initmenu = tabMenu.item(0);
	initmenu.targetEl.style.display = "block";
	initmenu.getElementsByTagName("img").item(0).onmouseover = imgon;
	initmenu.getElementsByTagName("img").item(0).onmouseout = imgon;
	initmenu.getElementsByTagName("img").item(0).onmouseover();
	initmenu.menuContainer.current = initmenu;
}

function initTabIdx(menuElId, index) {
	var tabMenu = document.getElementById(menuElId).getElementsByTagName("a");
	for(i=0; i<tabMenu.length; i++) {
		thismenu = tabMenu.item(i);
		thismenu.menuContainer = document.getElementById(menuElId);
		thismenu.targetEl = document.getElementById(tabMenu.item(i).href.split("#")[1]);
		thismenu.targetEl.style.display = "none";
		thismenu.getElementsByTagName("img").item(0).onmouseover = imgoff;
		thismenu.getElementsByTagName("img").item(0).onmouseout = imgoff;
		thismenu.onclick = tabClick;
	}
	initmenu = tabMenu.item(index);
	initmenu.targetEl.style.display = "block";
	initmenu.getElementsByTagName("img").item(0).onmouseover = imgon;
	initmenu.getElementsByTagName("img").item(0).onmouseout = imgon;
	initmenu.getElementsByTagName("img").item(0).onmouseover();
	initmenu.menuContainer.current = initmenu;
	thismenu = tabMenu.item(0);
	thismenu.getElementsByTagName("img").item(0).onmouseout();
}

function tabClick() {
	currentmenu = this.menuContainer.current;
	if (currentmenu != this) {
		currentmenu.targetEl.style.display = "none";
		currentmenu.getElementsByTagName("img").item(0).onmouseover = imgoff;
		currentmenu.getElementsByTagName("img").item(0).onmouseout = imgoff;
		currentmenu.getElementsByTagName("img").item(0).onmouseout();
	
		this.targetEl.style.display = "block";
		this.getElementsByTagName("img").item(0).onmouseover = imgon;
		this.getElementsByTagName("img").item(0).onmouseout = imgon;
		this.getElementsByTagName("img").item(0).onmouseover();
		this.menuContainer.current = this;
	}
	return false;
}

function setFocuse(tar){	
	location.href="#"+tar;
}

function layerSizechange(nm,position,index,left,top,width,height){
	var obj ;
	if(navigator.appName=='Netscape') {
		obj = document.getElementById(eval(nm));
	} else {		
		obj = eval(nm);		
	}	
	alert(obj.style.width);
		if(top>0)	obj.style.top  = top;
		if(left>0)	obj.style.left = left;			
		if(width>0)	obj.style.width = width; 
		if(height>0)	obj.style.height = height; 	
		if(index>0)	obj.style.zIndex = index; 
		alert(obj.style.width);
}
document.write("<div id='quickLayerLogin' style='background-color:transparent;position:absolute; z-index:1000;left:50%;margin-left:-470px;top:50px;width:420px;height:455px;padding:14px 0 0 17px;' resizable='YES'></div>");


/*----------------------- µõµå Ã³¸®----------------------- */
alpha = new Object
alpha = {
	clear  : function() {
				alpha.create().style.display = "none"
				document.getElementsByTagName('HTML')[0].style.overflow = "";
		},
	apply  : function(co,op) {
				var Alpha = alpha.create()
				var alphacolor = co ? co : "#FFFFFF"
				var opacity = op ? op : "60"
				document.getElementsByTagName('HTML')[0].style.overflow = "scroll";
				with (Alpha.style) {
					width      = document.body.scrollWidth + "px";
					height     = document.body.scrollHeight + "px";
					background = alphacolor;
					filter     = "alpha(opacity=" + opacity + ")";
					opacity    = op / 100;
					display    = "block";
				}
		},
	create : function() {
				if (!document.getElementById('alpha')) {
					var alphaDiv = document.createElement('div');
					alphaDiv.setAttribute('id', 'alpha');
					with(alphaDiv.style) {
						display  = "none";
						position = "absolute";
						top      = "0";
						left     = "0";
						right    = "-20px";
						zindex   = "1000";
					}
					document.body.appendChild(alphaDiv)
					window.onresize = alpha.resize
				}
				return document.getElementById('alpha')
		},
	resize : function() {
				var Alpha = alpha.create()
				with (Alpha.style) {
					width      = document.body.scrollWidth + "px";
					height     = document.body.scrollHeight + "px";
				}
		}
}
/*----------------------- µõµå Ã³¸®----------------------- */

function Dimact(){
	/* µõµå Ã³¸® */
	//alpha.apply('#000000','50');
}

function Dimdel(){
	/* µõµå ¾ø¾Ö±â */
	//alpha.clear();
}
