/**************************************************************************
* 메뉴관련 링크 및 Location 관련
**************************************************************************/
var menuArr = new Array();
var m = 0;

//var strUrlhttps = "https://kbmcorp.co.kr:9116";
var strUrlhttps = "http://kbmcorp.co.kr";
var strUrlhttp = "http://kbmcorp.co.kr";

// 창비에듀 Home
menuArr[m++] = new Array('00', '홈', strUrlhttp+'/', '');
menuArr[m++] = new Array('01', '회사소개', strUrlhttp+'/company/intro.html?nav=1_1_1', '');
menuArr[m++] = new Array('0101', '인사말', strUrlhttp+'/company/intro.html?nav=1_1_1', '');
menuArr[m++] = new Array('0102', '회사개요', strUrlhttp+'/company/organ.html?nav=1_2_1', '');
menuArr[m++] = new Array('0103', '연혁', strUrlhttp+'/dev/history/list.html?h_gcode=history&h_code=1', '');
menuArr[m++] = new Array('0104', '비전', strUrlhttp+'/company/vision.html?nav=1_4_1', '');
//menuArr[m++] = new Array('0105', 'KBM PEOPLE', strUrlhttp+'/company/people.html?nav=1_5_1', '');
menuArr[m++] = new Array('0105', 'KBM PEOPLE', strUrlhttp+'/dev/contents/list.html?h_gcode=contents&h_code=1&nav=1_5_1', '');
menuArr[m++] = new Array('0106', 'KBM NEWS', strUrlhttp+'/dev/board/list.html?h_gcode=board&h_code=1', '');
menuArr[m++] = new Array('0107', '찾아오시는길', strUrlhttp+'/company/location.html?nav=1_7_1', '');
//menuArr[m++] = new Array('02', '제품소게', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_10', '');
//menuArr[m++] = new Array('0201', '진공증착', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_10', '');
//menuArr[m++] = new Array('0202', '반도체', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_30', '');
//menuArr[m++] = new Array('0207', '이송 로봇', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_70', '');
//menuArr[m++] = new Array('0203', '디스플레이', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_20', '');
//menuArr[m++] = new Array('0204', '원재료 및 소재', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_40', '');
//menuArr[m++] = new Array('0205', '금형 및 도구', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_50', '');
//menuArr[m++] = new Array('0206', '기타', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_60', '');

menuArr[m++] = new Array('02', '제품소게', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_40', '');
menuArr[m++] = new Array('0201', '원재료 및 소재', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_40', '');
menuArr[m++] = new Array('0202', '진공증착', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_10', '');
menuArr[m++] = new Array('0203', '반도체', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_30', '');
menuArr[m++] = new Array('0204', '이송 로봇', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_70', '');
menuArr[m++] = new Array('0205', 'LED', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_60', '');
menuArr[m++] = new Array('0206', '전극 및 필라멘트', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_20', '');
menuArr[m++] = new Array('0207', '다이아공구', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_50', '');
menuArr[m++] = new Array('0208', '초경 및 설비', strUrlhttp+'/dev/product/list.html?h_gcode=product&h_code=1&po_lclass=shop_80', '');



menuArr[m++] = new Array('03', '고객센터', strUrlhttp+'/dev/qna/postform.html?h_gcode=qna&h_code=1', '');
menuArr[m++] = new Array('0301', '온라인문의', strUrlhttps+'/dev/qna/postform.html?h_gcode=qna&h_code=1', '');
menuArr[m++] = new Array('0302', 'CONTACT US', strUrlhttp+'/cs/contact.html?nav=3_2_1', '');
menuArr[m++] = new Array('0303', '근무일정표', strUrlhttp+'/dev/schedule/list.html?h_gcode=schedule&h_code=1', '');
menuArr[m++] = new Array('0304', '자료실', strUrlhttp+'/dev/board/list.html?h_gcode=board&h_code=2', '');
menuArr[m++] = new Array('0305', '채용정보', strUrlhttp+'/cs/recruit_guide.html?nav=3_5_1', '');
menuArr[m++] = new Array('030501', '채용안내', strUrlhttp+'/cs/recruit_guide.html?nav=3_5_1', '');
menuArr[m++] = new Array('030502', '채용공고', strUrlhttp+'/dev/recruit/list.html?h_gcode=recruit&h_code=1', '');
menuArr[m++] = new Array('030503', '온라인입사지원', strUrlhttps+'/dev/recruit/postform.html?h_gcode=recruit&h_code=1', '');
menuArr[m++] = new Array('0306', '사이트맵', strUrlhttp+'/cs/sitemap.html?nav=3_6_1', '');

// 언어별 사이트
menuArr[m++] = new Array('0401', '한국어', strUrlhttp+'/', '');
menuArr[m++] = new Array('0402', 'English', strUrlhttp+'/eng', '');
menuArr[m++] = new Array('0403', '日本語', strUrlhttp+'/jp', '');
menuArr[m++] = new Array('0404', '中國語', strUrlhttp+'/cn', '');


/**************************************************************************
*	메뉴 링크
**************************************************************************/
function menuEmail() {
		window.open(strUrlhttp+'/etc/email_spam.html','이메일무단수집거부','width=500,height=380,toolbar=no,loaction=no,status=no,menubar=no,scrollbars=no,resizable=no,left=50,top=50');
}
function menuPrivacy() {
		window.open('/etc/privacy.html','개인정보취급방침','width=500,height=400,toolbar=no,loaction=no,status=no,menubar=no,scrollbars=no,resizable=no,left=50,top=50');
}
function menuAgree() {
		window.open('/cs/agree.html','개인정보수집동의','width=500,height=400,toolbar=no,loaction=no,status=no,menubar=no,scrollbars=no,resizable=no,left=50,top=50');
}

function menuLink(str)
// 도메인 붙이고 가는 경우
{
    var isFind = false;
    for (i = 0; i < str.length; i = i + 2) {
        for (j = 0; j < menuArr.length; j++) {
            if (str == menuArr[j][0]) {
                if (menuArr[j][2] == "#") {
                    alert("페이지 없음");
                    return;
                }
                else {
                    window.location.href = menuArr[j][3] + menuArr[j][2];
                    isFind = true;
                    break;
                }
            }
        }

        if (isFind) break;
    }
}
function lineMap(str)
{
    for (i = 0; i < str.length; i = i + 4) {
        for (j = 0; j < menuArr.length; j++) {
            if (str == menuArr[j][0]) {
				var linemenu = menuArr[j][1];
				document.write(linemenu);
				break;
			}
		}
	}
}
function menuLink2(str)
// 도메인 안 붙이고 바로 가는 경우
{
    var isFind = false;
    for (i = 0; i < str.length; i = i + 2) {
        for (j = 0; j < menuArr.length; j++) {
            if (str == menuArr[j][0]) {
                if (menuArr[j][2] == "#") {
                    alert("페이지 없음");
                    return;
                }
                else {
                    window.location.href = menuArr[j][2];
                    isFind = true;
                    break;
                }
            }
        }
        if (isFind) break;
    }
}

function menuLinkP(str)
// 도메인 붙이고 부모창 갈때
{
    var isFind = false;
    for (i = 0; i < str.length; i = i + 2) {
        for (j = 0; j < menuArr.length; j++) {
            if (str == menuArr[j][0]) {
                if (menuArr[j][2] == "#") {
                    alert("페이지 없음");
                    return;
                }
                else {
                    if (window.top == window) {
                        window.location.href = menuArr[j][3] + menuArr[j][2];
                    } else {//iframe 일 경우 호출되어야 하는 url
                        parent.location.href = menuArr[j][3] + menuArr[j][2];
                    }
                    isFind = true;
                    break;
                }
            }
        }
        if (isFind) break;
    }
}

