function initNavigation(seq) {
	var nav = document.getElementById("gnb");
	nav.menu = new Array();
	nav.current = null;
	nav.menuseq = 0;
	navLen = nav.childNodes.length;
	
	allA = nav.getElementsByTagName("a");
	for(k = 0; k < allA.length; k++) {
//¼Ò¸Å´º
		allA.item(k).onmouseover = allA.item(k).onfocus = function () {
			nav.isOver = true;
		}
		allA.item(k).onmouseout = allA.item(k).onblur = function () {
			nav.isOver = false;
			//alert(event.button);

	/*
			setTimeout(function () {
				if (nav.isOver == false) {
					if (nav.menu[seq]) {
						nav.menu[seq].onmouseover();	
					} else if(nav.current) {			
						if( seq != 0)
						this.current.parentNode.className = this.current.parentNode.className.replace(" over","");						
						if (nav.current.submenu)						
							nav.current.submenu.style.display = "none";
						nav.current = null;					
					}
				}
			}, 500);
	*/
		}
	}

	for (i = 0; i < navLen; i++) {
		navItem = nav.childNodes.item(i);
		if (navItem.tagName != "LI")
			continue;
//´ë¸Å´º
		navAnchor = navItem.getElementsByTagName("a").item(0);
		navAnchor.submenu = navItem.getElementsByTagName("ul").item(0);
		
		navAnchor.onmouseover = navAnchor.onfocus = function () {
			
			if (nav.current) {		
				if( seq !=0)
				nav.current.parentNode.className = nav.current.parentNode.className.replace(" ov","");			
				if (nav.current.submenu)				
					nav.current.submenu.style.display = "none";
				nav.current = null;
			}
			
			if (nav.current != this) {
				if( seq !=0)
		this.submenu.parentNode.className +=" ov";			
				if (this.submenu)		{						
					this.submenu.style.display = "block";
				}
				nav.current = this;
			}
			nav.isOver = true;
		}
		nav.menuseq++;
		nav.menu[nav.menuseq] = navAnchor;
	}
	if (nav.menu[seq])
		nav.menu[seq].onmouseover();
}

function showHiddenDirectory(flag) {
			if(flag == 'show') {
				document.getElementById('sitemap').style.display = '';
			}else{
				document.getElementById('sitemap').style.display = 'none';
			}
		}
		
		
		
  //¸ÞÀÎÀÚ¹Ù½ºÅ©¸³Æ® ÇÏ±â
			var btnMoreTargetPage = "";
			var btnMoreTargetMid = "";

			function mainBoardChange(n, start, end) {
			/*	switch(n){
					case 1://ÁÖ°£³ó»çÁ¤º¸
						btnMoreTargetPage = "";
						btnMoreTargetMid = "mn0201000000";
						break;
					case 2://°üÃøÁ¤º¸
						btnMoreTargetMid = "mn0201000000";
						btnMoreTargetPage = "";
						break;

				    case 3://¿µ³ó»ó´ã
						btnMoreTargetMid = "mn0201000000";
						btnMoreTargetPage = "";
						break;
	
				}
*/
				var obj;	
				var obj2;	
				var obj3;	

				for (var z=start; z<=end; z++){
			
					obj = document.getElementById('tab_list_'+ z);	
					obj2 = document.getElementById('mainBoardDiv' + z);
					obj3 = document.getElementById('bImg' + z);			
		
	
					if ( obj && obj2 && obj3){
					
						if (z == n){						    
							obj.style.visibility="visible";
							obj2.style.visibility="visible";
							if(obj3.src.indexOf("_ov")<0){
								obj3.src = obj3.src.substring(0,obj3.src.lastIndexOf(".")) + "_ov.gif";	
							}else{								
								obj3.src = obj3.src.substring(0,obj3.src.lastIndexOf(".")-3) + "_ov.gif";	
							}
						} else {				
							obj.style.visibility="hidden";
							obj2.style.visibility="hidden";
							if(obj3.src.indexOf("_ov")<0){
								obj3.src = obj3.src.substring(0,obj3.src.lastIndexOf(".")) + ".gif";
							}else{								
								obj3.src = obj3.src.substring(0,obj3.src.lastIndexOf(".")-3) + ".gif";
							}
	
						}

					}
				}
			}
			function goMorePage(){

				goMenuFromTopMenu(btnMoreTargetPage, '', btnMoreTargetMid);
			}

			function goNoticePage(uri){
				
				goMenuFromTopMenu(uri, '', btnMoreTargetMid);
			}
			
			
			
function goView(file,tcode,reqYear,maxYear,minYear,page,seq,fileseq,num,flashPageNum,pageView) {
	var f = document.tj_form;
	f.tCode.value  = tcode;
	f.reqYear.value  = reqYear;
	f.maxYear.value  = maxYear;
	f.minYear.value  = minYear;
	f.page.value  = page;
	f.seq.value  = seq;
	f.num.value  = num;
	f.fileseq.value  = fileseq;
	f.flashPageNum.value  = flashPageNum;
	f.pageView.value  = pageView;
	f.action      = file;
	f.method      = "post";
	f.submit(); 
}
function processKeyPress() 
{ 
		if (event.keyCode == 13) 
		{  
			if (document.form_sh.sKeyword.value < 1)
			{
				alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
				document.form_sh.sKeyword.focus();
				return false;
			}
			else
			{
				searchgo();
				//exit;
			}
		} 
} 
//¼±ÀÎÀå°Ë»ö
function searchgo1()
{
    var f = document.form_sh;
    if (f.sKeyword.value < 1) {
        alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
        f.sKeyword.focus();
        return false;
    }
 
   f.method = "POST";
    f.target = "_self";
    f.action = "html/board_list_sunin.jsp?tCode=632";

    f.submit();
}
/*

function OpenPop() {
	if ( notice_getCookie( "no_pop2" ) != "done" )
	{
		function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
		{
		  toolbar_str = toolbar ? 'yes' : 'no';
		  menubar_str = menubar ? 'yes' : 'no';
		  statusbar_str = statusbar ? 'yes' : 'no';
		  scrollbar_str = scrollbar ? 'yes' : 'no';
		  resizable_str = resizable ? 'yes' : 'no';
		  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
		}
	na_open_window('open_event', 'popup_100825.jsp', 0, 0, 420, 580, 0, 0, 0, 0, 0);	}

}
OpenPop();
function notice_getCookie( name )
{
var nameOfCookie = name + "=";
var x = 0;
while ( x &lt;= document.cookie.length )
{
var y = (x+nameOfCookie.length);
if ( 
document.cookie.substring( x, y ) == nameOfCookie ) {
if ( 
(endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
  }
/*
function OpenPop2() {
	if ( notice_getCookie2( "no_pop1" ) != "done" )
	{
		function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
		{
		  toolbar_str = toolbar ? 'yes' : 'no';
		  menubar_str = menubar ? 'yes' : 'no';
		  statusbar_str = statusbar ? 'yes' : 'no';
		  scrollbar_str = scrollbar ? 'yes' : 'no';
		  resizable_str = resizable ? 'yes' : 'no';
		  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
		}
	na_open_window('open_event2', 'popup_100704.jsp', 405, 0, 396, 375, 0, 0, 0, 0, 0);
	}

}
OpenPop2();
function notice_getCookie2( name )
{
var nameOfCookie = name + "=";
var x = 0;
while ( x &lt;= document.cookie.length )
{
var y = (x+nameOfCookie.length);
if ( 
document.cookie.substring( x, y ) == nameOfCookie ) {
if ( 
(endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
  }


function OpenPop3() {
	if ( notice_getCookie3( "no_pop3" ) != "done" )
	{
		function na_open_window(name, url, left, top, width, height, toolbar, menubar, statusbar, scrollbar, resizable)
		{
		  toolbar_str = toolbar ? 'yes' : 'no';
		  menubar_str = menubar ? 'yes' : 'no';
		  statusbar_str = statusbar ? 'yes' : 'no';
		  scrollbar_str = scrollbar ? 'yes' : 'no';
		  resizable_str = resizable ? 'yes' : 'no';
		  window.open(url, name, 'left='+left+',top='+top+',width='+width+',height='+height+',toolbar='+toolbar_str+',menubar='+menubar_str+',status='+statusbar_str+',scrollbars='+scrollbar_str+',resizable='+resizable_str);
		}

	na_open_window('open_event3', 'popup_100104.jsp', 430, 0, 400, 420, 0, 0, 0, 0, 0);
	}

}
OpenPop3();
function notice_getCookie3( name )
{
var nameOfCookie = name + "=";
var x = 0;
while ( x &lt;= document.cookie.length )
{
var y = (x+nameOfCookie.length);
if ( 
document.cookie.substring( x, y ) == nameOfCookie ) {
if ( 
(endOfCookie=document.cookie.indexOf( ";", y )) == -1 )
endOfCookie = document.cookie.length;
return unescape( document.cookie.substring( y, endOfCookie ) );
}
x = document.cookie.indexOf( " ", x ) + 1;
if ( x == 0 )
break;
}
return "";
  }
*/




//ÁÖ¿ä½Ã¼³ Àå³»À§Ä¡µµ
function enlarge(which,e){
//Render image code for IE 4+
if (document.all){
/*	if (showimage.style.visibility=="hidden"){*/

		if (event.clientX+5000>screen.availWidth){
			showimage.style.left=document.body.scrollLeft+event.clientX-600
			if(event.clientY+100>screen.availHeight){
				showimage.style.top=document.body.scrollTop+event.clientY-140
			}else{
				showimage.style.top=document.body.scrollTop+event.clientY-150
			}

		}else	{
			showimage.style.left=document.body.scrollLeft+event.clientX+10
			if (event.clientY+300>screen.availHeight){
				showimage.style.top=document.body.scrollTop+event.clientY-340
			}else{
				showimage.style.top=document.body.scrollTop+event.clientY-150
			}
		}

		showimage.innerHTML='<img src="'+which+'">'
		showimage.style.visibility="visible"
/*	}
	else
		showimage.style.visibility="hidden"
		return false
*/		
	}
else if (document.layers){
	if (document.showimage.visibility=="hide"){
		document.showimage.document.write('<a  onMouseover="drag_dropns(showimage)"><img src="'+which+'" border=0></a>')
		document.showimage.document.close()
		document.showimage.left=e.x
		document.showimage.top=e.y
		document.showimage.visibility="show"
	}
	else
		document.showimage.visibility="hide"
	return false
}
//if NOT IE 4+ or NS 4, simply display image in full browser window
else
	return true
}


var nsx
var nsy
var nstemp

function drag_dropns(name){
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN | Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}

function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}

function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}

var dragapproved=false

function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
document.all.showimage.style.pixelTop=tempy+event.clientY-iey
return false
}
}

function initializedragie(){
if (event.srcElement.parentElement.id=="showimage"){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}
}

if (document.all){
document.onmousedown=initializedragie
document.onmouseup=new Function("dragapproved=false")
}


function gopage(num) {
	var f = document.form1;
	f.page.value  = num;
	f.iPageIndex.value  = num;
	f.action      = "board_list_sunin.jsp";
	f.method      = "post";
	f.submit(); 
}

function goView(file,tcode,reqYear,maxYear,minYear,page,seq,num) {
	var f = document.form1;
	f.tCode.value  = tcode;
	f.reqYear.value  = reqYear;
	f.maxYear.value  = maxYear;
	f.minYear.value  = minYear;
	f.page.value  = page;
	f.seq.value  = seq;
	f.num.value  = num;
	//f.fileseq.value  = fileseq;
	f.action      = file;
	f.method      = "post";
	f.submit(); 
}


function processKeyPress() 
{ 
		if (event.keyCode == 13) 
		{  
			if (document.form1.sKeyword.value < 1)
			{
				alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
				document.form1.sKeyword.focus();
				return false;
			}
			else
			{
				searchgo();
				//exit;
			}
		} 
} 

function searchgo()
{
  if (document.form1.sKeyword.value < 1)
  {
    alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä.")
    document.form1.sKeyword.focus();
    return false;
  }
  document.form1.method = "post";
  document.form1.target = "_self";
//alert(itsme);
//  document.form1.action = "board_list_sunin.jsp";

document.form1.submit();
}


function start() {	


  	}

  
	
	
// new ¸Þ´º Ãß°¡ lib
function initNavigation2(id,seq) {
	var nav = document.getElementById(id);
	nav.menu = new Array();
	nav.current = null;
	nav.menuseq = 0;
	navLen = nav.childNodes.length;
	var current_img, current_num;

	allA = nav.getElementsByTagName("a")
	for(k = 0; k < allA.length; k++) {
		
		allA.item(k).onmouseover = allA.item(k).onfocus = function () {
			nav.isOver = true;
			if(this.firstChild.src.indexOf("_ov.gif")==-1){
				this.firstChild.src=this.firstChild.src.replace(".gif", "_ov.gif");
			}else{
				current_img = "y";
				current_num = k;
			}
		}

		allA.item(k).onmouseout = allA.item(k).onblur = function () {
			nav.isOver = false;
			/*setTimeout(function () {
				if (nav.isOver == false) {
					if(seq!=0){
						if (nav.menu[seq])
							nav.menu[seq].onmouseover();
						else if(nav.current) {
							menuImg = nav.current.childNodes.item(0);
							
							if(menuImg.className!="current_nav"){
								menuImg.src = menuImg.src.replace("_ov.gif", ".gif");
							}else{
								
							}
							
							if (nav.current.submenu)
								nav.current.submenu.style.display = "none";
							/*nav.current = null;*/
						/*}
					}else{
						//alert(current_num);
						
						if(menuImg.className!="current_nav"){
							menuImg.src = menuImg.src.replace("_ov.gif", ".gif");
						}else{
							
						}

						//nav.menu[seq].onmouseover();
						if (nav.current.submenu)
								nav.current.submenu.style.display = "none";
					}
				}
			}, 200);*/

			if(current_img==""){
				if(this.parentNode.parentNode.id!=id)	this.firstChild.src=this.firstChild.src.replace("_ov.gif", ".gif");	
			}
			current_img = "";
		}
	}

	var i;
	var depth2_current = "";
	for (i = 0; i < navLen; i++) {
		navItem = nav.childNodes.item(i);
		if (navItem.tagName != "LI")
			continue;

		navAnchor = navItem.getElementsByTagName("a").item(0);
		navAnchor.submenu = navItem.getElementsByTagName("ul").item(0);
		
		navAnchor.onmouseover = navAnchor.onfocus = function () {
			if (nav.current) {
				menuImg = nav.current.childNodes.item(0);
				
				if(menuImg.className!="current_nav"){
					menuImg.src = menuImg.src.replace("_ov.gif", ".gif");
				}else{
					
				}

				if (nav.current.submenu)
					nav.current.submenu.style.display = "none";
				nav.current = null;
			}
			if (nav.current != this) {
				menuImg = this.childNodes.item(0);
				menuImg.src = menuImg.src.replace(".gif", "_ov.gif");
				if (this.submenu)
					this.submenu.style.display = "block";
				nav.current = this;
			}
			nav.isOver = true;
		}
		nav.menuseq++;
		nav.menu[nav.menuseq] = navAnchor;
	}
	
}

window.onload = function(){
	initNavigation2('gnb',0)

}

//È­¸é È®´ë Ãà¼Ò »õ·Î¿î Ä£±¸µéÀÌ¾ß 
var nowZoom = 100; // ÇöÀçºñÀ² 
var maxZoom = 500; // ÃÖ´ëºñÀ²(500À¸·ÎÇÏ¸é 5¹è Ä¿Áø´Ù) 
var minZoom = 50; // ÃÖ¼ÒºñÀ² 
var _nowFontSize = 10;
function zoomIn() { 
    if (nowZoom < maxZoom){ 
    	if(_BROSER == "IE"){
    		 nowZoom += 10; //25%¾¿ Ä¿Áø´Ù. 
    		 document.body.style.zoom = nowZoom + "%"; 
		}else{
			//_nowFontSize = _nowFontSize+2;
			//changeFontsize(_nowFontSize,'');
			
			if(!_isCTRL) {
				alert("ÄÁÆ®·ÑÅ°¸¦ ´©¸¥»óÅÂ¿¡¼­ + Å°¸¦ ´©¸£½Ã¸é Ä¿Áý´Ï´Ù");
			}else{
				_FFZoomCnt++;
			}
		}
       
       
    } 
   
} 

function zoomInBtn(){
	var browser = navigator.appName;

	if(browser.indexOf('Microsoft') !=-1){
		_BROSER = "IE";
	}
	zoomIn();
}
//È­¸é ÁÙÀÎ´Ù. 
function zoomOut() { 
    if (nowZoom > minZoom){ 
        
       
        if(_BROSER == "IE"){
        	nowZoom -= 10; //25%¾¿ ÀÛ¾ÆÁø´Ù. 
        	document.body.style.zoom = nowZoom + "%"; 
		}else{
			//_nowFontSize = _nowFontSize-2;
			//changeFontsize(_nowFontSize,'');
			if(!_isCTRL) {
				alert("ÄÁÆ®·ÑÅ°¸¦ ´©¸¥»óÅÂ¿¡¼­ - Å°¸¦ ´©¸£½Ã¸é ÀÛ¾ÆÁý´Ï´Ù");
			}else{
				_FFZoomCnt--;
			}
		}
    }   
    
} 

function zoomOutBtn(){
	var browser = navigator.appName;
	if(nowZoom ==100){
		alert("ÇöÀç Ã¢¿¡¼­ ´õÀÌ»ó ÁÙÀÌ½Ç ¼ö ¾ø½À´Ï´Ù");
	}else{
		if(browser.indexOf('Microsoft') !=-1){
			_BROSER = "IE";
		}
		zoomOut();
	}
}

//È­¸é ¿ø·¡´ë·Î 
function zoomDefault() { 
	if(_BROSER == "IE"){
		nowZoom = 100; 
		document.body.style.zoom = nowZoom + "%";
	}
} 

