try{ document.execCommand("BackgroundImageCache", false, true); }catch(e){}
/* ----- userAgent Check ----- */
function showFlashObject(objID,objSource,objWidth,objHeight,objQuality,objWmode,objBgcolor,objXML){
if(objXML){
var chkMovie=0;
if(objSource.match(/=/))objSource=objSource+"&server="+objXML+"&chkMovie="+chkMovie;
else objSource=objSource+"?server="+objXML+"&chkMovie="+chkMovie;
}
var pageUrl=self.window.location.href;
if(!objID)objID="ShockwaveFlash1";
if(!objWidth)objWidth="0";
if(!objHeight)objHeight="0";
if(!objQuality)objQuality="high";
if(!objWmode)objWmode="transparent";
document.writeln('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,124,0" width="'+objWidth+'" height="'+objHeight+'" id="'+objID+'" align="middle">');
document.writeln('<param name="allowFullScreen" value="false" />');
document.writeln('<param name="scale" value="noscale" />');
document.writeln('<param name="movie" value="'+objSource+'" />');
document.writeln('<param name="allowScriptAccess" value="always" />');
document.writeln('<param name="menu" value="false" />');
document.writeln('<param name="quality" value="high" />');
document.writeln('<param name="bgcolor" value="'+objBgcolor+'" />');
document.writeln('<param name="wmode" value="'+objWmode+'" />');
document.writeln('<embed src="'+objSource+'" allowScriptAccess="always" menu="false" quality="high" bgcolor="'+objBgcolor+'" wmode="'+objWmode+'" width="'+objWidth+'" height="'+objHeight+'" name="'+objID+'" align="middle" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
document.writeln('</object>');
}
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 getStyleAtt(obj,stylePrp){
var att="";
if(obj.currentStyle){
stylePrp=stylePrp.replace(/\-(\w)/g,function(k,z){return z.toUpperCase();});
att=obj.currentStyle[stylePrp];
}
else if(document.defaultView&&document.defaultView.getComputedStyle){
att=document.defaultView.getComputedStyle(obj,null).getPropertyValue(stylePrp);
}
return att;
}
function getScrollY() {
	var scrollY;
	if (document.documentElement.scrollTop) {scrollY = document.documentElement.scrollTop;}
	else if (document.body.scrollTop) {scrollY = document.body.scrollTop;}
	else if (window.pageYOffset) {scrollY = pageYOffset;}
	else {scrollY = 0;}
	return scrollY;
}
function getUserWindowY(){
	var winY;
	if (window.innerHeight){winY = window.innerHeight;}
	else if (document.documentElement.clientHeight){winY = document.documentElement.clientHeight;}
	else if (document.body.clientHeight){winY = document.body.clientHeight;}
	return winY;
}
function scrollingBanner(obj, parent, offset, topY) {
	var k = 0.1; // 동적계수
	var objH = parseInt(getStyleAtt(obj, "height")); // 배너 세로 사이즈 - 스타일 시트에서 가져옴
	if (isNaN(objH)) return false;
	if (parent) var parentEl=document.getElementById(parent); // 영역 지정
	setInterval(function(){
		var agentY = getUserWindowY(); // 사용자 창 높이
		var scrollY = getScrollY(); // 스크롤 현재 높이
		var objY = parseInt(getStyleAtt(obj, "top")); // 배너 현재 높이
		//var targetY = agentY + scrollY - (objH + offset);
		var targetY = scrollY + topY;
		var distanceY = objY - targetY; // 배너와 목표지점과의 Y축 차이
		var steps = Math.abs(distanceY) * k; // 반복적으로 이동할 거리
		if (objY < targetY) {
			if (parent) {if (parseInt(obj.style.top)<parentEl.clientHeight-obj.clientHeight - offset) objY += Math.ceil(steps);}
			else objY += Math.ceil(steps);
		} // 스크롤바를 아래로 움직인 경우
		else if (objY > targetY) objY -= Math.ceil(steps);// 스크롤바를 위로 움직인 경우
		obj.style.top = objY + "px";

	}, 1);
}
function goTop(){document.documentElement.scrollTop = 0;} //top버튼 눌렀을때

function layerPW(ac) {
	document.getElementById("ly_password").style.display = ac;
}

function viewLayer(ac,obj) {
	obj = document.getElementById(obj);
	obj.style.display = ac;
}

function toggleList(tabContainer) {
	var tabContainer=document.getElementById(tabContainer)
	var triggers = tabContainer.getElementsByTagName("a");

	for(i = 0; i < triggers.length; i++) {
		if (triggers.item(i).href.split("#")[1])
			triggers.item(i).targetEl = document.getElementById(triggers.item(i).href.split("#")[1]);

		if (!triggers.item(i).targetEl)
			continue;

		triggers.item(i).targetEl.style.display = "none";
		triggers.item(i).className="";
		triggers.item(i).onclick = function () {
			if (tabContainer.current == this) {
				this.targetEl.style.display = "none";
				this.className="";
				tabContainer.current = null;
			} else {
				if (tabContainer.current) {
					tabContainer.current.targetEl.style.display = "none";
					tabContainer.current.className="";
				}
				this.targetEl.style.display = "block";
				this.className="on";
				tabContainer.current = this;
			}
			return false;
		}
	}
	//triggers.item(0).targetEl.style.display = "block";
}

//popup
function PopUpWindowOpen(surl, popupwidth, popupheight)
{
	Top = (window.screen.availHeight - popupheight) / 2;
	Left = (window.screen.availWidth - popupwidth) / 2;
	if (Top < 0) Top = 0;
	if (Left < 0) Left = 0;
	Future = "fullscreen=no,toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=no,left=" + Left + ",top=" + Top + ",width=" + popupwidth + ",height=" + popupheight;
	PopUpWindow = window.open(surl, "PopUpWindow", Future);
	PopUpWindow.focus();
}

