
<%    /**
     * **********************************************************
     * @@ Program Name  : group_dept_list.jsp
     * @@ Description	: 사용자정의 그룹변경
     * @@ Author	: 기현테크
     * @@ Create Date   : 2010-11-27
     * @@ History       : 2014.09.18 Update by KWON,HAN
     * @@***********************************************************
     */
%>

<%@ page contentType="text/html; charset=UTF-8"
         import="kr.co.kihyun.lang.MString"
         import="kr.co.kihyun.lang.MInteger"
         import="kr.co.kihyun.lang.MLong"
         import="kr.co.kihyun.moumi.Moumi"
         import="java.net.URLDecoder"
         import="kr.co.kihyun.lang.Encoder"
         import="kr.co.kihyun.beans.user.HttpSSOLogin"
         import="kr.co.kihyun.beans.user.UserGroup"
         import="kr.co.kihyun.beans.user.UserGroupList"
         import="kr.co.kihyun.beans.entity.util.*"
         import="javax.jdo.PersistenceManager" import="javax.jdo.Transaction"
         import="kr.co.kihyun.beans.entity.*"
         import="kr.co.kihyun.beans.user.Dept"
         import="kr.co.kihyun.beans.user.User"%>

<%@ include file="/totsys/common/inc/sec/secure.inc.jsp"%>

<%    /**
     * ******** session내의 userId *********
     */
    String usID = HttpSSOLogin.getLoginID(request);

    /**
     * **** Parameter *****
     */
    String groupID = request.getParameter("groupID");
    //28.크로스사이트 스크립트(Reflected)_CWE-80 : Add by KWON,HAN
    if (groupID !=null) {
        groupID = groupID.replaceAll("<","&lt");
        groupID = groupID.replaceAll(">","&gt");
    }
    //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

        //String groupName = clearXSS(Encoder.toJava(MString.checkNull(request.getParameter("groupName"))),"");

    //LJH
    String groupName = clearXSS(URLDecoder.decode(request.getParameter("groupName"), "UTF-8"), "");

    PersistenceManager pm = new MPersistenceManager(PMF.get().getPersistenceManager());
    Transaction tx = pm.currentTransaction();
    tx.begin();
    UserPart userPart = pm.getObjectById(UserPart.class, groupID);
    groupName = userPart.getName();
    tx.rollback();

    /**
     * **** 해당 그룹의 부서 사용자 가져오기 *****
     */
    String deptIDs = "";
    String deptNames = "";
    String userIDs = "";
    String userNames = "";
    String deptTypes = "";
    String validTypes = "";

    //부서리스트 가져오기
    UserGroup ugroup = new UserGroup();
    String[] idList = ugroup.getDeptID(groupID);
    String[] nameList = ugroup.getDeptName(groupID);
    String[] ogranNameList = ugroup.getOrganNameOfUpperDept(groupID);
    String[] upperNameList = ugroup.getUpperDeptName(groupID);

    String dTypes = "";
    if (idList != null) {
        for (int i = 0; i < idList.length; i++) {
            if (i == 0) {
                deptIDs = deptIDs + idList[i];
                //deptNames = deptNames + nameList[i];
                //deptNames = deptNames + new Dept().getPartName(idList[i]) + "-" + new Dept().getUpperDeptName(idList[i]) + "-" + new Dept().getName(idList[i]);
                //deptNames = deptNames + new Dept().getOrganNameOfUpperDept(idList[i]) + "|" + new Dept().getUpperDeptName(idList[i]) + "|" + new Dept().getName(idList[i]);
                deptNames = deptNames + ogranNameList[i] + "|" + MString.checkNull(upperNameList[i]) + "|" + nameList[i];
                dTypes = "dept";
                validTypes = "1" + "@@@@" + idList[i];
            } else {
                deptIDs = deptIDs + "," + idList[i];
                //deptNames = deptNames + "," + nameList[i] ;
                //deptNames = deptNames + "," + new Dept().getPartName(idList[i]) + "-" + new Dept().getUpperDeptName(idList[i]) + "-" + new Dept().getName(idList[i]);
                //deptNames = deptNames + "," + new Dept().getOrganNameOfUpperDept(idList[i]) + "|" + new Dept().getUpperDeptName(idList[i]) + "|" + new Dept().getName(idList[i]);
                deptNames = deptNames + "," + ogranNameList[i] + "|" + MString.checkNull(upperNameList[i]) + "|" + nameList[i];
                dTypes = dTypes + ",dept";
                validTypes = validTypes + "," + "1" + "@@@@" + idList[i];
            }
        }
    }

    //개인리스트 가져오기
    ugroup.userSetting(groupID);
    String[] userUserID = ugroup.getUserUserID();
    String[] userUserName = ugroup.getUserUserName();
    String[] userDeptID = ugroup.getUserDeptID();
    String uTypes = "";

    if (userUserID != null) {
        for (int i = 0; i < userUserID.length; i++) {
            if (i == 0) {
                userIDs = userUserID[i] + "/" + userDeptID[i];
                //userNames = userUserName[i];
                //userNames = new Dept().getPartName(userDeptID[i]) + "-" + new Dept().getUpperDeptName(userDeptID[i]) + "-" + new Dept().getName(userDeptID[i]) + "/" + new User().getName(userUserID[i]);
                userNames = new Dept().getOrganNameOfUpperDept(userDeptID[i]) + "|" + new Dept().getUpperDeptName(userDeptID[i]) + "|" + new Dept().getName(userDeptID[i]) + "/" + new User().getName(userUserID[i]);
                uTypes = "user";
                if (validTypes.length() == 0) {
                    validTypes = new UserGroupList().getVaild(groupID, userUserID[i]) + "/" + userUserID[i] + "/" + userDeptID[i];
                } else {
                    validTypes = validTypes + "," + new UserGroupList().getVaild(groupID, userUserID[i]) + "@@@@" + userUserID[i] + "/" + userDeptID[i];
                }
            } else {
                userIDs += "," + userUserID[i] + "/" + userDeptID[i];
                //userNames += ","+userUserName[i];
                //userNames += "," + new Dept().getPartName(userDeptID[i]) + "-" + new Dept().getUpperDeptName(userDeptID[i]) + "-" + new Dept().getName(userDeptID[i]) + "/" + new User().getName(userUserID[i]);
                userNames += "," + new Dept().getOrganNameOfUpperDept(userDeptID[i]) + "|" + new Dept().getUpperDeptName(userDeptID[i]) + "|" + new Dept().getName(userDeptID[i]) + "/" + new User().getName(userUserID[i]);
                uTypes = uTypes + ",user";
                validTypes = validTypes + "," + new UserGroupList().getVaild(groupID, userUserID[i]) + "@@@@" + userUserID[i] + "/" + userDeptID[i];
            }
        }
    }

    if (!deptIDs.equals("") && !userIDs.equals("")) {
        deptIDs = deptIDs + "," + userIDs;
        deptNames = deptNames + "," + userNames;
        deptTypes = dTypes + "," + uTypes;
    } else {
        deptIDs = deptIDs + userIDs;
        deptNames = deptNames + userNames;
        deptTypes = dTypes + uTypes;
    }

%>

<!DOCTYPE html>
<html lang="ko">
	<head>
        <meta charset="UTF-8">
        <title>사용자 그룹 설정</title>
        <script type="text/javascript" src="/totsys/common/js/jquery-1.12.4.min.js"></script>
        <script type="text/javascript" src="/totsys/common/js/jquery.cookie.js"></script>
		<script type="text/javascript" src="/totsys/common/js/jquery.hotkeys.js"></script>
		<script type="text/javascript" src="/totsys/common/js/jquery.jstree.js"></script>
        <script type="text/javascript" src="/totsys/common/js/jquery.custom.indicator.js"></script>
        <script src="/totsys/common/js/org_search.js"></script>
        <link rel="stylesheet" href="/totsys/common/css/kecttep.css" type="text/css">
        <link rel="stylesheet" href="/totsys/common/css/popup.css" type="text/css">
        <link rel="stylesheet" href="/totsys/common/css/basic.css" type="text/css">
        <script>
            var delstate = false;
            var userGroup = false; // 사용자정의 그룹인지 여부지정 변수

            var selid = ''; // 지금 선택한 부서
            var seltype = '';
            var selname = '';
            var idList = ''; // 선택되어진 부서 리스트
            var typeList = '';
            var nameList = '';
            var validList = '';
            var convertValidList = '';

            // 부서 추가
            function setDepts() {
                document.list.idList.value = idList = "<%=deptIDs%>";
                document.list.typeList.value = typeList = "<%=deptTypes%>";
                document.list.nameList.value = nameList = "<%=deptNames%>";

                idList = idList + "";
                typeList = typeList + "";
                nameList = nameList + "";

                document.list.validList.value = "<%=validTypes%>";

                if (idList != "")
                    document.list.submit();

                /* @@@ test
                 document.getElementById('search').value = "강원도교육청";
                */
            }

            //추가버튼
            function getDeptId() {
                var $ff = $("#leftFrame");
                $ff[0].contentWindow.$("#checkbtn").click();
            }

            function putSelId(id)  {
                selid = id;
                deptConfirm2();
            }

            function putSelId2(sId, sDeptName, sOrganDeptName, sUpperDeptName) {
                //alert("id = " + sId + ", deptName = " + sDeptName + ", OrganDeptName = " + sOrganDeptName + ", UpperDeptName = " + sUpperDeptName)

                selid = sId;
                //selname = sOrganDeptName;
                //if(!sOrganDeptName.equals(sUpperDeptName)) {
                //    selname = selname + "-" + sUpperDeptName;
                //}
                //selname = selname + "-" + sDeptName;
                selname = sOrganDeptName + "|" + sUpperDeptName + "|" + sDeptName;
                deptConfirm2();
            }


            // 부서 추가
            function deptConfirm() {
                if (selid == '')
                    alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>');
                else if (seltype == "group")
                    modSelect();
                else {
                    id = selid;
                    name = selname;
                    type = seltype;

                    if (idList == '') {
                        document.list.idList.value = idList = id;
                        document.list.nameList.value = nameList = name;
                        document.list.typeList.value = typeList = type;

                        idList = idList + "";
                        nameList = nameList + "";
                        typeList = typeList + "";

                        document.list.validList.value = validList = "<%="1"%>@@@@" + id + "";
                    } else {
                        var isAdd = listAdd(idList, id, typeList, type);
                        document.list.idList.value = idList;
                        document.list.typeList.value = typeList;
                        if (isAdd) {
                            listAddn(nameList, name);
                        }
                        document.list.nameList.value = nameList;
                        convertValidList = idList.split(",");
                        document.list.validList.value = document.list.validList.value + ",<%="1"%>@@@@" + convertValidList[convertValidList.length - 1];
                    }
                    document.list.submit();
                }
            }

            function deptConfirm2(id) {
                if (selid == '')
                    alert("<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>");
                else if (seltype == "group")
                    modSelect();
                else  {
                    var id = selid;
                    var type = 'dept';
                    var name = selname;
                    //type=seltype;

                    if (idList == '') {
                        document.list.idList.value = idList = id;
                        document.list.typeList.value = typeList = type;
                        document.list.nameList.value = nameList = name;

                        idList = idList + "";
                        typeList = typeList + "";
                        nameList = nameList + "";

                        document.list.validList.value = validList = "<%="1"%>@@@@" + id + "";
                    } else  {
                        var isAdd = listAdd(idList, id, typeList, type);
                        document.list.idList.value = idList;
                        document.list.typeList.value = typeList;
                        if (isAdd) {
                            listAddn(nameList, name);
                        }
                        document.list.nameList.value = nameList;
                        document.list.validList.value = document.list.validList.value + ",<%="1"%>@@@@" + convertValidList[convertValidList.length - 1];
                    }
                    //document.list.submit();
                }
            }

            function openerdeptConfirm() { //구성원으로 추가
                var gid = document.list.openeridList.value;
                var gname = document.list.openernameList.value;
                var gtype = document.list.openertypeList.value;
                var arrayID = gid.split(",");
                var arrayName = gname.split(",");
                var arrayType = gtype.split(",");
                var isChange = false;

                for (var i = 0; i < arrayID.length; i++) {
                    selid = arrayID[i];
                    selname = arrayName[i];
                    seltype = arrayType[i];

                    if (selid == '') {
                        alert("<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptConfirm")%>");
                    } else {
                        id = selid;
                        name = selname;
                        type = seltype;
                        if (idList == '') {
                            document.list.idList.value = idList = id;
                            document.list.typeList.value = typeList = type;
                            idList = idList + "";
                            typeList = typeList + "";
                        } else {
                            var isAdd = listAdd(idList, id, typeList, type);
                            document.list.idList.value = idList;
                            document.list.typeList.value = typeList;
                        }
                        isChange = true;
                    }
                }

                if (isChange) {
                    var str = document.list.idList.value.split(",");
                    var strtmp = new Array();

                    for (var jj = 0; jj < str.length; jj++) {
                        strtmp[jj] = "1@@@@" + str[jj];
                    }

                    document.list.validList.value = strtmp.join(',');
                    document.list.submit();
                }
            }

            function modSelect() {
                var height = screen.height;
                var width = screen.width;
                var leftpos = width / 2 - 235;
                var toppos = height / 2 - 235;

                if (seltype != "group") {
                    alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.groupSelect")%>');  //그룹을 선택해주세요
                    return;
                }

                var urlname = "/totsys/common/web/report_dept/modifier.jsp?groupID=" + selid;
                post2 = window.open(urlname, "post2", "width=450, height=465, toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,left=" + leftpos + ",top=" + toppos);
                post2.focus();
            }


            function listAdd(idList1, idList2, tList, tItem) {
                var arrayID1 = idList1.split(",");
                var arrayType = tList.split(",");

                var isEquals = true;

                if (idList1 == '') {
                    idList = idList1;
                    typeList = tList;
                    return false;
                }
                for (var i = 0; i < arrayID1.length; i++) {
                    if (idList2 == arrayID1[i] && tItem == arrayType[i]) {
                        isEquals = false;
                        break;
                    }
                }
                if (isEquals) {
                    idList1 += "," + idList2;
                    tList += "," + tItem;
                }
                idList = idList1;
                typeList = tList;
                return isEquals;
            }

            function listAddn(nameList1, nameList2) {
                var arrayName1 = nameList1.split(",");

                if (nameList1 == '') {
                    nameList = nameList1;
                    return;
                }

                nameList1 += "," + nameList2;
                nameList = nameList1;

                return;
            }

            // 부서삭제
            function deptDelete() {
                if (idList != '') {
                    deptFrame.movelist();
                    document.list.submit();
                }
            }

            function leftFrameDel(name, id, type) {
                name = lastStrDel(name, ",");
                id = lastStrDel(id, ",");
                type = lastStrDel(type, ",");
                if (nameList == '' && idList == '') {
                    document.list.idList.value = idList = id;
                    document.list.typeList.value = typeList = type;
                    document.list.nameList.value = nameList = name;
                } else {
                    delList(id, type, name);
                    document.list.idList.value = idList;
                    document.list.typeList.value = typeList;
                    document.list.nameList.value = nameList;
                }

                document.list.submit();
                return;
            }

            function leftFrameDel(name, id, type, valid) {
                name = lastStrDel(name, ",");
                id = lastStrDel(id, ",");
                type = lastStrDel(type, ",");
                valid = lastStrDel(valid, ",");

                if (nameList == '' && idList == '') {
                    document.list.idList.value = idList = id;
                    document.list.typeList.value = typeList = type;
                    document.list.nameList.value = nameList = name;
                    document.list.validList.value = validList = valid;
                } else {
                    delList(id, type, name, valid);
                    document.list.idList.value = idList;
                    document.list.typeList.value = typeList;
                    document.list.nameList.value = nameList;
                    document.list.validList.value = validList = valid;
                }

                document.list.submit();
                return;
            }

            function lastStrDel(str, delStr) {
                var lastStr = str.lastIndexOf(delStr);
                return str.substring(0, lastStr);
            }

            function delList(idList1, tyList1, naList1) {
                idList = idList1;
                typeList = tyList1;
                nameList = naList1;
                return;
            }
            function delList(idList1, tyList1, naList1, valList1) {
                idList = idList1;
                typeList = tyList1;
                nameList = naList1;
                validList = valList1;
                return;
            }

            // 부서 선택 시 유저 뽑아내기.
            function userList(id, name, type) {
                if (type != '') {
                    idAll = id;
                    selid = id;
                    selname = name;
                } else {
                    idAll = '';
                    selid = '';
                    selname = '';
                }
                seltype = type;
                idUpper = false;
                userGroup = false;
                /*
                 document.userlist.id.value = id;
                 document.userlist.target="rightFrame";
                 document.userlist.selectType.value="right";
                 document.userlist.didList.value = idList;

                 document.userlist.submit();
                 */
            }

            function groupList(id, name, type) {
                idAll = id;
                selid = id;
                selname = name;
                seltype = type;
                idUpper = false;
                userGroup = false;
                /*
                 document.userlist.id.value = id;
                 document.userlist.target="rightFrame";
                 document.userlist.selectType.value="right";
                 document.userlist.didList.value = idList;

                 document.userlist.submit();
                 */
            }

            //검색 버튼
            function searchWord() {
                var word = $('#search').val();
                word = $.trim(word);
                $('#search').val(word);
                if (word.length < 2) {
                    alert("검색어는 2글자 이상이어야 합니다.");
                    return;
                }
                var $ff = $("#leftFrame");
                $ff[0].contentWindow.$("#searchWord").text(word);
                $ff[0].contentWindow.$("#search").click();
            }

            //조직도에서 검색된 노드로 포커스를 이동시킨다.  strType : down, up
            function focusMove(strType) {
                //alert("strType = " + strType);
                var $ff = $("#leftFrame");
                $ff[0].contentWindow.$("#moveType").text(strType);      //포커스이동타입
                $ff[0].contentWindow.$("#focusMove").click();
            }
            var lv_processing = false;
            //확인 버튼
            function deptComp() {
                var sGroupName = $('#groupName').val();
                sGroupName = $.trim(sGroupName);
                $('#groupName').val(sGroupName);

                if (document.group.groupName.value == null || document.group.groupName.value == "") {
                    alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.groupName")%>');     //설정할 그룹명을 입력 해 주세요.
                    document.group.groupName.focus();
                    return;
                }
                if (document.list.idList.value == "") {
                    alert('<%=Moumi.getMessageBundle().getString("moumi.message.popup.deptComp")%>');     //제출요청 부서를 추가 해 주세요
                    return;
                } else {
                    if( lv_processing == true ) {
                    return false;
                    }
                    var deptTemp = document.list.idList.value.split(",");
                    var deptCounter = deptTemp.length;
                    $.customIndicator.show(window.self);
                    if(deptCounter >= 2500){
                    	alert("*주의사항*\n사용자그룹에 포함된 기관이 2,500개이상 입니다 \n제출기관 변경 기능을 지원하지 않습니다 \n\n사용자그룹을 신규로 생성하여야 합니다..");
                    	//if(!confirm("*주의사항*\n제출기관이 1000개이상 입니다 \n수신기관 변경시 오류가 발생하는 경우 반복해서 실행하시면 안됩니다 \n반드시 관리자에게 문의바랍니다.")){
                    	$.customIndicator.hide(window.self);  /* indicator 추가 */
							return;
                    	//}
                    }
                    lv_processing = true;
                    document.group.deptIDs.value = document.list.idList.value;
                    document.group.deptNames.value = document.list.nameList.value;
                    document.group.deptTypes.value = document.list.typeList.value;
                    document.group.valid.value = document.list.validList.value;

                    //var deptTemp = document.list.idList.value.split(",");
                    //var deptCounter = deptTemp.length;

                    document.group.submit();
                    //window.close();
                }
            }

            //취소 버튼
            function deptCancel() {
                window.close();
            }

        </script>
    </head>

    <body onload="setDepts();">
        <form name="list" method="post" action="/servlet/kr.co.kihyun.beans.user.HttpDeptList" target="deptFrame">
            <input type="hidden" name="idList">
            <input type="hidden" name="nameList">
            <input type="hidden" name="typeList">
            <input type="hidden" name="validList">
            <input type="hidden" name="openeridList">
            <input type="hidden" name="openernameList">
            <input type="hidden" name="openertypeList">
        </form>
        <!--
        <form name="glist" method="post" action="/servlet/kr.co.kihyun.beans.user.HttpGroupList" target="deptFrame">
                <input type="hidden" name="nameList">
                <input type="hidden" name="idList">
        </form>
        -->

		<!--타이틀 //-->
        <div class="title">
        	<div><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.user")%><%=Moumi.getMessageBundle().getString("moumi.message.menu.groupSetting")%></div>
        </div>
        <!--타이틀 //-->
        
        <!-- //본문 -->
		<div class="disFlex lv1">
        	<div class="deptListSide">
         	<img alt="말머리" src="/totsys/common/images/ico_3.gif">
         	<b><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.deptMap")%></b>
        	</div>
        	<div class="deptListCenter"></div>
        	<div class="deptListSide"><img alt="말머리" src="/totsys/common/images/ico_3.gif"><b>제출기관(부서)<!--%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.submitDept")%--></b></div>
        </div>
        
        <div class="disFlex ml_5">
           	<!-- 분류 선택 아이프레임 -->
           	<iframe src="iframe/new_section_list.html" width="300px;" height="21px;"></iframe>
           </div>
           <div class="disFlex">
           	<div class="deptListSide">
           		<!-- 부서 선택 아이프레임 -->
           		<iframe style="height: 380px;" id="leftFrame" name="leftFrame" src="./iframe/groupCommon.jsp"></iframe>
           	</div>
           	<div class="deptListCenter center deptPt">
                   <div>

			<!--추가,삭제 -->
                   	<a href="javascript:getDeptId();"><img alt="추가" src="./images/new_dept_add.gif"/></a>
                   </div>
                   <div class="mt_5">
                	<!--삭제-->
                    <a href="javascript:deptDelete();"><img alt="삭제" src="./images/new_dept_del.gif"/></a>
                   </div>
           	</div>
           	<div class="deptListSide">
           		<!-- 선택된 부서 리스트 아이프레임 -->
           		<iframe style="height: 380px;" name="deptFrame" src="./iframe/selected_list.jsp"></iframe>
           	</div>
           </div>
		<form name="group" method="post" action="/servlet/kr.co.kihyun.beans.user.HttpUserGroupModify">
            <input type="hidden" name="deptIDs">
            <input type="hidden" name="deptNames">
            <input type="hidden" name="userIDs">
            <input type="hidden" name="userNames">
            <input type="hidden" name="deptTypes">
            <input type="hidden" name="userID" value="<%=usID%>">
            <input type="hidden" name="partID" value="<%=groupID%>">
            <input type="hidden" name="valid">
            <input type="hidden" name="callbackFunc" value="opener.fn_reload()">
<!--        </form> 아래에 있슴 -->
			<table>
            <tr style="padding-top: 20px;">
                <td colspan="3">
                    
                        <table>
                            <tr>
                                <td style="width: 14px;"><img src="./images/ico_1.gif"></td>
                                <td class="kecttep_title" style="padding-left: 5px; text-align: left; width: 500px;">
                                    <%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.group")%><%=Moumi.getMessageBundle().getString("moumi.message.tot_doc.name")%> :
                                    <input name="groupName" type="text" value="<%=groupName%>" size="30"  maxlength="20" class="inputtxt" style="ime-mode: active;" />
                                </td>
                                <td style="width: 14px; padding-left: 13px;">&nbsp;</td>
                                <td class="kecttep_title" style="padding-left: 5px; text-align: left;">&nbsp;</td>
                            </tr>
                            <tr>
                                <td style="height: 3px;"></td>
                            </tr>                            
                        </table>

                </td>
            </tr>
        </table>
        <table>
            <tr>
                <td> 검 색 &nbsp;&nbsp;</td>
                <td><input id="search" name="search" type="text" class="inputtxt" value="" size="35" onkeyDown="if(event.keyCode === 13) { searchWord(); }" style="ime-mode:active;">&nbsp;</td>
                <td><a href="#" onclick="searchWord();"><img alt="찾기" src="/totsys/common/images/bt_search_inquiry2.gif"></a>&nbsp;</td>
                <td><a href="#" onclick="focusMove('down');"><img alt="다음" src="/totsys/common/images/bt_down.jpg"></a>&nbsp;</td>
                <td><a href="#" onclick="focusMove('up');"><img alt="이전" src="/totsys/common/images/bt_up.jpg"></a></td>
                <td></td>
            </tr>
        </table>
	  </form>

        <!-- 확인, 취소 버튼 -->
        <div class="center mt_10" style="border-top: 1px solid #8ea6d6">
        	<div class="mt_10">
	         	<a href="#" onclick="deptComp()"><img alt="확인" src="/totsys/common/images/bt_ok.gif"></a>
	         	<a href="#" onClick="deptCancel()"><img alt="취소" src="/totsys/common/images/bt_cancle.gif"></a>
        	</div>
		</div>
        <!-- //본문 -->
    </body>
</body>
