<!--
 function MM_reloadPage(init) {  //reloads the window if Nav4 resized
   if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
     document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
   else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
 }
 MM_reloadPage(true);
 
 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];}
 }
 
 function MM_showHideLayers() { //v6.0
   var i,p,v,obj,args=MM_showHideLayers.arguments;
   for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
     if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
     obj.visibility=v; }
 }
 
 function checkSpaces(t) { //공백체크 함수
     var flag = true;
     if(t != "") {
         for(var i=0;i<t.length;i++) {
            if(t.charAt(i) != " ") {
                flag = false;
                break;
            }
         }
     }

     return flag;
 }

 function loginDisplay(n) { //top화면 로그인 display 함수
     if(n == "1") { //로그인 화면 보이게
        ly_login1.style.visibility = "hidden";
        ly_login2.style.visibility = "visible";
        document.login_frm.k_id.focus();
     }
     else { //로그인 화면 보이자 않게
        ly_login1.style.visibility = "hidden";
        ly_login2.style.visibility = "hidden";
     }
 }
 
 function loginLayer(f) { //top화면 로그인 함수
     var k_id = f.k_id.value;
     if(checkSpaces(k_id)) {
         alert("아이디를 입력해주세요.");
         f.k_id.focus();
         return;
     }

     var pwd = f.pwd.value;
     if(checkSpaces(pwd)) {
         alert("비밀번호를 입력해주세요.");
         f.pwd.focus();
         return;
     }
     
     document.login_frm.target = "k_top";
     document.login_frm.action = "/etc/myriss/loginCheck.jsp"
     document.login_frm.submit();
 }
 
 var main_cnt = 2
 function show(num) { //기관회원 서비스(공통)left함수
     for(i=1;i<=main_cnt;i++) {
         menu = eval("document.all.block"+i+".style");
         if(num==i) {
             if(menu.display=="block") menu.display="none";
             else menu.display="block";
         } else {
             menu.display="none";
         }
     }
 }

 function onChangeLayer(grade) { //기관회원 서비스 left함수
     switch (grade) {
       case "Community" :
           libn1.style.display = "";
           libn2.style.display = "none";
           break;
       
       case "Channel" :
           libn2.style.display = "";
           libn1.style.display = "none";
           break;
     }
 }

 function libn_show(num) { //기관회원 서비스 left함수
     for(i=1;i<=main_cnt;i++) {
         menu = eval("document.all.libn"+i+".style");
         if(num==i) {
             if(menu.display=="block") menu.display="none";
             else menu.display="block";
         } else {
             menu.display="none";
         }
     }
 }

 function goSearch(t) { //관련 사이트 함수
     var val = t.value;
     if(!checkSpaces(val)) {
     	var f = window.open(val);
     	f.focus();
     	
     	t.selectedIndex = 0;
     }
 }

 function MM_openBrWindow(theURL,winName,features) { //v2.0 팝업함수
     var f = window.open(theURL,winName,features);
     f.focus();
 }
 
 function ft_open() {
	 var f = window.open("/etc/faq/program.html","a","toolbar=no,menubar=no,width=680,height=600,scrollbars=yes,top=0,left=0");
	 f.focus();
 }

 /* 수정내용 : DDOD 직접접속 이용자인경우 로그인 요청 함수 (2004.06.01) => Start */
 function ddodCheck(u) {
     if(!navigator.cookieEnabled) {
         alert("쿠키 허용을 하지 않았습니다. 쿠키 사용으로 복원해 주세요.");
         return;
     }

     var userid = "";
     var name = "";
     var thisCookie = document.cookie.split("; ");
     for(i=0;i<thisCookie.length;i++) { //Cookie 검색
         name = thisCookie[i].split("=")[0];
         if(name == "USERID") {
             userid = unescape(thisCookie[i].split("=")[1]);
             break;
         }
     }
     
     if(userid.length >=4 && userid.substring(0,4).toLowerCase() == "org-") { //직접접속 아이디인 경우
          if(confirm("죄송합니다. 현재 직접접속 이용자로 로그인 되어 있습니다. \n\n이 메뉴는 개인 아이디로 로그인 한 후에 서비스를 이용할 수 있습니다. \n\n개인 아이디로 로그인 하시겠습니까?")) { 
              document.location.href = "/etc/myriss/login.jsp?url="+u;
          }
     } else {
         var f = window.open(u,"","");
         f.focus();
     }
 }
 /* 수정내용 : DDOD 직접접속 이용자인경우 로그인 요청 함수 (2004.06.01) => End */
 
 /* 수정내용 : KERIC 이용자인경우 로그인 요청 함수 (2004.12.22) => Start */
 function kericCheck() {
     if(!navigator.cookieEnabled) {
         alert("쿠키 허용을 하지 않았습니다. 쿠키 사용으로 복원해 주세요.");
         return;
     }

     var userid = "";
     var name = "";
     var thisCookie = document.cookie.split("; ");
     for(i=0;i<thisCookie.length;i++) { //Cookie 검색
         name = thisCookie[i].split("=")[0];
         if(name == "USERID") {
             userid = unescape(thisCookie[i].split("=")[1]);
             break;
         }
     }
     
     if(userid.length > 0) { //아이디가 있는 경우
         u = "http://www.keric.net/keric/main/LoginHandle2.jsp?from=riss&id="+userid; 
     } else {
         u = "http://www.keric.net";
     }
     
     var f = window.open(u,"_keric","");
     f.focus();
 }
 /* 수정내용 : KERIC 이용자인경우 로그인 요청 함수 (2004.12.22) => End */
//-->
