//ÇÃ·¡½¬ °ü·Ã

function MakeFlashString(source,id,width,height,wmode,otherParam)
{	
	return "<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,22,0\" width="+width+" height="+height+" id="+id+"><param name=wmode value="+wmode+" /><param name=movie value='"+source+"' /><param name=quality value=high />"+otherParam+"<embed src='"+source+"' quality=high wmode='"+wmode+"' type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?p1_prod_version=shockwaveflash\" width="+width+" height="+height+"></embed></object>";
}

function DocumentWrite(src)
{
	document.write(src);
}


// Top Menu
function initNavigation(seq) {
	nav = document.getElementById("topmenu");
	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;
			setTimeout(function () {
				if (nav.isOver == false) {
					if (nav.menu[seq])
						nav.menu[seq].onmouseover();
					else if(nav.current) {
						menuImg = nav.current.childNodes.item(0);
						menuImg.src = menuImg.src.replace("_over.gif", ".gif");
						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) {
				menuImg = nav.current.childNodes.item(0);
				menuImg.src = menuImg.src.replace("_over.gif", ".gif");
				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", "_over.gif");
				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 initMoving(target, position, topLimit, btmLimit) {
    if (!target)
        return false;

    var obj = target;
	var obj2 = document.getElementById("subcontents");
	var sss = 0;
    obj.initTop = position;
    obj.topLimit = topLimit;
    obj.bottomLimit = document.documentElement.scrollHeight - btmLimit;
    obj.style.position = "absolute";
    obj.top = obj.initTop;


    if (typeof(window.pageYOffset) == "number") {
        obj.getTop = function() {
            return window.pageYOffset;
        }
    } else if (typeof(document.documentElement.scrollTop) == "number") {
        obj.getTop = function() {
            return document.documentElement.scrollTop;
        }
    } else {
        obj.getTop = function() {
            return 0;
        }
    }

    if (self.innerHeight) {
        obj.getHeight = function() {
            return self.innerHeight;
        }
    } else if(document.documentElement.clientHeight) {
        obj.getHeight = function() {
            return document.documentElement.clientHeight;
        }
    } else {
        obj.getHeight = function() {
            return 500;
        }
    }



    obj.move = setInterval(function() {
        if (obj.initTop > 0) {
            pos = obj.getTop() + obj.initTop;
        } else {
            pos = obj.getTop() + obj.getHeight() + obj.initTop;
            //pos = obj.getTop() + obj.getHeight() / 2 - 15;
        }

        if (pos > obj.bottomLimit)
            pos = obj.bottomLimit;
        if (pos < obj.topLimit)
            pos = obj.topLimit;

        interval = obj.top - pos;
        obj.top = obj.top - interval / 3;
        obj.style.top = obj.top + "px";
    }, 30)
}

	function sso_Logins()
	{
		LoginWindow = window.open("https://sso.suyeong.go.kr:444/?spId=homepage","","width=719, height=760, top=0,left=0, scrollbars=yes, resizable=no" );
//		LoginWindow = window.open("https://sso.suyeong.go.kr/?spId=homepage","","width=719, height=760, top=0,left=0, scrollbars=yes, resizable=no" );
		LoginWindow.opener = self;
	}
	function sso_Joins()
	{
		JoinWindow = window.open("https://sso.suyeong.go.kr:444/member/join/?spId=homepage","","width=719, height=700,top=0,left=0, scrollbars=yes, resizable=no" );
		JoinWindow.opener = self;
	}
	function sso_IdpassSearch()
	{
		SearchWindow = window.open("https://sso.suyeong.go.kr:444/member/find/?spId=homepage" ,"","width=719, height=700, top=0,left=0, scrollbars=yes, resizable=no");
		SearchWindow.opener = self;
	}


	function ResizeFrame() {

		var fBody  = document.frames("ado_board").document.body;
		var fName  = document.all("ado_board");

		fName.style.height = fBody.scrollHeight + (fBody.offsetHeight - fBody.clientHeight);  // ¸¸¾à IFRAMEÀÇ Å©±â ¼³Á¤¿¡ ½ÇÆÐ ÇÏ¿´´Ù¸é ±âº»Å©±â·Î ¼³Á¤ÇÑ´Ù.

		if (fName.style.height == "0px") {
			fName.style.height = "500px";    //±âº» iframe ³ôÀÌ
		}
	}

   function resizeFrame2() {
        var parentIframe = document.getElementById("ado_board");
        var childBodyHeight = parentIframe.contentWindow.document.getElementsByTagName("table") ? parentIframe.contentWindow.document.getElementsByTagName("table") : null;;

        if (childBodyHeight != null) {
            childBodyHeight = childBodyHeight.item(0).offsetHeight;
            parentIframe.style.height = childBodyHeight + "px";

        }
    }
   function resizeFrame3() {
        var parentIframe = document.getElementById("wrapper");
        var childBodyHeight = parentIframe.contentWindow.document.getElementsByTagName("table") ? parentIframe.contentWindow.document.getElementsByTagName("table") : null;;

        if (childBodyHeight != null) {
            childBodyHeight = childBodyHeight.item(0).offsetHeight;
            parentIframe.style.height = childBodyHeight + "px";

        }
    }
	function updateIFrame( height ) {
		var iframe = document.getElementById( 'ado_board' );
		iframe.setAttribute( 'height', height );
	}

//ÀÍ½ºÇÃ·Î·¯ È­¸éÈ®´ë
function viewZoom(input){
  if(navigator.userAgent.toLowerCase().indexOf("msie")!=-1){
     if(document.body.style.zoom==null||document.body.style.zoom==""){     
      zoomStat = 100;
     }
    
     if(input=="plus"){
      zoomStat = zoomStat + 10;
     }

	 if (input=="minus")
	 {
	 zoomStat = zoomStat - 10;
	 }

	 if (input=="default")
	 {
	 zoomStat = 100;
	 }

     if(zoomStat > 140){
      zoomStat = 140;      
     }
    
     if(zoomStat < 60){
      zoomStat = 60;
     }
    
     document.body.style.zoom = zoomStat+"%";
  }
}

 

//¹®È­°ü±¤ ÀÌ¹ÌÁöº¯°æ ½ºÅ©¸³


function nw(url,target,width,height,top,left,scrolls){
 open (url,target,'width='+width+',height='+height+',top='+top+',left='+left+',menubar=0,scrollbars='+scrolls+',resizable=0,status=0');
}
function imgChange(id, obj){
 var objDest = document.getElementById(id);
 objDest.src = obj.src;
}



//°Ë»ö ¼­ºñ½º °ü·Ã
var tdcount = 0;
function serOPen(){
	var temp = document.serForm.searchtext.value;
	if (temp=="" || temp=="°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¼¼¿ä."){
	alert("°Ë»ö¾î¸¦ ÀÔ·ÂÇÏ¿© ÁÖ½Ê½Ã¿ä");
		return;
	}
	if (document.serForm.searchpart[0].checked == true){
		//window.open("../cgi-bin/mclient.cgi?p=" + document.serForm.searchtext.value, "serWindow", "");
		// alert("°Ë»ö¼­ºñ½º Á¡°ËÀ» À§ÇÏ¿© Àá½Ã È¨ÆäÀÌÁö °Ë»ö¼­ºñ½º¸¦ ÁßÁöÇÕ´Ï´Ù.\n°Ë»ö¿£ÁøÀÇ ¾÷µ¥ÀÌÆ® ÀÛ¾÷ÀÌ ¸¶¹«¸®µÇ´Â ´ë·Î ¼­ºñ½º¸¦ °¡µ¿ÇÒ ¿¹Á¤ÀÔ´Ï´Ù.");
		document.serForm.p.value = document.serForm.searchtext.value;
		document.serForm.target="_balnk";
		document.serForm.action ="../cgi-bin/mclient.cgi";
		document.serForm.submit();

	}else if (document.serForm.searchpart[1].checked == true){
		document.serForm.target="_self";
		document.serForm.action = "../06_suyoung/s7_1.asp?searchpart=s_name&searchtext=" + temp;
		document.serForm.submit();
	}else if (document.serForm.searchpart[2].checked == true){
		document.serForm.target="_self";
		document.serForm.action = "../06_suyoung/s7_1.asp?searchpart=s_work&searchtext=" + temp;
		document.serForm.submit();
	}
	
}
function serOPen_001(){
	var temp = document.serForm.searchtext.value;
	temp = document.temp.replace("\n","");
	if (document.serForm.searchpart[0].checked == true){
		// serForm.action= "";
		window.open("../cgi-bin/mclient.cgi?p=" + document.serForm.searchtext.value, "serWindow", "");
		// alert("°Ë»ö¼­ºñ½º Á¡°ËÀ» À§ÇÏ¿© Àá½Ã È¨ÆäÀÌÁö °Ë»ö¼­ºñ½º¸¦ ÁßÁöÇÕ´Ï´Ù.\n°Ë»ö¿£ÁøÀÇ ¾÷µ¥ÀÌÆ® ÀÛ¾÷ÀÌ ¸¶¹«¸®µÇ´Â ´ë·Î ¼­ºñ½º¸¦ °¡µ¿ÇÒ ¿¹Á¤ÀÔ´Ï´Ù.");
	}else if (document.serForm.searchpart[1].checked == true){
		// document.location = "../99_guide/staff.asp?searchpart=s_name&searchtext=" + temp;
		document.serForm.action = "../99_guide/staff.asp?searchpart=s_name&searchtext=" + temp;
		document.serForm.submit();
	}else if (document.serForm.searchpart[2].checked == true){
		// document.location = "../99_guide/staff.asp?searchpart=s_work&searchtext=" + temp;
		document.serForm.action = "../99_guide/staff.asp?searchpart=s_work&searchtext=" + temp;
		document.serForm.submit();
	}
}



//¸ÞÀÎ ¾Ë¸²¸¶´ç..
function Main_Dept_On(Main_Dept_id,a) {
for (i=1;i<=10;i++) {
if(i<10){inn="0"+i;} else {inn=""+i;}
Main_Dept_Menu = document.getElementById("Main_Dept_"+Main_Dept_id+"_Menu_"+i);
Main_Dept_Content = document.getElementById("Main_Dept_"+Main_Dept_id+"_Dept_"+i);
if (Main_Dept_Menu) { //°´Ã¼°¡Á¸ÀçÇÏ¸é
if (Main_Dept_Menu.tagName=="IMG") { Main_Dept_Menu.src="/img/main/"+"Main_Dept_"+Main_Dept_id+"_Menu_"+inn+".gif"; } //ÀÌ¹ÌÁöÀÏ¶§
}
if (Main_Dept_Content) { Main_Dept_Content.style.display="none"; }
}
if(a<10){ann="0"+a;} else {ann=""+a;}
Main_Dept_Menu = document.getElementById("Main_Dept_"+Main_Dept_id+"_Menu_"+a);
Main_Dept_Content = document.getElementById("Main_Dept_"+Main_Dept_id+"_Dept_"+a);

if (Main_Dept_Menu) { //°´Ã¼°¡Á¸ÀçÇÏ¸é
if (Main_Dept_Menu.tagName=="IMG") { Main_Dept_Menu.src="/img/main/"+"Main_Dept_"+Main_Dept_id+"_Menu_"+ann+"_o.gif"; } //ÀÌ¹ÌÁöÀÏ¶§
}
if (Main_Dept_Content) { Main_Dept_Content.style.display="block"; }
Main_Dept_More = document.getElementById("Main_Dept_"+Main_Dept_id+"more");
if (Main_Dept_More) {
Main_Dept_More.href = moreLink[Main_Dept_id-1][a-1];
Main_Dept_More.onclick = moreClick[Main_Dept_id-1][a-1];
}
}

//ÅÇ
function Main_Dept(rev1,rev2){
	m_str = rev2;
   
	Main_Dept_On(rev1,rev2);

}


//¸ÞÀÎ ÅÇ¸Þ´º..
function Tab_Dept_On(Tab_Dept_id,a) {
for (i=1;i<=10;i++) {
if(i<10){inn="0"+i;} else {inn=""+i;}
Tab_Dept_Menu = document.getElementById("Tab_Dept_"+Tab_Dept_id+"_Menu_"+i);
Tab_Dept_Content = document.getElementById("Tab_Dept_"+Tab_Dept_id+"_Dept_"+i);
if (Tab_Dept_Menu) { //°´Ã¼°¡Á¸ÀçÇÏ¸é
if (Tab_Dept_Menu.tagName=="IMG") { Tab_Dept_Menu.src="/img/main/"+"Tab_Dept_"+Tab_Dept_id+"_Menu_"+inn+".gif"; } //ÀÌ¹ÌÁöÀÏ¶§
}
if (Tab_Dept_Content) { Tab_Dept_Content.style.display="none"; }
}
if(a<10){ann="0"+a;} else {ann=""+a;}
Tab_Dept_Menu = document.getElementById("Tab_Dept_"+Tab_Dept_id+"_Menu_"+a);
Tab_Dept_Content = document.getElementById("Tab_Dept_"+Tab_Dept_id+"_Dept_"+a);
if (Tab_Dept_Menu) { //°´Ã¼°¡Á¸ÀçÇÏ¸é
if (Tab_Dept_Menu.tagName=="IMG") { Tab_Dept_Menu.src="/img/main/"+"Tab_Dept_"+Tab_Dept_id+"_Menu_"+ann+"_o.gif"; } //ÀÌ¹ÌÁöÀÏ¶§
}
if (Tab_Dept_Content) { Tab_Dept_Content.style.display="block"; }
Tab_Dept_More = document.getElementById("Tab_Dept_"+Tab_Dept_id+"more");
if (Tab_Dept_More) {
Tab_Dept_More.href = moreLink[Tab_Dept_id-1][a-1];
Tab_Dept_More.onclick = moreClick[Tab_Dept_id-1][a-1];
}
}
function Tab_Dept(rev1,rev2){
 m_str = rev2;
   
 Tab_Dept_On(rev1,rev2);
}



 /**
  * ÀÚ½ÅÀÌ ÁöÁ¤ÇÑ ÄíÅ°¸íÀ¸·Î È®ÀÎ
  */
 function getMyCookie( name )
 {
var rurl = getCookie( name );
if (rurl != "")
	document.location = rurl;
	deleteMyCookie(name);
{
}
 }

 function getCookie( cookieName )
 {
  var search = cookieName + "=";
  var cookie = document.cookie;

  // ÇöÀç ÄíÅ°°¡ Á¸ÀçÇÒ °æ¿ì
  if( cookie.length > 0 )
  {
   // ÇØ´ç ÄíÅ°¸íÀÌ Á¸ÀçÇÏ´ÂÁö °Ë»öÇÑ ÈÄ Á¸ÀçÇÏ¸é À§Ä¡¸¦ ¸®ÅÏ.
   startIndex = cookie.indexOf( cookieName );

   // ¸¸¾à Á¸ÀçÇÑ´Ù¸é
   if( startIndex != -1 )
   {
    // °ªÀ» ¾ò¾î³»±â À§ÇØ ½ÃÀÛ ÀÎµ¦½º Á¶Àý
    startIndex += cookieName.length;

    // °ªÀ» ¾ò¾î³»±â À§ÇØ Á¾·á ÀÎµ¦½º ÃßÃâ
    endIndex = cookie.indexOf( ";", startIndex );

    // ¸¸¾à Á¾·á ÀÎµ¦½º¸¦ ¸øÃ£°Ô µÇ¸é ÄíÅ° ÀüÃ¼±æÀÌ·Î ¼³Á¤
    if( endIndex == -1) endIndex = cookie.length;

    // ÄíÅ°°ªÀ» ÃßÃâÇÏ¿© ¸®ÅÏ
    return unescape( cookie.substring( startIndex + 1, endIndex ) );
   }
   else
   {
    // ÄíÅ° ³»¿¡ ÇØ´ç ÄíÅ°°¡ Á¸ÀçÇÏÁö ¾ÊÀ» °æ¿ì
    return false;
   }
  }
  else
  {
   // ÄíÅ° ÀÚÃ¼°¡ ¾øÀ» °æ¿ì
   return false;
  }
 }


 /**
  * ÀÚ½ÅÀÌ ÁöÁ¤ÇÑ ÄíÅ°¸íÀ¸·Î ÄíÅ° »èÁ¦
  */
 function deleteMyCookie( name )
 {
  deleteCookie( name );
 }

 function deleteCookie( cookieName )
 {
  var expireDate = new Date();
  
  //¾îÁ¦ ³¯Â¥¸¦ ÄíÅ° ¼Ò¸ê ³¯Â¥·Î ¼³Á¤ÇÑ´Ù.
  expireDate.setDate( expireDate.getDate() - 1 );
  document.cookie = cookieName + "= " + "; expires=" + expireDate.toGMTString() + "; path=/";
 }

function open_jump_menu ( id ){

if (id=="jumpMenu1")
{
	var frm = document.jump_menus.jumpMenu1.value;	
}
if (id=="jumpMenu2")
{
	var frm = document.jump_menus.jumpMenu2.value;	
}
if (id=="jumpMenu3")
{
	var frm = document.jump_menus.jumpMenu3.value;	
}
if (id=="jumpMenu4")
{
	var frm = document.jump_menus.jumpMenu4.value;	
}


if (frm != "")
{
  window.open( frm, id  );
}
}

function  election_go()
{
window.open("/93_election/popup.html","elec2","top=0,left=0,scrollbars=yes,width=373,height=560");
}
