const _menuHandleMap = new Map();
let _menuData        = [];
let _dxMenu          = null;
const _menuDataAll = [
    {
        id: 1,
        name: "교통상황관리",
        icon: "/images/op/menu/010000.png",
        items: [
            {
                id: "0",
                name: "통합모니터링",
                icon: "/images/op/menu/010100.png",
                always: true,
            },
            {
                beginGroup: true,
                id: "1",
                name: "현재소통정보조회",
                page: "/application/op/01.traffic-manager/01.traffic-current/current-traffic.html",
                option: "width = 1700, height = 950, top = 40, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/010200.png",
            },
            {
                id: "2",
                name: "소통정보제보 관리",
                page: "/application/op/01.traffic-manager/02.syop-traf/syop-traf.html",
                option: "width = 1400, height = 800, top = 140, left = 300, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/010300.png",
            },
            {
                beginGroup: true,
                id: "3",
                name: "돌발상황정보 관리",
                page: "/application/op/01.traffic-manager/03.incident/incident.html",
                option: "width = 1700, height = 950, top = 15, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/010400.png",
            },
            {
                beginGroup: true,
                id: "4",
                name: "반복정체구간 관리",
                page: "/application/op/01.traffic-manager/04.rept-cngs/rept-cngs.html",
                option: "width = 1400, height = 850, top = 65, left = 250, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/010500.png",
            },
        ],
    },
    {
        id: 2,
        name: "이력조회",
        icon: "/images/op/menu/030000.png",
        items: [
            {
                id: "1",
                name: "운영자접속 이력",
                page: "/application/op/02.history/01.user-cnns-hs/user-cnns-hs.html",
                option: "width = 540, height = 790, top = 100, left = 600, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/030100.png",
            },
            {
                id: "2",
                name: "프로세스상태 이력",
                page: "/application/op/02.history/02.unit-syst-stts-hs/unit-syst-stts-hs.html",
                option: "width = 1100, height = 850, top = 75, left = 350, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/030200.png",
            },
            {
                beginGroup: true,
                id: "3",
                name: "수집데이터 이력",
                page: "/application/op/02.history/03.clct-hs/clct-hs.html",
                option: "width = 1500, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/030300.png",
            },
            {
                id: "4",
                name: "가공데이터 이력",
                page: "/application/op/02.history/04.traf-hs/traf-hs.html",
                option: "width = 1500, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/030400.png",
            },
            {
                id: "5",
                name: "수집데이터 분석",
                page: "/application/op/02.history/05.clct-analysis/clct-analysis.html",
                option: "width = 1500, height = 850, top = 75, left = 210, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/030500.png",
            },
        ],
    },
    {
        id: 3,
        name: "통계-분석",
        icon: "/images/op/menu/040000.png",
        items: [
            {
                id: "1",
                name: "통계",
                icon: "/images/op/menu/040100.png",
                items: [
                    {
                        id: "1",
                        name: "소통정보 통계",
                        page: "/application/op/03-1.statistics/01.traffic/traffic.html",
                        option: "width = 1400, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040100.png",
                    },
                    {
                        id: "2",
                        name: "간선도로 소통정보 통계",
                        page: "/application/op/03-1.statistics/02.atrd-traffic/atrd-traffic.html",
                        option: "width = 1400, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040200.png",
                    },
                    {
                        id: "3",
                        name: "간선도로 통계",
                        page: "/application/op/03-1.statistics/03.atrd/atrd.html",
                        option: "width = 1400, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040300.png",
                    },
                    {
                        id: "4",
                        name: "돌발상황 통계",
                        page: "/application/op/03-1.statistics/04.incident/incident.html",
                        option: "width = 1400, height = 850, top = 75, left = 300, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040400.png",
                    },
                    {
                        id: "5",
                        name: "시설물통신단절 통계",
                        page: "/application/op/03-1.statistics/05.fclt-stts/fclt-stts.html",
                        option: "width = 1200, height = 850, top = 75, left = 350, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040500.png",
                    },
                    {
                        id: "6",
                        name: "프로세스상태 통계",
                        page: "/application/op/03-1.statistics/06.unit-syst-stts/unit-syst-stts.html",
                        option: "width = 1200, height = 850, top = 75, left = 350, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040600.png",
                    },
                ],
            },
            {
                id: "2",
                name: "분석",
                icon: "/images/op/menu/040700.png",
                items: [
                    {
                        id: "7",
                        name: "교통정보수집결과 분석",
                        page: "/application/op/03-2.analysis/01.clct-result/clct-result.html",
                        option: "width = 1450, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040700.png",
                    },
                    {
                        id: "8",
                        name: "교통정보가공결과 분석",
                        page: "/application/op/03-2.analysis/02.prcn-result/prcn-result.html",
                        option: "width = 1450, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040800.png",
                    },
                    {
                        id: "9",
                        name: "교통정보 제공결과 분석",
                        page: "/application/op/03-2.analysis/03.offr-result/offr-result.html",
                        option: "width = 1450, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040900.png",
                    },
                    {
                        id: "10",
                        name: "소통정보이력 분석",
                        page: "/application/op/03-2.analysis/04.traf-hs/traf-hs.html",
                        option: "width = 1450, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/041000.png",
                    },
                    {
                        id: "11",
                        name: "패턴데이터 분석",
                        page: "/application/op/03-2.analysis/05.ptrn-data/ptrn-data.html",
                        option: "width = 1450, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/041100.png",
                    },
                ],
            },
            {
                beginGroup: true,
                id: "3",
                name: "보고서",
                page: "/application/op/03-3.report/report.html",
                option: "width = 1450, height = 850, top = 75, left = 250, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/041200.png",
            },
        ],
    },
    {
        id: 4,
        name: "CCTV",
        icon: "/images/op/menu/050000.png",
        items: [
            {
                id: "1",
                name: "CCTV 기본정보 관리",
                page: "/application/op/04.cctv/01.manager/manager.html",
                option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/050100.png",
            },
            {
                beginGroup: true,
                id: "2",
                name: "CCTV 상태이력",
                page: "/application/op/04.cctv/02.history/history.html",
                option: "width = 1550, height = 850, top = 75, left = 200, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/050200.png",
            },
            {
                beginGroup: true,
                id: "3",
                name: "CCTV 상태 모니터링",
                page: "/application/op/04.cctv/03.monitoring-stts/stts.html",
                option: "width = 1700, height = 850, top = 75, left = 125, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/050300.png",
            },
            {
                id: "4",
                name: "CCTV 영상 모니터링",
                page: "/application/op/04.cctv/04.monitoring-camera/monitoring.html",
                option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/050400.png",
            },
            {
                beginGroup: true,
                id: "5",
                name: "CCTV 제어",
                page: "/application/op/04.cctv/05.control/control.html",
                option: "width = 1420, height = 925, top = 37.5, left = 265, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/050500.png",
            },
            {
                beginGroup: true,
                id: "6",
                name: "CCTV 프리셋 제어 스케줄 관리",
                page: "/application/op/04.cctv/06.pset-scnr/pset-scnr.html",
                option: "width = 950, height = 850, top = 75, left = 500, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/050600.png",
                handle: null,
                visible: false,
            },
            {
                beginGroup: true,
                id: "7",
                name: "좌회전감응카메라 영상 모니터링",
                page: "/application/op/04.cctv/07.left-turn-sens-monitoring/monitoring.html",
                option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/050400.png",
                visible: false,
                handle: null,
            },
        ],
    },
    {
        id: 5,
        name: "VMS",
        icon: "/images/op/menu/060000.png",
        items: [
            {
                id: "1",
                name: "시스템",
                icon: "/images/op/menu/060200.png",
                items: [
                    {
                        id: "1",
                        name: "현시 모니터링",
                        page: "/application/op/05.vms/01.system/01.monitoring/01.phase/phase.html",
                        option: "width = 1850, height = 850, top = 75, left = 30, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060200.png",
                    },
                    {
                        id: "2",
                        name: "시나리오 모니터링",
                        page: "/application/op/05.vms/01.system/01.monitoring/02.scenario/scenario.html",
                        option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060300.png",
                    },
                    {
                        id: "3",
                        name: "상태 모니터링",
                        page: "/application/op/05.vms/01.system/01.monitoring/03.stts/stts.html",
                        option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060400.png",
                    },
                    {
                        id: "4",
                        name: "모듈상태 모니터링",
                        page: "/application/op/05.vms/01.system/01.monitoring/04.module/module.html",
                        option: "width = 1850, height = 850, top = 75, left = 30, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060500.png",
                        visible: false,
                    },
                    {
                        id: "5",
                        name: "영상 모니터링",
                        page: "/application/op/05.vms/01.system/01.monitoring/05.camera/camera.html",
                        option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060600.png",
                    },
                    {
                        beginGroup: true,
                        id: "6",
                        name: "VMS 제어",
                        page: "/application/op/05.vms/01.system/02.control/control.html",
                        option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060700.png",
                    },
                ],
            },
            {
                id: "2",
                name: "정보관리",
                icon: "/images/op/menu/060100.png",
                items: [
                    {
                        id: "1",
                        name: "VMS 기본정보 관리",
                        page: "/application/op/05.vms/02.manager/01.info/info.html",
                        option: "width = 1500, height = 900, top = 50, left = 200, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060100.png",
                    },
                    {
                        beginGroup: true,
                        id: "2",
                        name: "정보제공구간 관리",
                        page: "/application/op/05.vms/02.manager/02.vms-ifsc/01.vms-ifsc/vms-ifsc.html",
                        option: "width = 1500, height = 800, top = 100, left = 200, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060800.png",
                    },
                    {
                        id: "3",
                        name: "정보제공구간 설정",
                        page: "/application/op/05.vms/02.manager/02.vms-ifsc/02.vms-ifsc-rltn/vms-ifsc-rltn.html",
                        option: "width = 1500, height = 800, top = 100, left = 200, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/060900.png",
                    },
                    {
                        beginGroup: true,
                        id: "4",
                        name: "심볼 이미지 관리",
                        page: "/application/op/05.vms/02.manager/03.symbl-vmp/01.symbl-vmp0/symbl-vmp0.html",
                        option: "width = 1200, height = 800, top = 100, left = 350, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061000.png",
                    },
                    {
                        id: "5",
                        name: "소통정보 이미지 관리",
                        page: "/application/op/05.vms/02.manager/03.symbl-vmp/03.symbl-vmp2/symbl-vmp2.html",
                        option: "width = 1200, height = 800, top = 100, left = 350, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061100.png",
                        visible: false,
                    },
                    {
                        id: "6",
                        name: "소통정보 배경 이미지 관리",
                        page: "/application/op/05.vms/02.manager/03.symbl-vmp/02.symbl-vmp1/symbl-vmp1.html",
                        option: "width = 1400, height = 800, top = 100, left = 250, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061200.png",
                    },
                ],
            },
            {
                id: "3",
                name: "폼관리",
                icon: "/images/op/menu/061300.png",
                items: [
                    {
                        id: "1",
                        name: "문자식/도형식 폼관리",
                        page: "/application/op/05.vms/03.form/manage.html",
                        option: "width = 1600, height = 900, top = 50, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061300.png",
                    },
                ],
            },
            {
                id: "4",
                name: "스케줄관리",
                icon: "/images/op/menu/061400.png",
                items: [
                    {
                        id: "1",
                        name: "자동 스케줄 관리",
                        page: "/application/op/05.vms/04.schedule/01.auto/auto.html",
                        option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061400.png",
                    },
                    {
                        id: "2",
                        name: "고정 스케줄 관리",
                        page: "/application/op/05.vms/04.schedule/02.fixed/fixed.html",
                        option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061500.png",
                    },
                    {
                        id: "3",
                        name: "기본 스케줄 관리",
                        page: "/application/op/05.vms/04.schedule/03.default/default.html",
                        option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061600.png",
                        visible: false,
                    },
                    {
                        beginGroup: true,
                        id: "4",
                        name: "휘도설정 스케줄 관리",
                        page: "/application/op/05.vms/04.schedule/04.lum-set-sch/lum-set-sch.html",
                        option: "width = 950, height = 850, top = 75, left = 500, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061700.png",
                        visible: false,
                    },
                ],
            },
            {
                id: "5",
                name: "이력조회",
                icon: "/images/op/menu/061800.png",
                items: [
                    {
                        id: "1",
                        name: "VMS 상태이력",
                        page: "/application/op/05.vms/05.history/01.stts/stts.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061800.png",
                    },
                    {
                        id: "2",
                        name: "VMS 제공이력",
                        page: "/application/op/05.vms/05.history/02.dspl/dspl.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061900.png",
                    },
                    {
                        id: "3",
                        name: "VMS 제어이력",
                        page: "/application/op/05.vms/05.history/03.ctrl/ctrl.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/062000.png",
                    },
                ],
            },
        ],
    },

    {
        id: 6,
        name: "VDS",
        icon: "/images/op/menu/070100.png",
        items: [
            {
                id: "1",
                name: "VDS-제어기 관리",
                page: "/application/op/06.vds/01.manager-info/info.html",
                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/070100.png",
            },
            {
                id: "2",
                name: "VDS-검지기 관리",
                page: "/application/op/06.vds/02.manager-dtct/dtct.html",
                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/070200.png",
            },
            {
                beginGroup: true,
                id: "3",
                name: "VDS 상태 모니터링",
                page: "/application/op/06.vds/03.stts/stts.html",
                option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/070400.png",
            },
            {
                id: "4",
                name: "VDS 제어",
                page: "/application/op/06.vds/04.control/control.html",
                option: "width = 1200, height = 850, top = 75, left = 375, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/070300.png",
            },
            {
                beginGroup: true,
                id: "5",
                name: "VDS-제이기 상태 이력",
                page: "/application/op/06.vds/05.history-stts/stts.html",
                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/070400.png",
            },
            {
                id: "6",
                name: "VDS-검지기 원시수집 이력",
                page: "/application/op/06.vds/06.history-dtct-clct-hs/dtct-clct-hs.html",
                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/070500.png",
            },
            {
                id: "7",
                name: "VDS-검지기 소통정보 통계",
                page: "/application/op/06.vds/07.statistics-dtct-traf/dtct-traf.html",
                option: "width = 1500, height = 850, top = 75, left = 200, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/070600.png",
            },
            {
                beginGroup: true,
                id: "8",
                name: "VDS-검지기 교통량 통계",
                page: "/application/op/06.vds/08.statistics-dtct-tfvl/dtct-tfvl.html",
                option: "width = 1600, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/070700.png",
            },
        ],
    },
    {
        id: 7,
        name: "DSRC",
        icon: "/images/op/menu/070000.png",
        items: [
            {
                id    : '1',
                name  : 'DSRC 관리',
                icon  : "/images/op/menu/z1.png",
                items : [
                    {
                        id: "1",
                        name: "DSRC 제어기 관리",
                        page: "/application/op/07.dsrc/01.info/info.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z1.png",
                    },
                    {
                        id: "2",
                        name: "DSRC 수집구간 관리",
                        page: "/application/op/07.dsrc/02.manager-dtct/dtct.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/070000.png",
                    },
                    {
                        beginGroup: true,
                        id: "3",
                        name: "DSRC 상태 모니터링",
                        page: "/application/op/07.dsrc/03.stts/stts.html",
                        option: "width = 1550, height = 700, top = 150, left = 200, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/041100.png",
                    },
                    {
                        id: "4",
                        name: "DSRC 제어",
                        page: "/application/op/07.dsrc/04.control/control.html",
                        option: "width = 1200, height = 850, top = 75, left = 375, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z8.png",
                    },
                ]
            },
            {
                id    : '2',
                name  : 'DSRC 이력조회',
                icon  : "/images/op/menu/030000.png",
                items : [
                    {
                        id: "1",
                        name: "DSRC 상태 이력",
                        page: "/application/op/07.dsrc/05.history-stts/stts.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/030000.png",
                    },
                    {
                        id: "2",
                        name: "DSRC 로그 이력",
                        page: "/application/op/07.dsrc/06.log-hs/log-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z4.png",
                    },
                    {
                        id: "3",
                        name: "DSRC 제어 이력",
                        page: "/application/op/07.dsrc/07.ctlr-hs/ctlr-hs.html",
                        option: "width = 1500, height = 850, top = 75, left = 200, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z8.png",
                        visible : false,
                    },
                    {
                        id: "4",
                        name: "DSRC 가공정보 이력",
                        page: "/application/op/07.dsrc/08.prcn-hs/prcn-hs.html",
                        option: "width = 1600, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z7.png",
                    },
                    {
                        id: "5",
                        name: "DSRC OBU 수집 이력",
                        page: "/application/op/07.dsrc/09.obu-clct-hs/obu-clct-hs.html",
                        option: "width = 1600, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/030400.png",
                    },
                    {
                        id: "6",
                        name: "DSRC OBU 통계 이력",
                        page: "/application/op/07.dsrc/10.obu-statistics/obu-statistics.html",
                        option: "width = 1600, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/030500.png",
                    },
                ]
            },
            {
                id    : '3',
                name  : 'DSRC 통계조회',
                icon  : "/images/op/menu/040100.png",
                items : [
                    {
                        id: "1",
                        name: "DSRC OD 교통량 통계",
                        page: "/application/op/07.dsrc/11.od-stat/od-stat.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/040100.png",
                    },
                  
                ]
            },
        ],
    },
    {
        id: 8,
        name: "스마트 교차로",
        icon: "/images/op/menu/z14.png",
        items: [
            {
                beginGroup : true,
                id    : '1',
                name  : '시스템',
                icon  : "/images/op/menu/020400.png",
                visible : false,
                items : [
                    {
                        id: "1",
                        name: "교차로 모니터링",
                        page: "/application/op/08.cros/01.system/01.clct-monitoring/clct-monitoring.html",
                        option: "width = 1550, height = 700, top = 150, left = 200, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061800.png",
                    },
                    {
                        id: "2",
                        name: "카메라상태 모니터링",
                        page: "/application/op/08.cros/01.system/02.camera-stts-monitoring/camera-stts-monitoring.html",
                        option: "width = 1050, height = 700, top = 150, left = 450, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061800.png",
                    },
                    {
                        id: "3",
                        name: "교통량 모니터링",
                        page: "/application/op/08.cros/01.system/03.traffic-monitoring/traffic-monitoring.html",
                        option: "width = 1550, height = 800, top = 100, left = 200, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061800.png",
                    },
                    {
                        id: "4",
                        name: "영상 모니터링",
                        page: "/application/op/08.cros/01.system/04.camera-monitoring/camera-monitoring.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/061800.png",
                    },
                ]
            },
            {
                beginGroup : true,
                id    : '2',
                name  : '정보관리',
                icon  : "/images/op/menu/z14.png",
                items : [
                    {
                        id: "1",
                        name: "교차로 기본정보 관리",
                        page: "/application/op/08.cros/02.manager/01.intersection/intersection.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z14.png",
                    },
                    {
                        id: "2",
                        name: "카메라 기본정보 관리",
                        page: "/application/op/08.cros/02.manager/02.camera/camera.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z15.png",
                    },
                    {
                        id: "1",
                        name : "기하구조정보 관리",
                        page: "/application/op/08.cros/02.manager/03.geometry/geometry.html",
                        option: "width = 1750, height = 850, top = 75, left = 100, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z15.png",
                    },
                ]
            },
            {
                beginGroup : true,
                id    : '3',
                name  : '교통량 통계',
                icon  : "/images/op/menu/010200.png",
                page: "/application/op/08.cros/03.statistics/03.traf-hs/traf-hs.html",
                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                // items : [
                //     {
                //         id: "1",
                //         name: "교차로교통량 통계 이력",
                //         page: "/application/op/08.cros/03.statistics/01.statistics-hs/statistics-hs.html",
                //         option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                //         icon: "/images/op/menu/010200.png",
                //         visible : false,
                //     },
                //     {
                //         id: "2",
                //         name: "방향별 통계",
                //         page: "/application/op/08.cros/03.statistics/02.drct-statistics/drct-statistics.html",
                //         option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                //         icon: "/images/op/menu/z43.png",
                //         visible : false,
                //     },
                //     {
                //         id: "3",
                //         name: "교통량 통계",
                //         page: "/application/op/08.cros/03.statistics/03.traf-hs/traf-hs.html",
                //         option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                //         icon: "/images/op/menu/z43.png",
                //         visible : false,
                //     },
                // ]
            },
            {
                beginGroup : true,
                id    : '4',
                name  : '분석',
                icon  : "/images/op/menu/020400.png",
                visible : false,
                items : [
                    {
                        id: "1",
                        name: "방향별 교통량 분석",
                        page: "/application/op/08.cros/02.statistics/01.statistics-hs/statistics-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/010200.png",
                    },
                    {
                        id: "2",
                        name: "OD분석",
                        page: "/application/op/08.cros/02.statistics/02.drct-statistics/drct-statistics.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z43.png",
                    },
                ]
            },
            {
                beginGroup : true,
                id    : '5',
                name  : '교통정보이력조회(포화도)',
                page: "/application/op/08.cros/05.saturation/saturation.html",
                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/010200.png",
            },
            {
                beginGroup : true,
                id    : '6',
                name  : '신호 정보 연계',
                icon: "/images/op/menu/010200.png",
                items : [
                    {
                        id: "1",
                        name : "신호 교차로 정보",
                        page: "/application/op/08.cros/06.signal/01.info/info.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z15.png",
                    },
                    {
                        id: "2",
                        name : "신호 교차로 그룹정보",
                        page: "/application/op/08.cros/06.signal/02.group/group.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z15.png",
                    },
                    {
                        id: "3",
                        name : "신호 운영 이력 정보",
                        page: "/application/op/08.cros/06.signal/03.oper-hs/oper-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z15.png",
                    }
                ],
            },
            {
                beginGroup : true,
                id    : '7',
                name  : '패턴 정보',
                page: "/application/op/08.cros/07.ptrn-hs/ptrn-hs.html",
                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/010200.png",
            },
            {
                beginGroup : true,
                id    : '8',
                name  : '카메라원시수집이력조회',
                page: "/application/op/08.cros/08.cros-clct-hs/cros-clct-hs.html",
                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/010200.png",
            },
        ],
    },
    {
        id: 9,
        name: "시설물통합관리",
        icon: "/images/op/menu/020000.png",
        items: [
            {
                id: "1",
                name: "시설물 정보 관리",
                icon: "/images/op/menu/020100.png",
                items:[
                    {
                        id: "1",
                        name: "ITS 시설물",
                        page: "/application/op/09.facility/01.info/01.its/info.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/020100.png",
                    },
                    {
                        id: "2",
                        name: "스마트 교차로",
                        page: "/application/op/09.facility/01.info/02.smart/info.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z14.png",
                    },
                    {
                        id: "3",
                        name: "센터 장비",
                        page: "/application/op/09.facility/01.info/03.center/info.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/081000.png",
                    },
                    {
                        id: "4",
                        name: "신호 시설물",
                        page: "/application/op/09.facility/01.info/04.sign/info.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z31.png",
                    },
               ]
            },
            {
                id: "2",
                name: "시설물업체 관리",
                icon: "/images/op/menu/020200.png",
                page: "/application/op/09.facility/02.company/company.html",
                option: "width = 1500, height = 700, top = 150, left = 200, resizable=yes, scrollbars=no",
            },
            {
                id: "3",
                name: "시설물 정보 구성 관리",
                icon: "/images/op/menu/020100.png",
                items:[
                    {
                        id: "1",
                        name: "ITS 시설물 정보 구성",
                        page: "/application/op/09.facility/03.fclt-subj/01.its/subj.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/020100.png",
                    },
                    {
                        id: "2",
                        name: "스마트 교차로 정보 구성",
                        page: "/application/op/09.facility/03.fclt-subj/02.smart/subj.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z14.png",
                    },
                    {
                        id: "3",
                        name: "센터 장비 정보 구성",
                        page: "/application/op/09.facility/03.fclt-subj/03.center/subj.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/081000.png",
                    },
                    {
                        id: "4",
                        name: "신호 시설물 정보 구성",
                        page: "/application/op/09.facility/03.fclt-subj/04.sign/subj.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z31.png",
                    },
               ],
            },
            {
                id          : "4",
                name        : "시설물 상태 관리",
                icon        : "/images/op/menu/020300.png",
                items:[
                    {
                        id: "1",
                        name: "장애 등록",
                        page: "/application/op/09.facility/04.fclt-stts/01.fclt-fail/fclt-fail.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/020300.png",
                    },
                    {
                        id: "2",
                        name: "장애 처리 현황 조회",
                        page: "/application/op/09.facility/04.fclt-stts/02.fclt-fail-hs/fclt-fail-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/070400.png",
                    },
                    {
                        id: "3",
                        name: "장애 조치 처리",
                        page: "/application/op/09.facility/04.fclt-stts/03.fclt-fail-act/fclt-fail-act.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/081000.png",
                    },
                    {
                        id: "4",
                        name: "긴급 장애 처리",
                        page: "/application/op/09.facility/04.fclt-stts/04.fclt-incd-fail/fclt-incd-fail.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/050400.png",
                        visible : false,
                    },
                    {
                        id: "5",
                        name: "장애처리 현황 관리",
                        page: "/application/op/09.facility/04.fclt-stts/05.fail-stts-mngr/fail-stts-mngr.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/020200.png",
                        visible : false,
                    },
                    {
                        id: "6",
                        name: "장애처리 실적 관리",
                        page: "/application/op/09.facility/04.fclt-stts/06.fail-pfmc-mngr/fail-pfmc-mngr.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/020200.png",
                        visible : false,
                    },
                    {
                        id: "7",
                        name: "장애처리 종료관리",
                        page: "/application/op/09.facility/04.fclt-stts/07.fail-end-mngr/fail-end-mngr.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/020200.png",
                        visible : false,
                    },
                    {
                        id: "8",
                        name: "시설정보 전파",
                        page: "/application/op/09.facility/04.fclt-stts/08.fclt-send-info/fclt-send-info.html",
                        option: "width = 720, height = 600, top = 200, left = 615, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/081000.png",
                    },
                    {
                        id: "9",
                        name: "시설 상태 알람 설정",
                        page: "/application/op/09.facility/04.fclt-stts/09.fclt-alarm/fclt-alarm.html",
                        option: "width = 1250, height = 850, top = 75, left = 350, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/081000.png",
                    },
               ],
            },
            {
                id          : "5",
                name        : "유지보수인력 관리",
                icon        : "/images/op/menu/081000.png",
                beginGroup  : true,
                items:[
                    {
                        id: "1",
                        name: "기본정보 관리",
                        page: "/application/op/09.facility/05.fclt-mngr/01.info/info.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/081000.png",
                    },
                    {
                        id: "2",
                        name: "시설물별 인력 정의",
                        page: "/application/op/09.facility/05.fclt-mngr/02.manager/manager.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/070400.png",
                    },
                    {
                        id: "3",
                        name: "상태정보 조회",
                        page: "/application/op/09.facility/05.fclt-mngr/03.stts/stts.html",
                        option: "width = 540, height = 790, top = 100, left = 600, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/081000.png",
                    },
                    {
                        id: "4",
                        name: "메시지 이력 조회",
                        page: "/application/op/09.facility/05.fclt-mngr/04.msg-hs/msg-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/050400.png",
                    },
                ]
            },
            {
                id          : "6",
                name        : "부품관리",
                icon        : "/images/op/menu/020300.png",
                items:[
                    {
                        id: "1",
                        name: "시설물 BOM 구성 관리",
                        icon: "/images/op/menu/020300.png",
                        items :[
                            {
                                id: "1",
                                name : "ITS",
                                page: "/application/op/09.facility/06.bom/01.subj-part/01.its/subj-part.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/020100.png",
                            },
                            {
                                id: "2",
                                name : "스마트 교차로",
                                page: "/application/op/09.facility/06.bom/01.subj-part/02.smart/subj-part.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/z14.png",
                            },
                            {
                                id: "3",
                                name : "센터 장비",
                                page: "/application/op/09.facility/06.bom/01.subj-part/03.center/subj-part.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/081000.png",
                                    
                            },
                            {
                                id: "4",
                                name : "신호 시설물",
                                page: "/application/op/09.facility/06.bom/01.subj-part/04.sign/subj-part.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/z31.png",
                            }
                        ]
                    },
                    {
                        id: "2",
                        name: "부품 입고관리",
                        icon: "/images/op/menu/070400.png",
                        items :[
                            {
                                id: "1",
                                name : "ITS",
                                page: "/application/op/09.facility/06.bom/02.subj-part-in/01.its/subj-part-in.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/020100.png",
                            },
                            {
                                id: "2",
                                name : "스마트 교차로",
                                page: "/application/op/09.facility/06.bom/02.subj-part-in/02.smart/subj-part-in.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/z14.png",
                            },
                            {
                                id: "3",
                                name : "센터 장비",
                                page: "/application/op/09.facility/06.bom/02.subj-part-in/03.center/subj-part-in.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/081000.png",
                                    
                            },
                            {
                                id: "4",
                                name : "신호 시설물",
                                page: "/application/op/09.facility/06.bom/02.subj-part-in/04.sign/subj-part-in.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/z31.png",
                            }
                        ]
                    },
                    {
                        id: "3",
                        name: "부품 출고관리",
                        icon: "/images/op/menu/081000.png",
                        items :[
                            {
                                id: "1",
                                name : "ITS",
                                page: "/application/op/09.facility/06.bom/03.subj-part-out/01.its/subj-part-out.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/020100.png",
                            },
                            {
                                id: "2",
                                name : "스마트 교차로",
                                page: "/application/op/09.facility/06.bom/03.subj-part-out/02.smart/subj-part-out.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/z14.png",
                            },
                            {
                                id: "3",
                                name : "센터 장비",
                                page: "/application/op/09.facility/06.bom/03.subj-part-out/03.center/subj-part-out.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/081000.png",
                                    
                            },
                            {
                                id: "4",
                                name : "신호 시설물",
                                page: "/application/op/09.facility/06.bom/03.subj-part-out/04.sign/subj-part-out.html",
                                option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                                icon: "/images/op/menu/z31.png",
                            }
                        ]
                    },
                ]
            },
            {
                id          : "7",
                name        : "시설물 장애 이력관리",
                icon        : "/images/op/menu/020300.png",
                beginGroup  : true,
                items:[
                    {
                        id: "1",
                        name: "ITS 시설물 장애이력",
                        page: "/application/op/09.facility/07.fail-hs/01.its/fail-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/020100.png",
                    },
                    {
                        id: "2",
                        name: "스마트 교차로 시설물 장애 이력",
                        page: "/application/op/09.facility/07.fail-hs/02.smart/fail-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z14.png",
                    },
                    {
                        id: "3",
                        name: "센터 장비 장애 이력",
                        page: "/application/op/09.facility/07.fail-hs/03.center/fail-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/081000.png",
                    },
                    {
                        id: "4",
                        name: "신호 시설물 장애 이력",
                        page: "/application/op/09.facility/07.fail-hs/03.sig/fail-hs.html",
                        option: "width = 1650, height = 850, top = 75, left = 150, resizable=yes, scrollbars=no",
                        icon: "/images/op/menu/z31.png",
                    },
                ]
            },
        ],
    },
    {
        id: 10,
        name: "기초데이터관리",
        icon: "/images/op/menu/080000.png",
        items: [
            {
                beginGroup: true,
                id: "1",
                name: "노드",
                page: "/application/op/10.database/01.node/node.html",
                option: "width = 1700, height = 950, top = 40, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080100.png",
            },
            {
                id: "2",
                name: "링크",
                page: "/application/op/10.database/02.link/link.html",
                option: "width = 1700, height = 950, top = 40, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080200.png",
            },
            {
                id: "3",
                name: "정보제공구간",
                page: "/application/op/10.database/03.ifsc/ifsc.html",
                option: "width = 1700, height = 950, top = 40, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080300.png",
            },
            {
                id: "4",
                name: "도로",
                page: "/application/op/10.database/04.road/road.html",
                option: "width = 1700, height = 950, top = 40, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080400.png",
            },
            {
                id: "5",
                name: "간선도로 관리",
                page: "/application/op/10.database/05.atrd/atrd.html",
                option: "width = 1700, height = 950, top = 40, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080500.png",
            },
            {
                beginGroup: true,
                id: "6",
                name: "가공파라미터 관리",
                page: "/application/op/10.database/06.clct-syst-stup/clct-syst-stup.html",
                option: "width = 1700, height = 950, top = 40, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080600.png",
            },
            {
                id: "7",
                name: "소통등급 관리",
                page: "/application/op/10.database/07.cmtr-grad-clsf/cmtr-grad-clsf.html",
                option: "width = 900, height = 600, top = 180, left = 510, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080700.png",
            },
            {
                id: "8",
                name: "휴일 관리",
                page: "/application/op/10.database/08.legl-hldy-infr/legl-hldy-infr.html",
                option: "width = 540, height = 690, top = 150, left = 690, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080800.png",
            },
            {
                beginGroup: true,
                id: "9",
                name: "운영코드 관리",
                page: "/application/op/10.database/09.clsf-cd/clsf-cd.html",
                option: "width = 1700, height = 900, top = 40, left = 100, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/080900.png",
            },
            {
                id: "10",
                name: "운영자 관리",
                page: "/application/op/10.database/10.user-infr/user-infr.html",
                option: "width = 1500, height = 690, top = 150, left = 200, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/081000.png",
            },
            {
                id: "11",
                name: "프로세스 관리",
                page: "/application/op/10.database/11.unit-syst/unit-syst.html",
                option: "width = 1400, height = 690, top = 150, left = 250, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/081100.png",
            },
            {
                id: "12",
                name: "연계 기관 관리",
                page: "/application/op/10.database/12.cnct-intn/cnct-intn.html",
                option: "width = 1400, height = 690, top = 150, left = 250, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/081200.png",
            },
            {
                beginGroup: true,
                id: "13",
                name: "운영자 그룹 메뉴 관리",
                page: "/application/op/10.database/13.grop-menu-athr/grop-menu-athr.html",
                option: "width = 800, height = 700, top = 150, left = 500, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/081300.png",
            },
            {
                beginGroup: true,
                id: "14",
                name: "홈페이지 운영자 관리",
                page: "/application/op/10.database/14.web-user-infr/web-user-infr.html",
                option: "width = 1300, height = 800, top = 95, left = 300, resizable=yes, scrollbars=no",
                icon: "/images/op/menu/081000.png",
            },
        ],
    }, 
    {
       id     :  "14",
       name   : '테마변경',
       visible: false,
       items: [{
                 id     : '1',
                 name  : 'Blue Dark',
                 theme : 'dx.material.blue.dark.compact.css'
               },
               {
                 id     : '2',
                 name  : 'Blue Light',
                 theme : 'dx.material.blue.light.compact.css'
               },
               {
                 id     : '3',
                 name  : 'Lime Dark',
                 theme : 'dx.material.lime.dark.compact.css'
               },
               {
                 id     : '4',
                 name  : 'Lime Light',
                 theme : 'dx.material.lime.light.compact.css'
               },
               {
                 id     : '5',
                 name  : 'Orange Dark',
                 theme : 'dx.material.orange.dark.compact.css'
               },{
                 id     : '6',
                 name  : 'Orange Light',
                 theme : 'dx.material.orange.light.compact.css'
               },{
                 id     : '7',
                 name  : 'Purple Dark',
                 theme : 'dx.material.purple.dark.compact.css'
               },{
                 id     : '8',
                 name  : 'Purple Light',
                 theme : 'dx.material.purple.light.compact.css'
               },{
                 id    : '9',
                 name  : 'Teal Dark',
                 theme : 'dx.material.teal.dark.compact.css'
               },{
                 id    : '10',
                 name  : 'Teal Light',
                 theme : 'dx.material.teal.light.compact.css'
               },],
    }
];
$(() => {
    // getPostDataAsync("/api/auth/userinfo.do", (jsonData)=>{
    //     window.$userId = jsonData.user_id;
    //     const uri = `/api/auth/menu-auth/${encodeURIComponent(window.$userId)}`;
    //     getDataAsync(uri, fetchMenuAuth);
    // });

    window.$userId = 'ADMIN';
    //const uri = "/api/auth/menu-auth/" + window.$userId;
    //getDataAsync(uri, fetchMenuAuth);
    
    _dxMenu = $("#menu")
        .dxMenu({
            dataSource: _menuDataAll,
            hideSubmenuOnMouseLeave: true,
            showFirstSubmenuMode: {
                name: "onHover",
                delay: { show: 0, hide: 100 },
            },
            displayExpr: "name",
            submenuDirection: "auto",
            visible: true,
            onItemClick(data) {
                const item = data.itemData;
                if (item.theme) {
                    $(".main-css").attr("href", "./css/" + item.theme);
                }

                if (item.name === "통합모니터링") {
                    document.location.reload();
                    return;
                }
                if (item.name === '문자식/도형식 폼관리') {
                    formMenuClick();
                    return;
                }
                if (item.page) {
                    let handle = _menuHandleMap.get(item.page);
                    if (handle) {
                        if (handle.window) {
                            if (item.page === handle.location.pathname) {
                                handle.focus();
                                return;
                            }
                        }
                    }
                    handle = window.open(item.page, item.name, item.option);
                    _menuHandleMap.set(item.page, handle);
                    if (!_menuHandleMap.get('opened')) {
                        _menuHandleMap.set('opened', new Array());
                    }
                    const openedArr = _menuHandleMap.get('opened');
                    openedArr.push(handle);
                    if (openedArr.length > 5) {
                        openedArr[0].close();
                        openedArr.shift();
                    }
                    handle.focus();
                }
            },
        })
        .dxMenu("instance");
});
function fetchMenuAuth(jsonData) {
    const menuAuth = jsonData;
    const menuAuthMap = new Map();
    menuAuth.forEach((auth) => {
        if (auth.athr_yn === "Y") {
            menuAuthMap.set(auth.menu_id, auth);
        }
    });
    assignMenuAuth(menuAuthMap);
    menuAuthMap.clear();
}
function assignMenuAuth(menuMap) {
    let isAuth;
    let enableGroup;
    let enableMenu;
    _menuDataAll.forEach((group) => {
        enableGroup = true;
        if (group.items) {
            let groupEnableCnt = 0;
            group.items.forEach((menu) => {
                enableMenu = true;
                if (menu.items) {
                    let enableCnt = 0;
                    // SubMenu
                    menu.items.forEach((subMenu) => {
                        isAuth = menuMap.get(subMenu.page);
                        //isAuth가 있거나 혹은 항상 있어야 하는 거일때만 SubMenu 활성화
                        subMenu.enable = isAuth ? true : subMenu.always === true;
                        //비활성화 개수 체크
                        !subMenu.enable ? enableCnt++ : enableCnt;
                    });
                    //전체 비활성화일 경우 메뉴 비활성화
                    enableMenu = !(enableCnt === menu.items.length);
                } else {
                    isAuth = menuMap.get(menu.page);
                    //isAuth가 있거나 혹은 항상 있어야 하는 거일때만 menu 활성화
                    enableMenu = isAuth ? true : menu.always === true;
                }
                //menu 상태 설정
                menu.enable = enableMenu;
                //menu 비활성화 개수 체크
                !menu.enable ? groupEnableCnt++ : groupEnableCnt;
            });
            //menu가 모드 비활성화일 경우 그룹 비활성화
            enableGroup = !(group.items.length === groupEnableCnt);
        }
        if (group.always === true) {
            enableGroup = true;
        }
        group.enable = enableGroup;
    });

    _menuData = [];
    _menuDataAll.forEach((group) => {
        if (group.enable === false) {
            return;
        }

        let groupMenu = JSON.parse(JSON.stringify(group));
        groupMenu.items = [];
        if (group.items) {
            group.items.forEach((menu) => {
                if (menu.enable === false) {
                    return;
                }
                let firstMenu = JSON.parse(JSON.stringify(menu));
                if (menu.items) {
                    firstMenu.items = [];
                    menu.items.forEach((subMenu) => {
                        if (subMenu.enable) {
                            firstMenu.items.push(subMenu);
                        }
                    });
                }
                groupMenu.items.push(firstMenu);
            });
        }
        _menuData.push(groupMenu);
    });
    _dxMenu.option('dataSource', _menuData);
}

function formMenuClick(){
    const userId = window.$userId;
    const randKey = new Date().getTime() / 1000;
    const url = "its.vmsFormEdit://" + userId + " " + randKey + " " + window.origin;
    //const url = "its.vmsFormEdit://" + userId + " " + randKey + " " + _apiUrl + " Black";
    const launcher = new CsAppLauncher({
        onIgnored: function () {
            console.log("browser failed to respond to the deep link");
            confirmMessage("VMS 폼 편집을 사용하시려면 프로그램을 설치하셔야 합니다<br>설치 프로그램을 다운로드 하시겠습니까?").done((yes)=>{
                if (yes === true) {
                    vmsFormEditDownload();
                }
            })
        },
        onFallback: function () {
            console.log("dialog hidden or user returned to tab");
        },
        onReturn: function () {
            console.log("user returned to the page from the native app");
        },
    });
    launcher.openURL(url);
}

