function resizeFrame(iframeObj){
var innerBody = iframeObj.contentWindow.document.body;
var innerHeight = 60+innerBody.scrollHeight + (innerBody.offsetHeight - innerBody.clientHeight);
iframeObj.style.height = innerHeight;

// ³ÐÀÌ ´Ù½Ã¼³Á¤ 
var innerWidth = innerBody.scrollWidth + (innerBody.offsetWidth - innerBody.clientWidth);
iframeObj.style.width = innerWidth; 
this.scrollTo(1,1); //[¶ôÀ§µà]¾Æ·»Æ¼ ´ÔÀÇ ÁöÀû
}

function flash_object (name,width,height,trans,v_LogId){

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="+width+" height="+height+" />"+
"<param name='movie' value='"+name+"?Login_Check="+v_LogId+"' />"+
"<param name='quality' value='high' />"+
"<param name='menu' value='false' />"+
"<param name='wmode' value='"+trans+"' />"+
"<embed src='"+name+"?Login_Check="+v_LogId+"' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='"+width+"' height='"+height+"' /></embed></object>";

document.write(flashStr);
}

function clickNode(folderId) { 
    var clickedFolder = 0;
	if (folderId == "home") {document.location.href = "./";}
	if (folderId == "login") {document.location.href = "./login.html";}
	if (folderId == "logout") {parent.document.location.href = "/lib/logout.php";}
	if (folderId == "info") {document.location.href = "./menu0_1.html";}
	if (folderId == "sitemap") {document.location.href = "sitemap.html";}
	if (folderId == "email") {document.location.href = "mailto:<?=$admin_email?>";}
	if (folderId == "11") {document.location.href = "./menu1.html";}
	if (folderId == "12") {document.location.href = "./menu1_1.html";}
	if (folderId == "13") {document.location.href = "./menu1_2.html";}
	if (folderId == "14") {document.location.href = "./menu1_3.html";}
	if (folderId == "15") {document.location.href = "./menu1_6.html";}
	if (folderId == "16") {document.location.href = "./menu1_4.html";}
	if (folderId == "17") {document.location.href = "./menu1_5.html";}

	if (folderId == "21") {document.location.href = "./menu2_1.html";}
	if (folderId == "22") {document.location.href = "./menu2_1.html";}
	if (folderId == "23") {document.location.href = "./menu2_2.html";}
	if (folderId == "24") {document.location.href = "./menu2_3.html";}

	if (folderId == "31") {document.location.href = "./menu3.html";}
	if (folderId == "32") {document.location.href = "./menu3_1.html";}
	if (folderId == "33") {document.location.href = "./menu3_2.html";}
	if (folderId == "34") {document.location.href = "./menu3_4.html";}
	if (folderId == "35") {document.location.href = "./menu3_5.html";}

	if (folderId == "41") {document.location.href = "./menu4.html";}
	if (folderId == "42") {document.location.href = "./menu4_1.html";}
	if (folderId == "43") {document.location.href = "./menu4_2.html";}
	if (folderId == "44") {document.location.href = "./menu4_3.html";}
	if (folderId == "45") {document.location.href = "./menu4_4.html";}
	if (folderId == "46") {document.location.href = "./menu4_5.html";}

	if (folderId == "51") {document.location.href = "./menu5_1.html";}
	if (folderId == "52") {document.location.href = "./menu5_3.html";}
	if (folderId == "53") {document.location.href = "./menu5_4.html";}
	if (folderId == "54") {document.location.href = "./menu5_5.html";}

	if (folderId == "61") {document.location.href = "./menu7.html";}
	if (folderId == "62") {document.location.href = "./menu7_1.html";}
	if (folderId == "63") {document.location.href = "./menu7_2.html";}
	if (folderId == "64") {document.location.href = "./menu7_3.html";}
	if (folderId == "65") {document.location.href = "./menu7_4.html";}

	if (folderId == "71") {document.location.href = "./menu8.html";}
	if (folderId == "72") {document.location.href = "./menu8_1.html";}
	if (folderId == "73") {document.location.href = "./menu8_2.html";}
	if (folderId == "74") {document.location.href = "./menu8_3.html";}
}

function MM_restore_img_src(name, nsdoc)
{
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img && img.altsrc) {
    img.src    = img.altsrc;
    img.altsrc = null;
  } 
}

function MM_preload_img()
{ 
  var img_list = MM_preload_img.arguments;
  if (document.preloadlist == null) 
    document.preloadlist = new Array();
  var top = document.preloadlist.length;
  for (var i=0; i < img_list.length-1; i++) {
    document.preloadlist[top+i] = new Image;
    document.preloadlist[top+i].src = img_list[i+1];
  } 
}

function MM_change_img_src(name, nsdoc, rpath, preload)
{ 
  var img = eval((navigator.appName.indexOf('Netscape', 0) != -1) ? nsdoc+'.'+name : 'document.all.'+name);
  if (name == '')
    return;
  if (img) {
    img.altsrc = img.src;
    img.src    = rpath;
  } 
}

//±Ûº¸±âno, now_id, mod, st, show, slevel, bname
function NoticeArticle(uid,secret,mbid,tbl,win,la)
{
var url   = la;
	var code = tbl != '' ? tbl : getUriString('code');
	if(secret == 'y')
	{
		var CookieSecret = document.getElementById('CookieSecret').value;
		var readRoot       = document.getElementById('readRoot').value;
		var dbid       = document.getElementById('dbid').value;

		if(CookieSecret.indexOf(code + '_' + uid + '_' ) == -1)
		{
			if (mbid == '' || (mbid != '' && mbid != dbid))
			{
				if (readRoot <= '8')
				{
					//getPassLayer('secret',isRoot,mbid,dbid,uid,la);
					location.href = url + '?code='+tbl ;
					return false;
				}
			}
		}

	}

	if (win != '_win')
	{
		location.href = url + '?code='+tbl+'&mode=read&id=' + uid ;
	}
	else {
		var win = url+'?code='+code+'&action=newwin&id=' + uid;
		window.open(win , 'output_win','width=650,height=600,scrollbars=yes');
	}
}

function login_submit()
{
	if (document.login_frm.ID.value == "")
	{
		alert("¾ÆÀÌµð¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		document.login_frm.ID.focus();
	}
	else if(document.login_frm.PWD.value == "")
	{
		alert("ºñ¹Ð¹øÈ£¸¦ ÀÔ·ÂÇØ ÁÖ¼¼¿ä.");
		document.login_frm.PWD.focus();
	}
	else
	{
		document.login_frm.action = "../member/login_check.php";
		document.login_frm.submit();
	}
}

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];}
}