var cbeMenu = new cbeMainMenu; function cbeMainMenu() { this.start = function() { this.menuBox = document.getElementById("menu").getElementsByTagName("ul")[0].childNodes this.menuLen = this.menuBox.length; //alert(this.menuLen); for( var i=0; i < this.menuLen; i++) { if(this.menuBox.item(i).tagName != "LI") {continue;} this.menuLink = this.menuBox.item(i).getElementsByTagName("a")[0]; this.menuLink.i = i; this.menuLink.onmouseover = this.menuLink.onfocus = function() { eval(cbeMenu.mouseOver(this.i)); } } } this.mouseOver = function(val) { for ( var i = 0; i < this.menuLen; i++) { if(this.menuBox.item(i).tagName != "LI") {continue;} this.menuImg = this.menuBox.item(i).getElementsByTagName("a")[0].getElementsByTagName("img")[0]; this.subList = this.menuBox.item(i).getElementsByTagName("ul")[0]; if(i == val) { this.menuImg.src = this.menuImg.src.replace("_off.jpg", "_on.jpg"); this.subList.style.display = "block"; } else { this.menuImg.src = this.menuImg.src.replace("_on.jpg", "_off.jpg"); this.subList.style.display = "none"; } } } } function submitChk() { window.open('','WIN','width=860, height=800, resizable=yes, scrollbars=yes'); var form = forward("get","/www/11940/list.do?title="+jQuery('#searchText').val() ,"WIN"); $j(form).remove(); return false; } function viewAllMenu() { var obj = document.getElementById("allMenu"); var btn = document.getElementById("closeMenu"); if(obj.style.display == "" || obj.style.display=="none"){ obj.style.display="block"; btn.style.display="block"; }else { obj.style.display="none"; btn.style.display="none"; } //obj.style.display="block"; } function goUrlEx(value) { var obj = document.getElementById("for_siteLink"); if(value != "") { if(obj.value == "") { switch(value) { case 1: alert("다국어사이트를 선택하세요"); return false; break; } } window.open(obj.value); } } function goUrl(value) { var obj = document.getElementById("siteLink"+value); if(value != "") { if(obj.value == "") { switch(value) { case 1: alert("직속기관을 선택하세요"); return false; break; case 2: alert("지역교육지원청을 선택하세요"); return false; break; case 3: alert("시도교육청을 선택하세요"); return false; break; case 4: alert("중앙행정부처를 선택하세요"); return false; break; } } window.open(obj.value); } }