// ÆË¾÷
function golink(value) {
window.open(value,'', "width=800,height=600,scrollbars=no,menubar=no");
}

// ÀÌ¹ÌÁö·Ñ¿À¹ö
function menuOver(aEl) {
	var img = aEl.getElementsByTagName("img")[0];
	img.src = img.src.replace("_out.gif", "_over.gif");
}
function menuOut(aEl) {
	var img = aEl.getElementsByTagName("img")[0];
	img.src = img.src.replace("_over.gif", "_out.gif");
}

//·Ñ¿À¹ö 2Â÷¹æ¹ý
function imgMenuOver(containderID) {
	var objwrap = document.getElementById(containderID);
	var imgMenu = objwrap.getElementsByTagName("dd");

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

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



/*	È®´ëÃà¼Ò */	
var zoomSize = 100; 
function zoom(Obj,Method) 
{ 
    if(Method == "in") 
    { 
        zoomSize = eval(zoomSize + 10); 
    } 
    else if(Method == "out") 
    { 
        if(zoomSize > 10) 
        { 
        zoomSize = eval(zoomSize - 10); 
        } 
    } 
    else if(Method == "reset") 
    { 
        zoomSize = 100; 
    } 
    document.all("Outerbg").style.zoom = zoomSize + "%"; 
} 


// product portal popup
function goWin(lst,tname,wtype){
	window.open(lst,tname,wtype);
}

// small popup window 
function mnPop(lst,tname,iWidth,iHeight) {
	var win1 = window.open(lst,tname,"width="+ iWidth + ",height="+ iHeight + ",toolbar=0, status=0, scrollbars=no, location=0, menubar=0, resizable=0");
	win1.focus();
}

// small popup window - screen center position
function mcPop(lst,tname,iWidth,iHeight) {
	var iMyWidth;
	var iMyHeight;
	iMyWidth = (window.screen.width/2) - (iWidth/2 + 10); 
	iMyHeight = (window.screen.height/2) - (iHeight/2 + 50); 
	var win2 = window.open(lst,tname,"width="+ iWidth + ",height="+ iHeight + ",left=" + iMyWidth + ",top=" + iMyHeight + ",screenX=" + iMyWidth + ",screenY=" + iMyHeight + ",toolbar=0, status=0, scrollbars=no, location=0, menubar=0, resizable=0");
	win2.focus();
}





// »çÀÌ¹ö ¹Ú¹°°ü
function cyberExec(param)
	{
			if (navigator.appName =="Netscape")
			{
				alert("ÀÍ½ºÇÃ·¯¾î ¿¡¼­¸¸ »ç¿ë°¡´ÉÇÕ´Ï´Ù.");
				return false;
			}
			if (ggChecker.check('http://cyber.museum.go.kr/web/down/ggLoader.ini')==false)
			{
				alert("´Ù¿î·ÎµåÇØ¼­ ¼³Ä¡ÇØÁÖ½Ê½Ã¿À.");
				return false;
			}
		   ggChecker.Launch('http://cyber.museum.go.kr/web/down/'+ param + '.ggl') ;

	}

function unite()
	{
			if (navigator.appName =="Netscape") {
				alert("ÀÍ½ºÇÃ·¯¾î ¿¡¼­¸¸ »ç¿ë°¡´ÉÇÕ´Ï´Ù.");
				return false;
			}
            	if (ggChecker.check('http://cyber.museum.go.kr/web/down/ggLoader.ini')==false)
		       	{
		            alert("´Ù¿î·ÎµåÇØ¼­ ¼³Ä¡ÇØÁÖ½Ê½Ã¿À.");
		       		return false;
		       	}
		    ggChecker.Launch('http://cyber.museum.go.kr/web/down/unite.ggl') ;

	}

function prehistory()
	{
			if (navigator.appName =="Netscape") {
				alert("ÀÍ½ºÇÃ·¯¾î ¿¡¼­¸¸ »ç¿ë°¡´ÉÇÕ´Ï´Ù.");
				return false;
			}
            	if (ggChecker.check('http://www.emuseum.go.kr/cyb/down/ggLoader.ini')==false)
		       	{
		            alert("´Ù¿î·ÎµåÇØ¼­ ¼³Ä¡ÇØÁÖ½Ê½Ã¿À.");
		       		return false;
		       	}
		    ggChecker.Launch('http://cyber.museum.go.kr/web/down/prehistory.ggl') ;

	}

function download()
{
  window.open('http://cyber.museum.go.kr/web/down/unite_00.exe');
}

function wooribank() 
	{
			if (navigator.appName =="Netscape") {
				alert("ÀÍ½ºÇÃ·¯¾î ¿¡¼­¸¸ »ç¿ë°¡´ÉÇÕ´Ï´Ù.");
				return false;
			}
            	if (ggChecker.check('http://down.goodgate.net/down/ini/ggLoader.ini')==false) 
		       	{
		            alert("´Ù¿î·ÎµåÇØ¼­ ¼³Ä¡ÇØÁÖ½Ê½Ã¿À.");
		       		return false;
		       	}
		    ggChecker.Launch('http://cyber.museum.go.kr/web/down/dongguk2.ggl') ;

}



// ¸Þ´º º¸ÀÌ±â °¨Ãß±â

function toggle(ele){ /* ³ëµå °¨Ãß±â/º¸ÀÌ±â */
	if(typeof ele == "string") ele = document.getElementById(ele);
	// cssÀÇ display °ª ¹Þ¾Æ¿À±â
	var value = null;
	if(ele.currentStyle) var value = ele.currentStyle['display'];
	else if(document.defaultView.getComputedStyle) var value = document.defaultView.getComputedStyle(ele,null)['display'];
	// noneÀÏ¶§¿Í ¾Æ´Ò¶§ ´Ù¸£°Ô ¸ÔÀÌ±â
	if(value != "none") (ele.style.display != 'none') ? ele.style.display = 'none' : ele.style.display = '';
	else (ele.style.display != 'block') ? ele.style.display = 'block' : ele.style.display = ''
	return false;
}


// ºñµð¿À ÀÚ·á º¸±â
function view_mov(src, title){
	var mov_url ="video/public_pop.jsp?src="+src+"&title="+title;
	window.open(mov_url,'mpeg','left=50, top=50, width=355,height=428');
}
function popup(src){
	window.open(src,'mpeg','fullscreen=yes');
}


//¸ÞÀÎ ÀÌ¹ÌÁö °Ô½ÃÆÇ 
function board(n) {
    for(var i = 1; i < 4; i++) {
        obj = document.getElementById('board'+i);
        //img = document.getElementById('premier_button'+i);
        if ( n == i ) {
            obj.style.display = "block";			
          //  img.src = "../../images/main/btn_tab0"+i+"_.gif";    
        } else {
            obj.style.display = "none";			
          //  img.src = "../../images/main/btn_tab0"+i+".gif";
        }
    }
}
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];}
}

