
function Img(n,tog){eval("document.m"+n+".src=m"+n+"_"+tog+".src"); } //ÀÌ¹ÌÁö ·Ñ¿À¹ö
function Img2(n,tog){eval("document.s"+n+".src=s"+n+"_"+tog+".src"); } //ÀÌ¹ÌÁö ·Ñ¿À¹ö
function pop(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=no') } //Popup(½ºÅ©·Ñ¹Ù¾øÀ½)
function pops(url,name,w,h){ window.open(url,name,'width='+w+',height='+h+',scrollbars=yes') } //Popup(½ºÅ©·Ñ¹ÙÀÖÀ½)


function showLayer(num)
{
		for (i=1;i<=12;i++) {
		menu=eval("document.all.Layer"+i+".style"); 
		if (num==i) {
			menu.display="block"; 
		} else {
			menu.display="none"; 
		}
	}
}

function viewp(n){
	image.src="/eng/img/exhibits/img0"+n+".gif";
	function viewb(n){
	big.src="/eng/img/exhibits/img0"+n+".jpg";
	}
}

//ÇÏÀÌÆÛ¸µÅ©
function home() {location.href="/eng/index.asp";} //
function sitemap() {location.href="/etc/sitemap.asp";} //»çÀÌÆ®¸Ê
function newsletter() { pop('/etc/pop_newsletter.asp','PNewsLetter',500,340); } // ´º½º·¹ÅÍ
function copyright() { pop('/etc/pop_copyright.html','PCopy',510,420); } // Ä«ÇÇ¶óÀÌÆ®
function privacy() { pop('/etc/pop_privacy.html','PCopy',510,420); } // °³ÀÎÁ¤º¸º¸È£
function legal() { pop('/etc/pop_legal.html','PCopy',330,230); } // ÀÌ¸ÞÀÏ¼öÁý°ÅºÎ
function History() { pop('/etc/pop_10years.html','P10years',650,500); } // ¹Ú¹°°ü 10³âÀÇ ¿ª»ç
function korea() {location.href="/index.asp";} // »ï¼º¾î¸°ÀÌ¹Ú¹°°ü ¿µ¹®
function showpointer(n)	// Àü½ÃÀå ±¸°æ, Àü½ÃÀå °¡ÀÌµå¿¡¼­ »ç¿ëµÇ´Â °Í
{
	if(n==1)
		document.all.MyPointer.style.display='block';
	else
		document.all.MyPointer.style.display='none';
}

function mlink1(idx) {goView(idx);} // ¸ÞÀÎ ´º½º¸µÅ©
function mlink2(idx) {link(3,2);go_open(idx);} // ¸ÞÀÎ ÀÌº¥Æ®¸µÅ©

function BMargin(){
document.write("\
<table cellpadding=0 cellspacing=0 border=0>\
<tr><td height='80'></td></tr>\
</table>\
");
}

/*aboutus*/
u1="/eng/aboutus/welcome.asp";
u11="/eng/aboutus/welcome.asp";
u12="/eng/aboutus/mission.asp";
u13="/eng/aboutus/museum.asp";
u14="/eng/aboutus/history.asp";
u2="/eng/exhibits/exhibits.asp";
u21="/eng/exhibits/exhibits.asp";
u211="sd/sd";
u3="/eng/visit/visit.asp";
u31="/eng/visit/visit.asp";
u5="/eng/sitemap/sitemap.asp";
u15="/eng/aboutus/identity.asp";
u6="/eng/aboutus/identity.asp";


/*visit*/
u3="/eng/visit/visit.asp";
u31="/eng/visit/visit.asp";
u32="/eng/visit/map.asp";
u33="/eng/visit/service.asp";
u34="/eng/visit/fieldtrip.asp";
u35="/eng/visit/membership.asp";

/*programs*/
u4="/eng/program/program.asp";
u41="/eng/program/program.asp";
u42="/eng/program/outeach.asp";
u43="/eng/program/kidsclub.asp";
u44="/eng/program/publication.asp";
function link(){
	var url = "";
	var depth = arguments.length;

	try {
		if(depth==0) return;



		/*ÆË¾÷ÀÏ°æ¿ì*//*
		if (arguments[0]=="6" && arguments[1] =="3" && arguments[2] =="3") {
			window.open('/culture/moral/principle/index.htm','Principle','width=1002,height=580,scrollbars=no');
			return;
		}*/
		
		else if(depth==1) url = eval("u"+arguments[0]);
		else if(depth==2) url = eval("u"+arguments[0]+arguments[1]);
		else if(depth==3) url = eval("u"+arguments[0]+arguments[1]+arguments[2]);
		else if(depth==4) url = eval("u"+arguments[0]+arguments[1]+arguments[2]+arguments[3]);
		

		if(url=="") alert("ÁØºñÁßÀÔ´Ï´Ù.");
		else location.href = url;

	}catch(e) { alert("ÁØºñÁßÀÔ´Ï´Ù."); }
}


//ÀüÃ¼ ¸µÅ© Blur
function bluring(){
if(event.srcElement.tagName=="A"||event.srcElement.tagName=="IMG") document.body.focus();
}
document.onfocusin=bluring;


//Select Box
function setSelectBox(selName){
	sel = eval("document.all."+selName);

	borderColor = sel.bordercolor;
	selWidth = parseInt(sel.width);
	bgColor = sel.bgcolor;
	rectLeft = selWidth-2;
	spanWidth = selWidth;

	//span tag
	header  = "<span style='position:relative;margin-right:0px;";
	header += "width:"+spanWidth+";height:17px;border:1px solid "+borderColor+";background-color:"+bgColor+";'>\n";
	header += "<span style='position: absolute;left:0px;top:-2px;";
	header += "width:"+selWidth+";height:17px;clip:rect(2,"+rectLeft+",18,2);'>\n";
	footer = "</span></span>";

	sel.style.backgroundColor = bgColor;
	sel.style.width = selWidth;

	sel.outerHTML = header+sel.outerHTML+footer;
}


/*¶ó¿îµåÅ×ÀÌºí*/
function roundTable(objID) {
       var obj = document.getElementById(objID);
       var Parent, objTmp, Table, TBody, TR, TD;
       var bdcolor, bgcolor, Space;
       var trIDX, tdIDX, MAX;
       var styleWidth, styleHeight;

       // get parent node
       Parent = obj.parentNode;
       objTmp = document.createElement('SPAN');
       Parent.insertBefore(objTmp, obj);
       Parent.removeChild(obj);

       // get attribute
       bdcolor = obj.getAttribute('rborder');
       bgcolor = obj.getAttribute('rbgcolor');
       radius = parseInt(obj.getAttribute('radius'));
       if (radius == null || radius < 1) radius = 1;
       else if (radius > 6) radius = 6;

       MAX = radius * 2 + 1;

       /*
              create table {{
       */
       Table = document.createElement('TABLE');
       TBody = document.createElement('TBODY');

       Table.cellSpacing = 0;
       Table.cellPadding = 0;

       for (trIDX=0; trIDX < MAX; trIDX++) {
              TR = document.createElement('TR');
              Space = Math.abs(trIDX - parseInt(radius));
              for (tdIDX=0; tdIDX < MAX; tdIDX++) {
                     TD = document.createElement('TD');

                     styleWidth = '1px'; styleHeight = '1px';
                     if (tdIDX == 0 || tdIDX == MAX - 1) styleHeight = null;
                     else if (trIDX == 0 || trIDX == MAX - 1) styleWidth = null;
                     else if (radius > 2) {
                            if (Math.abs(tdIDX - radius) == 1) styleWidth = '2px';
                            if (Math.abs(trIDX - radius) == 1) styleHeight = '2px';
                     }

                     if (styleWidth != null) TD.style.width = styleWidth;
                     if (styleHeight != null) TD.style.height = styleHeight;

                     if (Space == tdIDX || Space == MAX - tdIDX - 1) TD.style.backgroundColor = bdcolor;
                     else if (tdIDX > Space && Space < MAX - tdIDX - 1)  TD.style.backgroundColor = bgcolor;

                     if (Space == 0 && tdIDX == radius) TD.appendChild(obj);
                     TR.appendChild(TD);
              }
              TBody.appendChild(TR);
       }

       /*
              }}
       */

       Table.appendChild(TBody);

       // insert table and remove original table
       Parent.insertBefore(Table, objTmp);
}

/*FAQ*/
var old='';
function faq(name)
{
	answer=eval("ans"+name+".style");
	if(old!=answer)
	{
		if(old!='')
		{
			old.display='none';
		}
		answer.display='block';
		old=answer;
	}
	else
	{
		answer.display='none';
		old='';
	}
	eval("que"+name+".style.color='#4F6300'");
}

/*±èÈ«»ïÃß°¡*/
	function go_pop(param)
	{
		document.temp.ino.value = param;


		window.open("","popup" , "width=600,height=700") ;
		if (param == "10" || param == "11" || param == "12" || param == "13")
		{
			TargetSecuiSubmit( document.temp , "/exhibition/guide/sheet/pop_scrollno.asp" , "2" , "popup")

		}
		else
		{
			TargetSecuiSubmit( document.temp , "/exhibition/guide/sheet/pop_scrollyes.asp" , "2" , "popup")
			/*
			document.temp.target = "popup" ;
			document.temp.action =  "/exhibition/guide/sheet/pop_scrollyes.asp"  ;
			document.temp.submit() ;
		*/
		}
	}

//ÀÌ¿Ã¶ó½º
function getFlash(url, wid, hei){
	document.write("<object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0' width="+wid+" height="+hei+"><param name='movie' value='"+url+"'><param name='quality' value='high'><param name='allowScriptAccess' value='sameDomain'><param name='wmode' value=transparent><embed src='"+url+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width="+wid+" height="+hei+"></embed></object>");
}
