// ·¹ÇÁÆ® ¸Þ´º

var old_menu = '';
function menuclick( submenu) {
    if( old_menu != submenu ) {
    if( old_menu !='' ) {
        old_menu.style.display = 'none';
}
    submenu.style.display = 'block';
    old_menu = submenu;
    } else {
        submenu.style.display = 'none';
        old_menu = '';
    }
}

// ÇÃ·ÎÆÃ¹Ù
var persistclose=0 //set to 0 or 1. 1 means once the bar is manually closed, it will remain closed for browser session
var startX = 890 //set x offset of bar in pixels
var startY = 260 //set y offset of bar in pixels

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

var verticalpos="fromtop"

function closebar(){
if (persistclose)
document.cookie="remainclosed=1"
document.getElementById("topbar").style.visibility="hidden"
}

function staticbar(){

    var ns = (navigator.appName.indexOf("Netscape") != -1);
    var d = document;
    function ml(id){
        var el=d.getElementById(id);
        if (!persistclose || persistclose && get_cookie("remainclosed")=="")
        el.style.visibility="visible"
        if(d.layers)el.style=el;
        el.sP=function(x,y){this.style.left=x+"px";this.style.top=y+"px";};
        el.x = startX;
        if (verticalpos=="fromtop")
        el.y = startY;
        else{
        el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
        el.y -= startY;
        }
        return el;
    }
    window.stayTopLeft=function(){
        if (verticalpos=="fromtop"){
        var pY = ns ? pageYOffset : iecompattest().scrollTop;
        ftlObj.y += (pY + startY - ftlObj.y)/8;
        }
        else{
        var pY = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
        ftlObj.y += (pY - startY - ftlObj.y)/8;
        }
        ftlObj.sP(ftlObj.x, ftlObj.y);
        setTimeout("stayTopLeft()", 10);
    }
    ftlObj = ml("topbar");
    stayTopLeft();
}

/*if (window.addEventListener)
window.addEventListener("load", staticbar, false)
else if (window.attachEvent)
window.attachEvent("onload", staticbar)
else if (document.getElementById)
window.onload=staticbar*/


// ·Ñ¿À¹öÀÌ¹ÌÁö
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_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_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_swapImage_1(a,b,c,d) { //v3.0
  for(i = 1 ; i <= 5 ; i++){
		document.getElementById("noTable" + i).style.display = 'none';
		document.getElementById("tabmenu0"+i).src = "/gpms/resource/image/main/mn_tab0"+i+".gif";
	}
	document.getElementById("noTable" + d).style.display = '';
	document.getElementById(a).src = c;
}

function MM_swapImage_2(a,b,c,d) { //v3.0
  for(i = 1 ; i <= 5 ; i++){
		document.getElementById("submenu0" + i).style.display = 'none';
		document.getElementById("btn0"+i).src = "/gpms/resource/image/commom/btn_navi0"+i+".gif";
	}
	document.getElementById("submenu0" + d).style.display = '';
	document.getElementById(a).src = c;
}

function MM_swapImage_3(a,b,c,d,e,f) { //v3.0
	var ii = c;
	for(i = 1 ; i <= d-c+1 ; i++){
		document.getElementById("submenu"+ii).src = "/gpms/resource/image/commom/sub0"+b+"_mn0"+i+".jpg";
		ii++;
	}
	document.getElementById(a).src = e;
}

function DisplayMenu(index) {
	for (i=1; i<=3; i++){
		if (index == i) {
			thisMenu = eval("menu" + index + ".style");
			thisMenu.display = "";
		} else {
			otherMenu = eval("menu" + i + ".style");
			otherMenu.display = "none";
		}
	}
}

// Å×µÎ¸®
function autoBlur(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG")
document.body.focus();
}
//document.onfocusin=autoBlur;

var browser = (navigator.userAgent.indexOf("MSIE") != -1) ? "IE" : "FF";
function resize_iframe(ifr)
{
	var iframe_body = ifr.contentWindow.document.body;
	if (browser == "IE")  innerHeight = parseInt(iframe_body.scrollHeight, 10) + parseInt(iframe_body.offsetHeight - iframe_body.clientHeight + 20, 10);
	else innerHeight = parseInt(iframe_body.scrollHeight, 10);
	ifr.height = innerHeight;
}

// ÆÐ¹Ð¸®»çÀÌÆ® ÀÌµ¿
function go_url()
{
	var url = document.getElementById("ext_url").value;
	if (url != "")
	{
		window.open(document.getElementById('ext_url').value, 'family_site', '');
/*
		var f = document.getElementById("extUrlForm");
		f.action = url;
		f.submit();
*/
	}
	else
	{
		alert("»çÀÌÆ®¸¦ ¼±ÅÃÇÏ½Å ÈÄ GO ¹öÆ°À» Å¬¸¯ÇØÁÖ¼¼¿ä.");
	}
}




try { document.execCommand("BackgroundImageCache", false, true);} catch(err) {}

//Å¾¸Þ´º
function top2menuView(a) //2Â÷¸Þ´ºº¸±â
{
	if(this.id){
		eidStr = this.id;
		eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length);
		a = parseInt(eidNum);
	}
	top2menuHideAll();
	top1Menu = document.getElementById("top1m"+a);
	top2Menu = document.getElementById("top2m"+a);
	if(a<10){ann='0'+a;} else {ann=''+a;}
	if (a==0) { //¸ÞÀÎÀº2Â÷¸Þ´ºÈ°¼ºÈ­¾ÈÇÔ
	} else {
		if (top1Menu) {
			top1Menu.getElementsByTagName("img")[0].src=top1Menu.getElementsByTagName("img")[0].src.replace("_off.gif","_on.gif");
			if (top2Menu) { 
				top2Menu.style.display = 'inline';
				}
		}
	}
}
function top2menuHide(a) //2Â÷¸Þ´º°¨Ãß±â
{
	if(this.id){
		eidStr = this.id;
		eidNum=eidStr.substring(eidStr.lastIndexOf("m",eidStr.length)+1,eidStr.length);
		a = parseInt(eidNum);
	}
	//top2menuHideAll();
	top1Menu = document.getElementById("top1m"+a);
	top2Menu = document.getElementById("top2m"+a);
	top1MenuCurr = document.getElementById("top1m"+d1n);
	top2MenuCurr = document.getElementById("top2m"+d1n);
	if(a<10){ann='0'+a;} else {ann=''+a;}
	if (top1Menu) {
		top1Menu.getElementsByTagName("img")[0].src=top1Menu.getElementsByTagName("img")[0].src.replace("_on.gif","_off.gif");
		if (top2Menu) { top2Menu.style.display = 'none'; }
		
		if (top1MenuCurr) {
			top1MenuCurr.getElementsByTagName("img")[0].src = top1MenuCurr.getElementsByTagName("img")[0].src.replace("_off.gif","_on.gif");
		}
		
		if (top2MenuCurr) { 
			top2MenuCurr.style.display = 'inline';
		}
	}
}

function top2menuHideAll() //2Â÷¸Þ´º¸ðµÎ°¨Ãß±â
{
	top1menuEl = document.getElementById("top1menu").childNodes;
	for (i=1;i<=top1menuEl.length;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		if(i<10){inn='0'+i;} else {inn=''+i;}
		if (top1Menu) {
			top1Menu.getElementsByTagName("img")[0].src=top1Menu.getElementsByTagName("img")[0].src.replace("_on.gif","_off.gif");
			if (top2Menu) { top2Menu.style.display = 'none'; }
		}
	}
}

function initTopMenu(d1,d2) {
	d1n = d1;
	d2n = d2;
	d1nn = (d1n<10) ? '0'+d1n : d1n;
	d2nn = (d2n<10) ? '0'+d2n : d2n;
	var topmenu = document.getElementById("topmenu");
	//if(topmenu) topmenu.style.background = "url(../images/top_menu_"+d1nn+"_menubg.gif) no-repeat";
	top1menuEl = document.getElementById("top1menu").childNodes;
	
	for (i=1;i<=top1menuEl.length;i++)
	{
		top1Menu = document.getElementById("top1m"+i);
		top2Menu = document.getElementById("top2m"+i);
		if (top1Menu) {
			top1Menu.onmouseover = top1Menu.onfocus = top2menuView;
			//top1Menu.onmouseout = top2menuHide;
			if (top2Menu) { 
				//top2Menu.onmouseover = top2Menu.onfocus = top2menuView;
				//top2Menu.onmouseout = top2menuHide;
			}
		}
	}
	top2MenuCurrAct = document.getElementById("top2m"+d1n+"m"+d2n);
	if (top2MenuCurrAct) {
		//top2MenuCurrAct.getElementsByTagName('a')[0].className = "active";
		top2MenuCurrAct.getElementsByTagName("a")[0].style.color="#faff83";
	  top2MenuCurrAct.getElementsByTagName("a")[0].style.fontWeight="bold";
	  top2MenuCurrAct.getElementsByTagName("a")[0].style.letterSpacing="-2px";
	}
	top2menuHide(d1);
}


function displayToggle(arg) {
	obj = document.getElementById(arg);
	if(obj.style.display == "block") obj.style.display = "none";
	else obj.style.display = "block";
}

function displayOver() {
	this.style.display = 'block';
}

function displayOut() {
	this.style.display = 'none';
}


//»õÃ¢¶çÀ§±â

var win1Open = null;

function displayImage(picName, windowName, windowWidth, windowHeight){
	return window.open(picName,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + (parseInt(windowWidth)+20) + ",height=" + (parseInt(windowHeight)+15)) 
}

function winClose(){
if(win1Open != null) win1Open.close() ;
}

function doNothing(){}

function displayImage(picName, windowName, windowWidth, windowHeight){
var winHandle = window.open("" ,windowName,"toolbar=no,scrollbars=no,resizable=no,width=" + windowWidth + ",height=" + windowHeight)
if(winHandle != null){
var htmlString = "<html><head><title>Picture</title></head>" 
htmlString += "<body leftmargin=0 topmargin=0 marginwidth=0 marginheight=0>"
htmlString += "<a href=javascript:window.close()><img src=" + picName + " border=0 alt=Ã¢´Ý±â></a>"
htmlString += "</body></html>"
winHandle.document.open()
winHandle.document.write(htmlString)
winHandle.document.close()
} 
if(winHandle != null) winHandle.focus()
return winHandle
}
//-->


function hideLayer (obj) {
		obj = document.getElementById(obj);
		obj.style.display = 'none';
}

function showLayer (obj) {
		obj = document.getElementById(obj);
		obj.style.display = 'block';
}


//ÀÌ¹ÌÁö ·Ñ¿À¹ö
//<!--
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 imageOver(imgEl) {
	imgEl.src = imgEl.src.replace("_off.gif", "_on.gif");
}
function imageOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", "_off.gif");
}

//ÀÌ¹ÌÁö ·Ñ¿À¹ö
function imgMenuOver(containderID) {
	var objwrap = document.getElementById(containderID);
	var imgMenu = objwrap.getElementsByTagName("a");

	for (i=0; i<imgMenu.length; i++) {
		if(imgMenu[i].getElementsByTagName("img").length == 0) continue;

		if (imgMenu[i].getElementsByTagName("img")[0].src.indexOf("_on.gif") != -1 ) {
			continue;
		}
		imgMenu[i].onmouseover = function() {
			subImage = this.getElementsByTagName("img")[0];
			if (subImage.src.indexOf("_on.gif") != -1) return false;
			subImage.src = subImage.src.replace("_off.gif","_on.gif");
		}
		imgMenu[i].onfocus = function() {
			subImage = this.getElementsByTagName("img")[0];
			if (subImage.src.indexOf("_on.gif") != -1) return false;
			subImage.src = subImage.src.replace("_off.gif","_on.gif");
		}
		imgMenu[i].onmouseout = function() {
			subImage = this.getElementsByTagName("img")[0];
			subImage.src = subImage.src.replace("_on.gif", "_off.gif");
		}
		imgMenu[i].onblur = function() {
			subImage = this.getElementsByTagName("img")[0];
			subImage.src = subImage.src.replace("_on.gif", "_off.gif");
		}
	}
}


//------------------- SWF Á¦¾îÇÔ¼ö ½ÃÀÛ

function SWFLoader() {
	var obj = new String;
	var parameter = new String;
	var embed = new String;
	
	var classId = new String;
  var codeBase = new String;
	var pluginSpage = new String;
	var embedType = new String;	
	var allParameter = new String;	
	
	var src = new String;
	var width = new String;
	var height = new String;
	var id = new String;
	var layer = new String;
	var arg = new String;
	var altText = new String;
	var wmode = new String;

	this.init = function ( w, h, s, a,wm) {
		width = w; //³ÐÀÌ
		height = h; //³ôÀÌ
		src = s; //ÆÄÀÏ°æ·Î
		arg = a; // ¸Å°³º¯¼ö
		if(!wm){
		wmode = 'transparent'; //¸ðµå¼³Á¤
		}

		classId = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000';
		codeBase = 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0';
		pluginSpage = 'http://www.macromedia.com/go/getflashplayer';
		embedType = 'application/x-shockwave-flash';

		parameter += "<param name='allowScriptAccess' value='always'>\n";
		parameter += "<param name='allowFullScreen' value='false'\n>";
		parameter += "<param name='movie' value='"+ s + "'>\n";
		parameter += "<param name='quality' value='high'>\n";
		parameter += "<param name='base' value='.'>\n";
		parameter += "<param name='FlashVars' value='"+a+"'>\n";
	}
	
	

	//ÇÃ·¡½Ã ¿ÀºêÁ§Æ® ¿É¼Ç¼³Á¤
	this.parameter = function ( param, value ) {
		 parameter += "<param name='"+param +"' value='"+ value + "'>\n";
	}

	// ÇÃ·¡½Ã wmode ¼³Á¤ setFlash.wmode('window')
	this.wmode = function ( value ) {
		wmode = value;
	}

	// ÇÃ·¡½Ã ¾ÆÀÌµð ¼³Á¤
	this.id = function ( value ) {
		id = value;
	}
	
	// ÇÃ·¡½Ã ´ëÃ¼ÅØ½ºÆ® ¼³Á¤
	
	this.alt = function ( value ) {
		altText = value;
	}

	// ÇÃ·¡½Ã »ðÀÔ ·¹ÀÌ¾î ¼³Á¤
	this.layer = function ( value ) {
		if(value == undefined) {
			layer = "";
		} else {
			layer = value;
		}
	}

	this.show = function () {
		obj = '<object id="'+id+'" width="'+width+'" height="'+height+'" classid="'+classId+'" codebase="'+codeBase+'">\n'+
			parameter +
			'<param name="wmode" value="'+wmode+'">\n'+
			'<!--[if !IE]>-->\n' +
			'<object type="application/x-shockwave-flash" data="' + src + '" width="' + width + '" height="' + height + '" name="' + id + '">\n' +
				parameter +
				'<param name="wmode" value="'+wmode+'">\n'+
			'<!--<![endif]-->\n' +
				'<div class="alt-content alt-' + id + '">' + altText + '</div>\n' +
			'<!--[if !IE]>-->\n' +
			'</object>\n' +
			'<!--<![endif]-->\n' +
		'</object>';

		if(layer == "") {
			document.write(obj);
		}else{
			var div = document.getElementById( layer);
			div.style.display = "";
			div.innerHTML = obj;
		}
	}
}

function hideSWFLayer( div) {
	var div = document.getElementById( div);
	div.style.display = "";
	div.innerHTML = "";
}

function thisMovie(movieName) {
	if (navigator.appName.indexOf("Microsoft") != -1) {
		return window[movieName];
	}
	else {
		return document[movieName];
	}
}

function callExternalInterface(movieId) {
  thisMovie(movieId).moveMc();	
}
//------------------- SWF Á¦¾îÇÔ¼ö ³¡


//ÅÇ¸Þ´º °øÅëÀûÀ¸·Î »ç¿ë
//ex) tabOn(1,1);
function tabOn(tabid,a) {
	for (i=1;i<=10;i++) {
		if(i<10){inn="0"+i;} else {inn=""+i;}
		tabMenu = document.getElementById("tab"+tabid+"m"+i);
		tabContent = document.getElementById("tab"+tabid+"c"+i);
		tabMore = document.getElementById("tab"+tabid+"more"+i);
		tabImg = document.getElementById("tab"+tabid+"img"+i);
		
		if (tabMenu) { //°´Ã¼°¡Á¸ÀçÇÏ¸é
			if (tabMenu.tagName=="IMG") { tabMenu.src = tabMenu.src.replace("on.gif", ".gif"); } //ÀÌ¹ÌÁöÀÏ¶§
			if (tabMenu.tagName=="A") { tabMenu.className=""; } //¾ÞÄ¿ÀÏ¶§
		}
		if (tabContent) { tabContent.style.display="none"; }
		if (tabMore) { tabMore.style.display="none"; }
		if (tabImg) { tabImg.style.display="none"; }

	}
	if(a<10){ann="0"+a;} else {ann=""+a;}
	tabMenu = document.getElementById("tab"+tabid+"m"+a);
	tabContent = document.getElementById("tab"+tabid+"c"+a);
	tabMore = document.getElementById("tab"+tabid+"more"+a);
	tabImg = document.getElementById("tab"+tabid+"img"+a);
//	alert(tabMenu.tagName);

	if (tabMenu) { //°´Ã¼°¡Á¸ÀçÇÏ¸é
		if (tabMenu.tagName=="IMG") { tabMenu.src = tabMenu.src.replace(".gif", "on.gif"); } //ÀÌ¹ÌÁöÀÏ¶§
		if (tabMenu.tagName=="A") { tabMenu.className="on"; } //¾ÞÄ¿ÀÏ¶§
	}
	if (tabContent) { tabContent.style.display="block"; }
	if (tabMore) { tabMore.style.display="block"; }
	if (tabImg) { tabImg.style.display="block"; }
}


//¸ÞÀÎ ÆË¾÷Á¸
//<!--

	var popScrollerHeight = 127;		// ½ºÅ©·Ñ·¯ÀÇ ¼¼·Î
	var popTotalArea = 0;
	var pWait = true;
	var pMouseOver = false;
	var popScrollSpeed = 1;			// popchanging ¼Óµµ
	var popWaitTime = 4000;			// ¸ØÃß´Â ½Ã°£ ÆË¾÷Á¸
	var popTemp = 0;
	var popMovingAmount = popScrollerHeight * 1;	//height °ö¿¡ µû¶ó ½ºÅ©·Ñ¸µ µÇ´Â ·¹ÀÌ¾î Å©±â ÁöÁ¤
	var arrScrollContent2 = new Array();
	var poploop = 1;
	var popObjCnt;



	function startscroll2(totCnt) {			// ½ºÅ©·Ñ ½ÃÀÛ
		popObjCnt = totCnt;
		popchanging();

		if (!pMouseOver && pWait) {
			window.setInterval('popchanging()', popWaitTime);
		}
	}

	function popchanging() {// ½ÇÁ¦·Î ½ºÅ©·Ñ ÇÏ´Â ºÎºÐ

		if (!pMouseOver && pWait) {
			var imgNum = "";

			if(poploop < 10) imgNum = '0';
			imgNum = imgNum + poploop;

			var objName = "popbt" + imgNum;
			var viewObjName = "mainpop" + imgNum;
			var obj = document.getElementById(objName);
			var viewObj = document.getElementById(viewObjName);

			viewObj.style.visibility = 'visible';
			obj.src = "images/main/number_on_" + imgNum + ".gif";

			for(var i = 1; i <= popObjCnt; i++) {

				if(i == poploop) continue;
				imgNum = "";

				if(i < 10) imgNum = "0";

				imgNum = imgNum + i;

				var tmpobjName = "popbt" + imgNum;
				var tmpviewObjName = "mainpop" + imgNum;

				var tmpobj = document.getElementById(tmpobjName);
				var tmpviewObj = document.getElementById(tmpviewObjName);


				tmpviewObj.style.visibility = "hidden";

				tmpobj.src = "images/main/number_off_" + imgNum + ".gif";


			}

			poploop++;

			if(poploop > popObjCnt) poploop = 1;
		}
	}
//-->

//<!--

	function goPage(url) {
		parent.top.location.href = url;
	}

	function popoverImage(imgNum) {

		var objName = "popbt" + imgNum;
		var viewObjName = "mainpop" + imgNum;
		var scrollNum = parseInt(imgNum) - 1;
		var obj = document.getElementById(objName);
		var viewObj = document.getElementById(viewObjName);

		obj.src = "images/main/number_on_" + imgNum + ".gif";

		if(imgNum == "08") {
			poploop = 8;

		} else if(imgNum == "09") {
			poploop = 9;

		} else {
			poploop = parseInt(imgNum);
		}

		viewObj.style.visibility = "visible";

		for(var i = 1; i <= popObjCnt; i++) {
			if(i == poploop) continue;
			imgNum = "";

			if(i < 10) imgNum = "0";

			imgNum = imgNum + i;

			var tmpobjName = "popbt" + imgNum;
			var tmpviewObjName = "mainpop" + imgNum;
			var tmpobj = document.getElementById(tmpobjName);

			var tmpviewObj = document.getElementById(tmpviewObjName);
			tmpviewObj.style.visibility = "hidden";

			tmpobj.src = "images/main/number_off_" + imgNum + ".gif";
		}

		pMouseOver = true;
	}


	function popoutImage(imgNum) {

		if(pWait) {
			var objName = "popbt" + imgNum;
			var viewObjName = "mainpop" + imgNum;
			var obj = document.getElementById(objName);
			var viewObj = document.getElementById(viewObjName);
			var movingObj = document.getElementById("mainpop00");

			obj.src = "images/main/number_off_" + imgNum + ".gif";
			viewObj.style.visibility = "hidden";
			movingObj.style.visibility = "visible";

//			poploop = 1;

			pMouseOver = false;
			popchanging();
		}
	}

	function startpopchanging() {		// ½ºÅ©·Ñ Àç½ÃÀÛ
		pWait = true;
		popoutImage("01");
	}

	function stopscroll() {		// ½ºÅ©·Ñ Á¤Áö
		pWait = false;
	}

//-->


function info_tab(id) {
	if(id == 1) {
		$('#citizen_group div.tabcontent').show();
		$('#business_group div.tabcontent').hide();
		$('#tour_group div.tabcontent').hide();
		$('#citizen_group').find('h2 img').attr('src','images/main/citizen_group_title_on.gif');
		$('#business_group').find('h2 img').attr('src','images/main/business_group_title_off.gif');
		$('#tour_group').find('h2 img').attr('src','images/main/tour_group_title_off.gif');
	} else if(id == 2)  {
		$('#citizen_group div.tabcontent').hide();
		$('#business_group div.tabcontent').show();
		$('#tour_group div.tabcontent').hide();
		$('#citizen_group').find('h2 img').attr('src','images/main/citizen_group_title_off.gif');
		$('#business_group').find('h2 img').attr('src','images/main/business_group_title_on.gif');
		$('#tour_group').find('h2 img').attr('src','images/main/tour_group_title_off.gif');
	} else if (id == 3) {
		$('#citizen_group div.tabcontent').hide();
		$('#business_group div.tabcontent').hide();
		$('#tour_group div.tabcontent').show();
		$('#citizen_group').find('h2 img').attr('src','images/main/citizen_group_title_off.gif');
		$('#business_group').find('h2 img').attr('src','images/main/business_group_title_off.gif');
		$('#tour_group').find('h2 img').attr('src','images/main/tour_group_title_on.gif');
	}
}


/* °Ë»ö¼­ºñ½º */
function topSearch(searchsel,targetdiv) {
	var searchsel, targetdiv;
var searchContain = document.getElementById(searchsel);
var searchUlist = document.getElementById(searchsel).getElementsByTagName("ul")[0];
	if (!searchUlist) return false;
	else searchUlist.style.display = "none";
	var searchEle = searchUlist.getElementsByTagName("a");
	var targetEle = document.getElementById(targetdiv).getElementsByTagName("form");
	for(var i=0;i<searchEle.length;i++) {
		var searchEl = searchEle[i];
		searchEl.target = searchEl.getAttribute("href").split("#")[1];
		searchEl.onclick = function() {
			if(searchContain.getElementsByTagName("dt")[0].firstChild.nodeName == "A");
			{
				searchContain.getElementsByTagName("dt")[0].firstChild.innerHTML = this.innerHTML;
			}
			for(var j=0;j<targetEle.length;j++) {
				var targetEl = targetEle[j];
				if(targetEl.id == this.target) {
						targetEl.style.display = "block";
						var inputObj = targetEl.getElementsByTagName("input");
						for(var k=0;k<inputObj.length;k++) {
							inputObjArr = inputObj[k];
							switch(inputObjArr.type) {
								case 'hidden':
									break;
								case 'text':
									inputObjArr.focus();
									break;
							}
						}
					} else {
					targetEl.style.display = "none";
					}
				searchUlist.style.display = "none";
			}
			return false;
		}
	}
	searchUlist.onmouseover=function() { this.style.display="block"; }
	searchUlist.onmouseout=function() { this.style.display="none"; }
}

function displayOn() {//º¸ÀÌ±â
	var i,j,a=displayOn.arguments;
	for(var i=0;i<a.length;i++){
		var obj = document.getElementById(a[i]);
		if(obj){ obj.style.display = "block"; }
	}
}

function displayOff() {
	var i,j,a=displayOff.arguments;
	for(i=0;i<a.length;i++) {
		obj = document.getElementById(a[i]);
		if (obj) { obj.style.display = "none"; }
	}
}

//¼±ÅÃ»óÀÚ¹Ù·Î°¡±â
function goSelect(form,target) {
	var myindex=form.uri.selectedIndex
	myUri = form.uri.options[myindex].value;
	if(myUri!="") { window.open(myUri,target); }
}

function DisplayView(obj1, obj2) {
	var objElement = document.getElementById(obj1);
	objElement.onclick = function() {
		document.getElementById(obj2).style.display = "block";
	}
}



function PopupZone() {

	var Play = null;
	
	this.init = function( CreateName, ZoneName, ControlName, Height, Delay ) {
		
		// »ý¼ºµÈ °´Ã¼ ÀÌ¸§
		this.CreateName = CreateName;
		// ÆË¾÷Á¸ ÀÌ¸§
		this.ZoneName = ZoneName;
		// ÆË¾÷Á¸ ÄÁÆ®·Ñ ÀÌ¸§
		this.ControlName = ControlName;
		// ÆË¾÷Á¸ ³ôÀÌ
		this.Height = Height;
		// ÆË¾÷Á¸ µô·¹ÀÌ ½Ã°£
		this.Delay = Delay * 1000;
		// ÇöÀç ÆË¾÷
		this.CurrentPop = 0

		this.RollFlag = true;

		// ÆË¾÷Á¸ ¿ÀºêÁ§Æ®
		this.Zone = document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].getElementsByTagName("li");
		// ÆË¾÷Á¸ ÄÁÆ®·Ñ ¿ÀºêÁ§Æ®
		this.Control = document.getElementById(this.ControlName).getElementsByTagName("li");

		// ÆË¾÷Á¸ ³»¿ë ¼ö
		this.Length = this.Zone.length - 1;
		
		// ÀüÃ¼º¸±â
		this.ListButton = this.Control[0].getElementsByTagName("img")[0];
		// ÀÌÀü¹öÆ°
		this.PrevButton = this.Control[1].getElementsByTagName("img")[0];
		// ´ÙÀ½¹öÆ°
		this.NextButton = this.Control[2].getElementsByTagName("img")[0];
		
		// ½ÃÀÛ¹öÆ°
		this.StartButton = this.Control[3].getElementsByTagName("img")[0];
		// ÁßÁö¹öÆ°
		this.StopButton = this.Control[4].getElementsByTagName("img")[0];
		
		

		// ½ÃÀÛ¿¨Ä¿
		this.StartAnchor = this.Control[0].getElementsByTagName("a")[0];
		// Á¾·á¿¨Ä¿
		this.StopAnchor = this.Control[1].getElementsByTagName("a")[0];
		// ÀÌÀü¿¨Ä¿
		this.PrevAnchor = this.Control[2].getElementsByTagName("a")[0];
		// ´ÙÀ½¿¨Ä¿
		this.NextAnchor = this.Control[3].getElementsByTagName("a")[0];
		// ÀüÃ¼º¸±â
		this.ListAnchor = this.Control[4].getElementsByTagName("a")[0];

		// function ¿¡¼­ »ç¿ëÇÒ °´Ã¼ ÀúÀå
		var PopupZoneThis = this;

		// ÀÌº¥Æ® ¼³Á¤ --------------------------------------------------------------------------------------------

		// ½ÃÀÛ¹öÆ° On
		this.StartAnchor.onclick = function() {
			eval( PopupZoneThis.CreateName + ".Start()" );
		};

		// ¸ØÃã¹öÆ° On
		this.StopAnchor.onclick = function() {
			eval( PopupZoneThis.CreateName + ".Stop()" );
		};

		// ÀÌÀü¹öÆ° IN
		this.PrevAnchor.onmouseover = this.PrevAnchor.onfocus = function() {
			eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".PrevButton,true)" );
		};
		// ÀÌÀü¹öÆ° OUT
		this.PrevAnchor.onmouseout = this.PrevAnchor.onblur = function() {
			eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".PrevButton,false)" );
		};
		// ÀÌÀü¹öÆ° On
		this.PrevAnchor.onclick = function(event) {
			eval( PopupZoneThis.CreateName + ".Prev()" );
		};


		// ´ÙÀ½¹öÆ° IN
		this.NextAnchor.onmouseover = this.NextAnchor.onfocus = function() {
			eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".NextButton,true)" );
		};
		// ´ÙÀ½¹öÆ° OUT
		this.NextAnchor.onmouseout = this.NextAnchor.onblur = function() {
			eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".NextButton,false)" );
		};
		// ´ÙÀ½¹öÆ° On
		this.NextAnchor.onclick = function() {
			eval( PopupZoneThis.CreateName + ".Next()" );
		};

		// ÀüÃ¼º¸±â¹öÆ° IN
		this.ListAnchor.onmouseover = this.ListAnchor.onfocus = function() {
			eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".ListButton,true)" );
		};
		// ÀüÃ¼º¸±â¹öÆ° OUT
		this.ListAnchor.onmouseout = this.ListAnchor.onblur = function() {
			eval( PopupZoneThis.CreateName + ".ImageReplace(" + PopupZoneThis.CreateName + ".ListButton,false)" );
		};
		// ÀüÃ¼º¸±â¹öÆ° On
		this.ListAnchor.onclick = function() {
			eval( PopupZoneThis.CreateName + ".ListOpen()" );
		};


		// ÆË¾÷³»¿ë ÀÌº¥Æ® -----------------------------------------------------------------------------------------

		for( var LoopI=0; LoopI<=this.Length; LoopI++ ) {

			this.PopupLink = this.Zone[LoopI].getElementsByTagName("a")[0];
			this.PopupLink.LoopI = LoopI;
			this.PopupLink.CreateName = this.CreateName;
			
			this.PopupLink.onfocus = function() {
				eval( this.CreateName + ".On(" + this.LoopI + ")" );
			};

			this.PopupLink.onmouseover = function() {
				eval( this.CreateName + ".Stop()" );
			};
			
			this.PopupLink.onmouseout = function() {
				eval( this.CreateName + ".Start()" );
			};

		}

	};
	
	this.ListOpen = function() {
		document.getElementById("popup_list").style.display = 'block';
	};

	this.ListClose = function() {
		document.getElementById("popup_list").style.display = 'none';
	};

	// ÀÌ¹ÌÁö º¯È¯
	this.ImageReplace = function( ImgObject, Type ) {
		
		if( Type ) {
			ImgObject.src = ImgObject.src.replace("_off.gif","_on.gif");
		} else {
			ImgObject.src = ImgObject.src.replace("_on.gif","_off.gif");
		}
		
	};
	
	// ½ÃÀÛ
	this.Start = function() {

		if( this.Length >= 0 ) {

			this.ImageReplace(this.StartButton,true);
			this.ImageReplace(this.StopButton,false);

			this.RollFlag = true;
			var RollThis = this;
			var Action = function() {
				if( RollThis.RollFlag ) {
					RollThis.Next();
				}
			};
			
			Play = window.setInterval(Action,this.Delay);

		}

	};
	
	// ¸ØÃã
	this.Stop = function() {

		if( this.Length >= 0 ) {

			this.ImageReplace(this.StartButton,false);
			this.ImageReplace(this.StopButton,true);

			this.RollFlag = false;
			if( Play ) window.clearInterval(Play);
			Play = null;

		}

	};
	
	// ÀÌÀü
	this.Prev = function() {
		if( this.Length >= 0 ) {
			this.CurrentPop = ( this.CurrentPop <= 0 ) ? this.Length : --this.CurrentPop;
			this.Move();
		}
	};

	// ´ÙÀ½
	this.Next = function() {
		if( this.Length >= 0 ) {
			this.CurrentPop = ( this.CurrentPop >= this.Length ) ? 0 : ++this.CurrentPop;
			this.Move();
		}
	};
	
	// È°¼ºÈ­
	this.On = function( intPop ) {
		this.CurrentPop = intPop;
		this.Move();
	};

	// ÀÌµ¿
	this.Move = function() {
		var tmpTop = 0 - this.CurrentPop * this.Height;
		document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].style.top = tmpTop+ "px";
	};
	
}

function BannerZone() {
	
	this.init = function( CreateName, ZoneName, ControlName, Height ) {
		
		// »ý¼ºµÈ °´Ã¼ ÀÌ¸§
		this.CreateName = CreateName;
		// Á¸ ÀÌ¸§
		this.ZoneName = ZoneName;
		// Á¸ ÄÁÆ®·Ñ ÀÌ¸§
		this.ControlName = ControlName;
		// Á¸ ³ôÀÌ
		this.Height = Height;

		// ÇöÀç ¹è³Ê
		this.CurrentPop = 0

		// Á¸ ¿ÀºêÁ§Æ®
		this.Zone = document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].getElementsByTagName("li");
		// Á¸ ÄÁÆ®·Ñ ¿ÀºêÁ§Æ®
		this.Control = document.getElementById(this.ControlName).getElementsByTagName("li");

		// ¹è³Ê ³»¿ë ¼ö
		this.Length = this.Zone.length - 1;

		// ÀÌÀü¹öÆ°
		this.PrevButton = this.Control[0].getElementsByTagName("img")[0];
		// ´ÙÀ½¹öÆ°
		this.NextButton = this.Control[1].getElementsByTagName("img")[0];
		
		// ÀÌÀü¿¨Ä¿
		this.PrevAnchor = this.Control[0].getElementsByTagName("a")[0];
		// ´ÙÀ½¿¨Ä¿
		this.NextAnchor = this.Control[1].getElementsByTagName("a")[0];

		// function ¿¡¼­ »ç¿ëÇÒ °´Ã¼ ÀúÀå
		var PopupZoneThis = this;

		// ÀÌº¥Æ® ¼³Á¤ --------------------------------------------------------------------------------------------

		// ÀÌÀü¹öÆ° On
		this.PrevAnchor.onclick = function() {
			eval( PopupZoneThis.CreateName + ".Prev()" );
		};

		// ´ÙÀ½¹öÆ° On
		this.NextAnchor.onclick = function() {
			eval( PopupZoneThis.CreateName + ".Next()" );
		};


		// ³»¿ë ÀÌº¥Æ® -----------------------------------------------------------------------------------------

		for( var LoopI=0; LoopI<=this.Length; LoopI++ ) {

			this.PopupLink = this.Zone[LoopI].getElementsByTagName("a")[0];
			this.PopupLink.LoopI = LoopI;
			this.PopupLink.CreateName = this.CreateName;
			this.PopupLink.onfocus = function() {
				eval( this.CreateName + ".On(" + this.LoopI + ")" );
			};

		}

	};
	
	// ÀÌÀü
	this.Prev = function() {
		if( this.Length >= 0 ) {
			this.CurrentPop = ( this.CurrentPop <= 0 ) ? this.Length : --this.CurrentPop;
			this.Move();
		}
	};

	// ´ÙÀ½
	this.Next = function() {
		if( this.Length >= 0 ) {
			this.CurrentPop = ( this.CurrentPop >= this.Length ) ? 0 : ++this.CurrentPop;
			this.Move();
		}
	};
	
	// È°¼ºÈ­
	this.On = function( intPop ) {
		this.CurrentPop = intPop;
		this.Move();
	};

	// ÀÌµ¿
	this.Move = function() {
		var tmpTop = 0 - this.CurrentPop * this.Height;
		document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].style.top = tmpTop+ "px";
	};
	
}

//Æ÷Ä¿½º ·Ñ
function FocusRoll() {

	var PlayFocus = null;
	
	this.init = function( CreateName, ZoneName, ControlName, Height, Delay ) {
		
		// »ý¼ºµÈ °´Ã¼ ÀÌ¸§
		this.CreateName = CreateName;
		// ÆË¾÷Á¸ ÀÌ¸§
		this.ZoneName = ZoneName;
		// ÆË¾÷Á¸ ÄÁÆ®·Ñ ÀÌ¸§
		this.ControlName = ControlName;
		// ÆË¾÷Á¸ ³ôÀÌ
		this.Height = Height;
		// ÆË¾÷Á¸ µô·¹ÀÌ ½Ã°£
		this.Delay = Delay * 1000;
		// ÇöÀç ÆË¾÷
		this.CurrentPop = 0

		this.RollFlag = true;

		// ÆË¾÷Á¸ ¿ÀºêÁ§Æ®
		this.ZoneSub = document.getElementById(this.ZoneName).getElementsByTagName("dl")[0].getElementsByTagName("dd");
		this.Zone = document.getElementById(this.ZoneName).getElementsByTagName("dl")[0].getElementsByTagName("dt");
		// ÆË¾÷Á¸ ÄÁÆ®·Ñ ¿ÀºêÁ§Æ®
		this.Control = document.getElementById(this.ControlName);

		// ÆË¾÷Á¸ ³»¿ë ¼ö
		this.Length = this.Zone.length - 1;

		// ÀÌÀü¿¨Ä¿
		this.PrevAnchor = this.Control.getElementsByTagName("a")[0];
		// ´ÙÀ½¿¨Ä¿
		this.NextAnchor = this.Control.getElementsByTagName("a")[1];

		// function ¿¡¼­ »ç¿ëÇÒ °´Ã¼ ÀúÀå
		var PopupZoneThis = this;

		// ÀÌº¥Æ® ¼³Á¤ --------------------------------------------------------------------------------------------

		// ÀÌÀü¹öÆ° On
		this.PrevAnchor.onclick = function(event) {
			eval( PopupZoneThis.CreateName + ".Prev()" );
		};

		// ´ÙÀ½¹öÆ° On
		this.NextAnchor.onclick = function() {
			eval( PopupZoneThis.CreateName + ".Next()" );
		};


		// ÆË¾÷³»¿ë ÀÌº¥Æ® -----------------------------------------------------------------------------------------

		for( var LoopI=0; LoopI<=this.Length; LoopI++ ) {

			this.PopupLink = this.Zone[LoopI].getElementsByTagName("img")[0];
			this.PopupLink.LoopI = LoopI;
			this.PopupLink.CreateName = this.CreateName;
			this.PopupLink.onfocus = function() { eval( this.CreateName + ".On(" + this.LoopI + ")" ); };
			//this.PopupLink.onmouseover = function() { eval( this.CreateName + ".Stop()" ); };
			//this.PopupLink.onmouseout = function() { eval( this.CreateName + ".Start()" ); };

			this.PopupLink2 = this.ZoneSub[LoopI * 2].getElementsByTagName("a")[0];
			this.PopupLink2.LoopI = LoopI;
			this.PopupLink2.CreateName = this.CreateName;
			this.PopupLink2.onfocus = function() { eval( this.CreateName + ".On(" + this.LoopI + ")" ); };
			//this.PopupLink2.onmouseover = function() { eval( this.CreateName + ".Stop()" ); };
			//this.PopupLink2.onmouseout = function() { eval( this.CreateName + ".Start()" ); };
			
			this.PopupLink3 = this.ZoneSub[( LoopI * 2 ) + 1].getElementsByTagName("a")[0];
			this.PopupLink3.LoopI = LoopI;
			this.PopupLink3.CreateName = this.CreateName;
			this.PopupLink3.onfocus = function() { eval( this.CreateName + ".On(" + this.LoopI + ")" ); };
			//this.PopupLink3.onmouseover = function() { eval( this.CreateName + ".Stop()" ); };
			//this.PopupLink3.onmouseout = function() { eval( this.CreateName + ".Start()" ); };
			
		}

	};
	
	// ½ÃÀÛ
	this.Start = function() {

		if( this.Length >= 0 ) {

			this.RollFlag = true;
			var RollThis = this;
			var Action = function() {
				if( RollThis.RollFlag ) {
					RollThis.Next();
				}
			};
			
			PlayFocus = window.setInterval(Action,this.Delay);

		}

	};
	
	// ¸ØÃã
	this.Stop = function() {

		if( this.Length >= 0 ) {

			this.RollFlag = false;
			if( PlayFocus ) window.clearInterval(PlayFocus);
			PlayFocus = null;

		}

	};
	
	// ÀÌÀü
	this.Prev = function() {
		if( this.Length >= 0 ) {
			this.CurrentPop = ( this.CurrentPop <= 0 ) ? this.Length : --this.CurrentPop;
			this.Move();
		}
	};

	// ´ÙÀ½
	this.Next = function() {
		if( this.Length >= 0 ) {
			this.CurrentPop = ( this.CurrentPop >= this.Length ) ? 0 : ++this.CurrentPop;
			this.Move();
		}
	};
	
	// È°¼ºÈ­
	this.On = function( intPop ) {
		this.CurrentPop = intPop;
		this.Move();
	};

	// ÀÌµ¿
	this.Move = function() {
		var tmpTop = 0 - this.CurrentPop * this.Height;
		document.getElementById(this.ZoneName).getElementsByTagName("dl")[0].style.top = tmpTop+ "px";
	};
	
}

//¹®È­°ü±¤ ·Ñ
function TourRoll() {

	var PlayTour = null;
	
	this.init = function( CreateName, ZoneName, ControlName, Height, Delay ) {
		
		// »ý¼ºµÈ °´Ã¼ ÀÌ¸§
		this.CreateName = CreateName;
		// ÆË¾÷Á¸ ÀÌ¸§
		this.ZoneName = ZoneName;
		// ÆË¾÷Á¸ ÄÁÆ®·Ñ ÀÌ¸§
		this.ControlName = ControlName;
		// ÆË¾÷Á¸ ³ôÀÌ
		this.Height = Height;
		// ÆË¾÷Á¸ µô·¹ÀÌ ½Ã°£
		this.Delay = Delay * 1000;
		// ÇöÀç ÆË¾÷
		this.CurrentPop = 0

		this.RollFlag = true;

		// ÆË¾÷Á¸ ¿ÀºêÁ§Æ®
		this.Zone = document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].getElementsByTagName("li");
		// ÆË¾÷Á¸ ÄÁÆ®·Ñ ¿ÀºêÁ§Æ®
		this.Control = document.getElementById(this.ControlName);

		// ÆË¾÷Á¸ ³»¿ë ¼ö
		this.Length = 0;
		if( this.Zone.length % 2 > 0 ) {
			this.Length = this.Zone.length / 4 + 1 
		} else {
			this.Length = this.Zone.length / 4;
		}

		--this.Length;
		
		// ÀÌÀü¿¨Ä¿
		this.PrevAnchor = this.Control.getElementsByTagName("a")[0];
		// ´ÙÀ½¿¨Ä¿
		this.NextAnchor = this.Control.getElementsByTagName("a")[1];

		// function ¿¡¼­ »ç¿ëÇÒ °´Ã¼ ÀúÀå
		var PopupZoneThis = this;

		// ÀÌº¥Æ® ¼³Á¤ --------------------------------------------------------------------------------------------

		var LoopRow = 0;
		for( var LoopI=0; LoopI<this.Zone.length; LoopI++ ) {

			if( LoopI % 4 == 0 && LoopI != 0 )
				LoopRow++;
			
			this.PopupLink = this.Zone[LoopI].getElementsByTagName("a")[0];
			this.PopupLink.LoopRow = LoopRow;
			this.PopupLink.CreateName = this.CreateName;
			this.PopupLink.onfocus = function() {
				eval( this.CreateName + ".On(" + this.LoopRow + ")" );
			};

		}		

		// ÀÌÀü¹öÆ° On
		this.PrevAnchor.onclick = function(event) {
			eval( PopupZoneThis.CreateName + ".Prev()" );
		};

		// ´ÙÀ½¹öÆ° On
		this.NextAnchor.onclick = function() {
			eval( PopupZoneThis.CreateName + ".Next()" );
		};

	};
	
	// ½ÃÀÛ
	this.Start = function() {

		if( this.Length >= 0 ) {

			this.RollFlag = true;
			var RollThis = this;
			var Action = function() {
				if( RollThis.RollFlag ) {
					RollThis.Next();
				}
			};
			
			PlayTour = window.setInterval(Action,this.Delay);

		}

	};
	
	// ¸ØÃã
	this.Stop = function() {

		if( this.Length >= 0 ) {

			this.RollFlag = false;
			if( PlayTour ) window.clearInterval(PlayTour);
			PlayTour = null;

		}

	};
	
	// ÀÌÀü
	this.Prev = function() {
		if( this.Length >= 0 ) {
			this.CurrentPop = ( this.CurrentPop <= 0 ) ? this.Length : --this.CurrentPop;
			this.Move();
		}
	};

	// ´ÙÀ½
	this.Next = function() {
		if( this.Length >= 0 ) {
			this.CurrentPop = ( this.CurrentPop >= this.Length ) ? 0 : ++this.CurrentPop;
			this.Move();
		}
	};
	
	// È°¼ºÈ­
	this.On = function( intPop ) {
		this.CurrentPop = intPop;
		this.Move();
	};

	// ÀÌµ¿
	this.Move = function() {
		var tmpTop = 0 - this.CurrentPop * this.Height;
		document.getElementById(this.ZoneName).getElementsByTagName("ul")[0].style.top = tmpTop+ "px";
	};
	
}


/* È®´ë/Ãà¼Ò */
var iZoomPercent = 0;


function funcZoom(param)
{
  if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1)
  {
      if(document.body.style.zoom==null||document.body.style.zoom=="") iZoomPercent = 100;

      if(param=="in")
          iZoomPercent = iZoomPercent + 10;
      else if(param=="out")
          iZoomPercent = iZoomPercent - 10;
      else
      	iZoomPercent = 100;

      if(iZoomPercent > 200) iZoomPercent = 200;      

      if(iZoomPercent < 50) iZoomPercent = 50;
       
      document.body.style.zoom = iZoomPercent +"%";
  }
}
/*
function DisplayView( obj1, obj2 ) {

	var objElement = document.getElementById(obj1).getElementsByTagName("a")[0];

	objElement.onclick = function() {

		document.getElementById(obj2).style.display = "block";

	}

}
*/


/* ¿ÞÂÊ ¼­ºê¸Þ´º */
function SubMenuOpenClose( SubMenuID, SubMenuImgID ) {

		var eleSubMenu = document.getElementById( SubMenuID );
		var eleSubMenuImg = document.getElementById( SubMenuImgID );
		var strDisplay = eleSubMenu.style.display;

		var setDisplay = "";
		var setAlt = "";
		var setSrc = "";

		if( strDisplay == 'none' ) {
			setDisplay = "block";
			setAlt = "¼­ºê¸Þ´º ´Ý±â";
			setSrc = eleSubMenuImg.src.replace('_open.gif','_close.gif');
		} else {
			setDisplay = "none";
			setAlt = "¼­ºê¸Þ´º ¿­±â";
			setSrc = eleSubMenuImg.src.replace('_close.gif','_open.gif');
		}

		eleSubMenu.style.display = setDisplay;
		eleSubMenuImg.alt = setAlt;
		eleSubMenuImg.src = setSrc;

	}

function imageOver(imgEl) {
	imgEl.src = imgEl.src.replace("_off.gif", "_on.gif");
}
function imageOut(imgEl) {
	imgEl.src = imgEl.src.replace("_on.gif", "_off.gif");
}



function hideLayer (obj) {
		obj = document.getElementById(obj);
		obj.style.display = 'none';
}

function showLayer (obj) {
		obj = document.getElementById(obj);
		obj.style.display = 'block';
}


/* ÆË¾÷Á¸*/
var popup_timer = null;
var popup_delay_time = 4000;
var popup_pause = false;
var popup_button_pause = true;
var select_popup_num = 1;
var popup_object_num = 8; 
var simbols="";

function setSimbol(simbol){
	simbols=simbol;
}

function popup_display(popupIDX, move) {
	if(!popupIDX)  {
		popupIDX = select_popup_num;
		if(popup_pause==true && !move) return;
		if(popup_button_pause==true && !move) return;
		if(!move) move = 'next';
		hide_popup(popupIDX);
	}else{
		hide_popup(select_popup_num);
	}
	if(move=='prev') {
		
		if(popupIDX==1) {
			popupIDX = popup_object_num;
		} else {
			popupIDX--;
		}
	} else if(move=='next') {
		
		if(popupIDX==popup_object_num) {
			popupIDX = 1;
		} else {
			popupIDX++;
		}
	} else if(move=='pause') {
		if(popup_button_pause==true) {
			popup_button_pause=false;
			document.getElementById("popup_pause_img").src='images/main/popup_btn_stop.gif';
			document.getElementById("popup_pause_img").alt='ÀÏ½ÃÁ¤Áö';
			
		} else if(popup_button_pause==false) {
			popup_button_pause=true;	
			document.getElementById("popup_pause_img").src='images/main/popup_btn_play.gif';
			document.getElementById("popup_pause_img").alt='Àç»ý';
			
		}
	}
	show_popup(popupIDX);
	select_popup_num = popupIDX;
}

function hide_popup(num) {
	document.getElementById("popupzoneImage" + num).style.display = 'none';
	document.getElementById("popupzoneNumber" + num).src ='/images/main/num'+num +'.gif';
}

function show_popup(num) {
	for(var i=0;i<popup_object_num;i++){
		if((i+1)==num){
			document.getElementById("popupzoneImage" + num).style.display = 'block';
			document.getElementById("popupzoneNumber" + num).src ='/images/main/num' + num + '_on.gif';
			select_popup_num=num;
		}else{
			document.getElementById("popupzoneImage" + (i+1)).style.display = 'none';
			document.getElementById("popupzoneNumber" + (i+1)).src ='/images/main/num'+(i+1) +'.gif';
		}
	}
}
function popup_scroll( count ) {
	popup_object_num = count;
	popup_timer = setInterval("popup_display()",popup_delay_time); 
}


/* ÅØ½ºÆ®ÆË¾÷Á¸*/
var tpopup_timer = null;
var tpopup_delay_time = 5000;
var tpopup_pause = false;
var tpopup_button_pause = true;
var select_tpopup_num = 1;
var tpopup_object_num = 8; 
var simbols="";

function setSimbol(simbol){
	simbols=simbol;
}

function tpopup_display(tpopupIDX, move) {
	if(!tpopupIDX)  {
		tpopupIDX = select_tpopup_num;
		if(tpopup_pause==true && !move) return;
		if(tpopup_button_pause==true && !move) return;
		if(!move) move = 'next';
		hide_tpopup(tpopupIDX);
	}else{
		hide_tpopup(select_tpopup_num);
	}
	if(move=='prev') {
		
		if(tpopupIDX==1) {
			tpopupIDX = tpopup_object_num;
		} else {
			tpopupIDX--;
		}
	} else if(move=='next') {
		
		if(tpopupIDX==tpopup_object_num) {
			tpopupIDX = 1;
		} else {
			tpopupIDX++;
		}
	} else if(move=='pause') {
		if(tpopup_button_pause==true) {
			tpopup_button_pause=false;	
			document.getElementById("tpopup_pause_img").src='/site/pocheon/images/main/text_popup_btn_stop.gif';
			document.getElementById("tpopup_pause_img").alt='ÀÏ½ÃÁ¤Áö';
			
		} else if(tpopup_button_pause==false) {
			tpopup_button_pause=true;	
			document.getElementById("tpopup_pause_img").src='/site/pocheon/images/main/text_popup_btn_play.gif';
			document.getElementById("tpopup_pause_img").alt='Àç»ý';
			
		}
	}
	show_tpopup(tpopupIDX);
	select_tpopup_num = tpopupIDX;
}

function hide_tpopup(num) {
	/*var tmpNum = num+1;
	if(tmpNum>tpopup_object_num){
		//tmpNum=tpopup_object_num-1;
		tmpNum=1;
	}
	document.getElementById("tpopupzoneImage" + num).style.display = 'none';
	
	document.getElementById("tpopupzoneImage" + tmpNum).style.display = 'none';
	*/
	//alert(test[0]);
	document.getElementById("tpopupzoneImage1").innerHTML = test[num%tpopup_object_num];
	document.getElementById("tpopupzoneImage2").innerHTML = test[(num+1)%tpopup_object_num];
	// document.getElementById("tpopupzoneNumber" + num).src =
	// '/hdw10/contents/main/images/main/tpopup_num_' + num + '_off.gif';
}

function show_tpopup(num) {
	/*var tmpNum = num+1;
	if(tmpNum>tpopup_object_num){
		//tmpNum=tpopup_object_num-1;
		tmpNum=1;
	}
	document.getElementById("tpopupzoneImage" + num).style.display = 'none';
	
	document.getElementById("tpopupzoneImage" + tmpNum).style.display = 'none';
	*/
	//alert(test[0]);
	document.getElementById("tpopupzoneImage1").innerHTML = test[num%tpopup_object_num];
	document.getElementById("tpopupzoneImage2").innerHTML = test[(num+1)%tpopup_object_num];
	// document.getElementById("tpopupzoneNumber" + num).src =
	// '/hdw10/contents/main/images/main/tpopup_num_' + num + '_on.gif';
}
function tpopup_scroll( count ) {
	tpopup_object_num = count;
	tpopup_timer = setInterval("tpopup_display()",tpopup_delay_time); 
}




