﻿
function resizeElement($id, $prop, $pixel) {
    var obj = document.getElementById($id);
    obj.style[$prop] = $pixel + "px";
}

function goto_menu($num, $snum, $bnum) {
    switch ($num) {
        case 0:
            if ($snum == 0) {
                if ($bnum == 0) { location.href = "/edusystem/sub_01_01_01.asp"; } //교육시스템, 입시부, 외국인입시전형
                if ($bnum == 1) { location.href = "/edusystem/sub_01_01_01.asp"; } //교육시스템, 입시부, 외국인입시전형
                if ($bnum == 2) { location.href = "/edusystem/sub_01_01_02.asp"; } //북경대학반
                if ($bnum == 3) { location.href = "/edusystem/sub_01_01_03.asp"; } //청화문과반
                if ($bnum == 4) { location.href = "/edusystem/sub_01_01_04.asp"; } //청화이과반
                if ($bnum == 5) { location.href = "/edusystem/sub_01_01_05.asp"; } //인민문과반
                if ($bnum == 6) { location.href = "/edusystem/sub_01_01_06.asp"; } //인민상경반
                if ($bnum == 7) { location.href = "/edusystem/sub_01_01_07.asp"; } //북대예과반
                if ($bnum == 8) { location.href = "/edusystem/sub_01_01_08.asp"; } //교육일정
            }
            if ($snum == 1) {
                if ($bnum == 0) { location.href = "/edusystem/sub_01_02_01.asp"; } //교육시스템, 고등부, 학교소개
                if ($bnum == 1) { location.href = "/edusystem/sub_01_02_01.asp"; } //학교소개
                if ($bnum == 2) { location.href = "/edusystem/sub_01_02_02.asp"; } //세부특장점
                if ($bnum == 3) { location.href = "/edusystem/sub_01_02_03.asp"; } //커리큘럼
                if ($bnum == 4) { location.href = "/edusystem/sub_01_02_04.asp"; } //교육일정표
                if ($bnum == 5) { location.href = "/edusystem/sub_01_02_05.asp"; } //시간표
            }
            if ($snum == 2) {
                if ($bnum == 0) { location.href = "/edusystem/sub_01_03_01.asp"; } //교육시스템, HSK, HSK소개
                if ($bnum == 1) { location.href = "/edusystem/sub_01_03_01.asp"; } //HSK
                if ($bnum == 2) { location.href = "/edusystem/sub_01_03_02.asp"; } //Toeic/Toeic speaking
                if ($bnum == 3) { location.href = "/edusystem/sub_01_03_05.asp"; } //취업영어회화
                if ($bnum == 4) { location.href = "/edusystem/sub_01_03_04.asp"; } //컴퓨터자격증 MOS
                //if ($bnum == 5) { location.href = "/edusystem/sub_01_03_05.asp"; } 전위광의 <파워 HSK>
                //if ($bnum == 6) { location.href = "/edusystem/sub_01_03_06.asp"; } //강의일정
            }
            if ($snum == 3) {
                if ($bnum == 0) { location.href = "/edusystem/sub_01_04_01.asp"; } //교육시스템, 어학센터, Scuess Chinese
                if ($bnum == 1) { location.href = "/edusystem/sub_01_04_01.asp"; } //Scuess Chinese
                if ($bnum == 2) { location.href = "/edusystem/sub_01_04_02.asp"; } //Scuess English
                if ($bnum == 3) { location.href = "/edusystem/sub_01_04_03.asp"; } //화상/전화영어
               //if ($bnum == 4) { location.href = "/edusystem/sub_01_04_04.asp"; } //컴퓨터 교육
            }
            if ($snum == 4) {
                if ($bnum == 0) { location.href = "/edusystem/sub_01_05_01.asp"; } //교육시스템, 해외연수, 미국캠프-펜실베니아
                if ($bnum == 1) { location.href = "/edusystem/sub_01_05_01.asp"; } //미국캠프-펜실베니아
                if ($bnum == 2) { location.href = "/edusystem/sub_01_05_02.asp"; } //미국캠프-올랜도
                if ($bnum == 3) { location.href = "/edusystem/sub_01_05_03.asp"; } //호주캠프
                if ($bnum == 4) { location.href = "/edusystem/sub_01_05_04.asp"; } //중국캠프
            }
            break;
        case 1:
            if ($snum == 0) {
                if ($bnum == 0) { location.href = "/eduhall/sub_02_01_01.asp"; } //교육관, 한국본사, Why Winglish?
                if ($bnum == 1) { location.href = "/eduhall/sub_02_01_01.asp"; } //Why Winglish?
                if ($bnum == 2) { location.href = "/eduhall/sub_02_01_02.asp"; } //회사연혁
                if ($bnum == 3) { location.href = "/eduhall/sub_02_01_03.asp"; } //사업영역
                if ($bnum == 4) { location.href = "/eduhall/sub_02_01_04.asp"; } //오시는길
            }
            if ($snum == 1) {
                if ($bnum == 0) { location.href = "/eduhall/sub_02_02_01.asp"; } //교육관, 중국센터, 대표이사
                if ($bnum == 1) { location.href = "/eduhall/sub_02_02_01.asp"; } //대표이사
                if ($bnum == 2) { location.href = "/eduhall/sub_02_02_02.asp"; } //교육방향
                if ($bnum == 3) { location.href = "/eduhall/sub_02_02_03.asp"; } //바른교육
                if ($bnum == 4) { location.href = "/eduhall/sub_02_02_04.asp"; } //교사소개
                if ($bnum == 5) { location.href = "/eduhall/sub_02_02_05.asp"; } //교육환경
                if ($bnum == 6) { location.href = "/eduhall/sub_02_02_06.asp"; } //오시는길
            }
            break;
            
        case 2:
            if ($snum == 0) {
                if ($bnum == 0) { location.href = "/livinghall/sub_03_01_01.asp"; } //생활관, 관리시스템
            }
            if ($snum == 1) {
                if ($bnum == 0) { location.href = "/livinghall/sub_03_02_01.asp"; } //생활관, 규정 및 약관
            }
            if ($snum == 2) {
                if ($bnum == 0) { location.href = "/livinghall/sub_03_03_01.asp"; } //생활관, 생활환경
            }
            if ($snum == 3) {
                if ($bnum == 0) { location.href = "/livinghall/tboard_main.asp?PT=community&no=3"; } //커뮤니티, 사진과, Activity 사진
                if ($bnum == 1) { location.href = "/livinghall/tboard_main.asp?PT=community&no=3"; } //Activity 사진
                if ($bnum == 2) { location.href = "/livinghall/tboard_main.asp?PT=community&no=11"; } //졸업생 사진
            }
            if ($snum == 4) {
                if ($bnum == 0) { location.href = "/livinghall/tboard_movie_list.asp?bbs_num=11"; } //커뮤니티, 영상관, 각 대학 소개
                if ($bnum == 1) { location.href = "/livinghall/tboard_movie_list.asp?bbs_num=11"; } //각 대학 소개
                if ($bnum == 2) { location.href = "/livinghall/tboard_movie_list.asp?bbs_num=12"; } //아시아대학순위
                if ($bnum == 3) { location.href = "/livinghall/tboard_movie_list.asp?bbs_num=13"; } //학과별순위
                if ($bnum == 4) { location.href = "/livinghall/tboard_movie_list.asp?bbs_num=14"; } //졸업생 체험단
                if ($bnum == 5) { location.href = "/livinghall/tboard_movie_list.asp?bbs_num=15"; } //Activity 동영상
            }
            break;
        case 3:
            if ($snum == 0) {
                if ($bnum == 0) { location.href = "/bbs/calendar.asp"; } //일정
            }
            if ($snum == 1) {
                if ($bnum == 0) { location.href = "/bbs/tboard_list.asp?PT=community&no=0"; } //커뮤니티, 공지사항
            }
            if ($snum == 2) {
                if ($bnum == 0) { location.href = "/bbs/tboard_list.asp?PT=community&no=14"; } //커뮤니티, 학원소식
            }
            if ($snum == 3) {
                if ($bnum == 0) { location.href = "/bbs/tboard_list.asp?PT=community&no=5"; } //합격수기
                if ($bnum == 1) { location.href = "/bbs/tboard_main.asp?PT=community&no=3"; } //Activity 사진
                if ($bnum == 2) { location.href = "/bbs/tboard_main.asp?PT=community&no=11"; } //졸업생 사진
            }
            if ($snum == 4) {
                if ($bnum == 0) { location.href = "/bbs/tboard_list.asp?PT=community&no=1"; } //학부모님방
                if ($bnum == 1) { location.href = "/bbs/tboard_movie_list.asp?bbs_num=11"; } //각 대학 소개
                if ($bnum == 2) { location.href = "/bbs/tboard_movie_list.asp?bbs_num=12"; } //아시아대학순위
                if ($bnum == 3) { location.href = "/bbs/tboard_movie_list.asp?bbs_num=13"; } //학과별순위
                if ($bnum == 4) { location.href = "/bbs/tboard_movie_list.asp?bbs_num=14"; } //졸업생 체험단
                if ($bnum == 5) { location.href = "/bbs/tboard_movie_list.asp?bbs_num=15"; } //Activity 동영상
            }
            if ($snum == 5) {
                if ($bnum == 0) { location.href = "/bbs/tboard_list.asp?PT=consult&no=0"; } //중국입시/취업아카데미 질문방 
                if ($bnum == 1) { location.href = "/bbs/tboard_list.asp?PT=consult&no=0"; } //중국입시/취업아카데미 질문방 
                if ($bnum == 2) { location.href = "/bbs/sub_04_06_02.asp"; } //자주찾는 질문
                if ($bnum == 3) { location.href = "/bbs/tboard_list.asp?PT=community&no=13"; } //궁금해요
                if ($bnum == 4) { location.href = "/bbs/sub_04_06_02.asp"; } //자주찾는 질문
            }
            break;
        case 4:
            if ($snum == 0) {
                if ($bnum == 0) { location.href = "/pds/sub_05_01_01.asp"; } //입시 자료실, Why China?
            }
            if ($snum == 1) {
                if ($bnum == 0) { location.href = "/pds/sub_05_02_01.asp"; } //입시 자료실, 대학순위, 세계대학 순위
                if ($bnum == 1) { location.href = "/pds/sub_05_02_01.asp"; } //세계대학 순위
                if ($bnum == 2) { location.href = "/pds/sub_05_02_02.asp"; } //아시아대학 순위
                if ($bnum == 3) { location.href = "/pds/sub_05_02_03.asp"; } //학과별 순위
            }
            if ($snum == 2) {
                if ($bnum == 0) { location.href = "/pds/sub_05_03_01.asp"; } //입시 자료실, 대학소개, 각 대학소개
                if ($bnum == 1) { location.href = "/pds/sub_05_03_01.asp"; } //각 대학소개
                if ($bnum == 2) { location.href = "/pds/sub_05_03_02.asp"; } //각 대학학비
            }
            if ($snum == 3) {
                if ($bnum == 0) { location.href = "/pds/tboard_list.asp?PT=community&no=2"; } //입시 자료실, 입시칼럼
            }
            break;
        case 5:
            if ($snum == 0) {

                if ($bnum == 0) { location.href = "/nego/sub_06_01_01.asp"; } //상담실, 한국연락처
            }
            if ($snum == 1) {
                if ($bnum == 0) { location.href = "/nego/sub_06_02_01.asp"; } //상담실, 중국연락처
            }
            if ($snum == 2) {
                if ($bnum == 0) { location.href = "/nego/sub_06_03_01.asp"; } //상담실, 이메일상담
            }
            if ($snum == 3) {
                if ($bnum == 0) { location.href = "/nego/sub_06_04_01.asp"; } //상담실, 우편물 주소
            }
            if ($snum == 4) {
                if ($bnum == 0) { location.href = "/nego/sub_06_05_01.asp"; } //상담실, 계좌번호안내
            }
            break;
    }
}

function allMenuView() {
    var obj = document.getElementById('divpop');
    if (obj.style.visibility == 'visible') {
        obj.style.visibility = 'hidden';
    } else {
        obj.style.visibility = 'visible';
    }
}

function banner_popup($url, $w, $h) {
    var name = "Banner";
    var spec = "menubar=no,width=" + $w + ",height=" + $h + ",toolbar=no,resize=no";
    window.open($url, name, spec);
}

function checkKeydown() {
    if (event.keyCode >= 112 && event.keyCode <= 123) {
        alert("F 키를 사용하실 수 없습니다.");
        event.keyCode = 0;
        event.cancelBubble = true;
        event.returnValue = false;
    }

    if ((event.keyCode == 78) && (event.ctrlKey == true)) {
        alert("새로운 창을 띄울실 수 없습니다.");
        return false;
    }
    /*
    if ((event.ctrlKey) || (event.shiftKey)) {
    alert('키를 사용할 수 없습니다.');
    }
    */
}

function checkMousedown() {
    if (event.button != 1) {
        alert("오른쪽 마우스 메뉴는 사용을 하실 수 없습니다.");
    }
}

function hideStatus() {
    window.status = '';
    return true;
}

function dragStart() {
    window.status = '';
    return false;
}
function selectStart() {
    window.status = '';
    return false;
}

function x() {
    window.status = "";
}

function RunSecurityMode() {
    /* 
    document.attachEvent("onkeydown", checkKeydown);
    document.attachEvent("onmousedown", checkMousedown);

    document.attachEvent("onmouseover", hideStatus);
    document.attachEvent("onmouseout", hideStatus);

    document.attachEvent("ondragstart", dragStart);
    document.attachEvent("onselectstart", selectStart);

    setInterval("x()", 10);
    */
}
