///ÆÞ¹÷±â³ä°ü»çÀÌÆ®ÀÔ´Ï´Ù

function OpenMenu( num ) {

			if (num==1) location.href = '/index.html';             				            //¸ÞÀÎ È¨
            if (num==2) window.open('/contact.html','regist' , 'width=300,height=200');      		      //¸ÞÀÏ
//			if (num==3) location.href = '/sitemap.html';                                   //»çÀÌÆ®¸Ê
			if (num==4) location.href = '/admin';                 						    //°ü¸®ÀÚ
//			if (num==5) location.href = '/eng/index.html';                 						    //¿µ¹®
//	        if (num==5) window.open('http:// ','','');           						//sbs¹æ¼Û

//ÆÞ¹÷±â³ä°ü
 //        *if (num==101) window.open('/system_work.swf','flash','width=960,height=650,top=0,left=0');*/
			if (num==101) location.href = '/Introduce/greeting.html';						//ÀÎ»ç¸»
			if (num==102) location.href = '/Introduce/introduce.html';					//¿©»ç¼Ò°³
			if (num==103) location.href = '/Introduce/history.html';                    //¿¬Çõ
            if (num==403) location.href = '/Introduce/guide.html';							           //°ü¶÷¾È³»
            if (num==404) location.href = '/Introduce/contactus.html';							      //¿À½Ã´Â±æ

//Àü½Ã½Ç
			if (num==201) location.href = '/html/?code=G03';						// ±âÈ¹Àü½Ã
			if (num==202) location.href = '/html/?code=G02';						// »ó¼³Àü½Ã
            if (num==203) location.href = '/html/?code=G01';						//	 ¼ÒÀåÀÚ·á

//ÆÞ¹÷ÀÇ¹®ÇÐ
            if (num==301) location.href = '/html/?code=G04';					//	 ÆÞ¹÷ÀÇ Àú¼­
            if (num==302) location.href = '/html/?code=B05';					//	 ÆÞ¹÷µ¶ÈÄ°¨
            if (num==303) location.href = '/html/?code=B08';						//	 ÀÏ¹ÝÀÚ·á=ÆÞ¹÷ÀÚ·á½Ç
	        if (num==304) location.href = '/html/?code=B09';						//	 ÆÞ¹÷±â³ä¹®ÇÐ»ó

//ÀÌ¿ë¾È³»

//¿­¸°¸¶´ç
           if (num==401) location.href = '/html/?code=B01';							    //°øÁö»çÇ×
           if (num==402) location.href = '/html/?code=SC1';							      //Çà»çÀÏÁ¤
           if (num==405) location.href = '/html/?code=B03';		              //º¸µµÀÚ·á(½Å¼³)
           if (num==501) location.href = '/html/?code=IQ1';								    //°ü¶÷¹®ÀÇ
           if (num==502) location.href = '/html/?code=RS1';								    //°ü¶÷¿¹¾à
           if (num==503) location.href = '/html/?code=B02';								    //°ü¶÷ÈÄ±â

//±âÅ¸
            if (num==601) window.open('/regist.html','regist' , 'width=450,height=497'); 						//È¸¿ø¼­ºñ½º
            if (num==602) location.href = '/consult/mail.html';								    //
            if (num==603) window.open('/login.html','login' , 'width=450,height=497'); 						//È¸¿ø¼­ºñ½º

//±³À°ÇÁ·Î±×·¥
            if (num==701) location.href = '/program/sub03.html';						//°¡Á· ÇÁ·Î±×·¥
            if (num==702) location.href = '/program/sub01.html'; 						//¾î¸°ÀÌ ÇÁ·Î±×·¥
            if (num==703) location.href = '/program/sub02.html';						//´Ù¹®È­ Ã»¼Ò³â ÇÁ·Î±×·¥
            if (num==704) location.href = '/html/?code=IQ2';							//ÇÁ·Î±×·¥ ¿¹¾à
            if (num==705) location.href = '/html/?code=B04';							//ÇÁ·Î±×·¥ÈÄ±â
            if (num==706) location.href = '/program/sub04.html';								//Ã£¾Æ°¡´ÂÀü½Ã(½Å¼³)
            if (num==707) location.href = '/program/sub06.html';								//ÇÁ·Î±×·¥½Ã°£Ç¥
            if (num==708) location.href = '/program/sub07.html';								//ÀÎÅÏ½±

	//if (num==501) window.open('http://www.e-mg.co.kr','','');
	//if (num == 504) alert("¿ÀÇÂ ÀüÀÔ´Ï´Ù.");

//ÆÞ¹÷°ú´Ù¹®È­
            if (num==801) location.href = '/html/?code=B07';		//´Ù¹®È­
            if (num==802) location.href = '/program/sub05.html';								//ÆÞ¹÷±×¸²±×¸®±â´ëÈ¸
            if (num==803) location.href = '/html/?code=B10';		//±×¸²±×¸®±â ´ëÈ¸°¶·¯¸®

}


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_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;
}

var old='';

function menu(name)
{
submenu=eval("submenu_"+name+".style");
		if(old!=submenu)
	{
		if(old!='')
		{
			old.display='none';
		}
		submenu.display='block';
		old=submenu;
	}
	else
	{
		submenu.display='none';
		old='';
	}
}

function popimg2(url, width, height, opt) {

	if (opt != null && opt != '') opt = ',' + opt;
	str = '<body topmargin=0 leftmargin=0><img src="' + url + '" border=0 onmousedown=" self.close(); "></body>';
	pop = window.open('','zome','width=' + width + ',height=' + height + opt);
	pop.focus();
	pop.document.write(str);
}

//pngÅõ¸íÇÏ°Ô ÇÏ´Â ½ºÅ©¸³Æ®
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 '';
}

// flashWrite(ÆÄÀÏ°æ·Î, °¡·Î, ¼¼·Î, ¾ÆÀÌµð, ¹è°æ»ö, º¯¼ö, À©µµ¿ì¸ðµå)
function flashWrite(url,w,h,id,bg,vars,win){

	// ÇÃ·¡½Ã ÄÚµå Á¤ÀÇ
	var flashStr=
	"<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' width='"+w+"' height='"+h+"' id='"+id+"' align='middle'>"+
	"<param name='allowScriptAccess' value='always' />"+
	"<param name='movie' value='"+url+"' />"+
	"<param name='FlashVars' value='"+vars+"' />"+
	"<param name='wmode' value='"+win+"' />"+
	"<param name='menu' value='false' />"+
	"<param name='quality' value='high' />"+
	"<param name='bgcolor' value='"+bg+"' />"+
	"<embed src='"+url+"' FlashVars='"+vars+"' wmode='"+win+"' menu='false' quality='high' bgcolor='"+bg+"' width='"+w+"' height='"+h+"' name='"+id+"' align='middle' allowScriptAccess='always' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' />"+
	"</object>";

	// ÇÃ·¡½Ã ÄÚµå Ãâ·Â
	document.write(flashStr);
	//<script>flashWrite('/img/main.swf','595','450','','','','transparent')</script>
}

function swapMenu() {
	imgid = document.all(arguments[0].id);
	tbl = document.all(arguments[1]);
	if (arguments[2] == null) arguments[2] = '';
	arguments[2] = arguments[2] + '.';
	if (arguments[3] == null) arguments[3] = '_r';
	arguments[3] = arguments[3] + '.';
	if (arguments[0].src.indexOf(arguments[3]) == -1) return;
	for (var i=0; i < imgid.length; i++) {
		if (imgid[i] == arguments[0]) { tbl[i].style.display = ''; imgid[i].src = imgid[i].src.substring(0,imgid[i].src.lastIndexOf(arguments[3])) + arguments[2] + imgid[i].src.substring(imgid[i].src.lastIndexOf('.')+1); continue;}
		if (imgid[i].src.indexOf(arguments[3]) == -1) { tbl[i].style.display = 'none'; imgid[i].src = imgid[i].src.substring(0,imgid[i].src.lastIndexOf(arguments[2])) + arguments[3] + imgid[i].src.substring(imgid[i].src.lastIndexOf('.')+1); continue;}
	}
}

