var top_menu_on_img = new Array(); var top_menu_off_img = new Array(); function init_top_menu(obj,start, substart) { var list_li = document.getElementById(obj).getElementsByTagName('LI'); var j=1; for(var i=0; i0) { var img = list_li[i].getElementsByTagName('IMG')[0]; top_menu_off_img[i] = new Image(); top_menu_off_img[i].src =img.src; var re = new RegExp('.([a-z]{3})$'); top_menu_on_img[i] = new Image(); if(img.src.match(/_on/)) { top_menu_on_img[i].src=img.src; } else { top_menu_on_img[i].src=img.src.replace(re,'_on.$1'); } img.idx = i; } } for(var i=0; i0) sub_list_li[si].parentNode.parentNode.getElementsByTagName('IMG')[0].src = top_menu_on_img[i].src; } else { sub_list_li[si].removeAttribute('class'); sub_list_li[si].removeAttribute('className'); } } } list_li[i].onmouseover = function() { if(this.parentNode.selectobj) { if(this.parentNode.selectobj.getElementsByTagName('IMG').length>0) { this.parentNode.selectobj.getElementsByTagName('IMG')[0].src = top_menu_off_img[this.parentNode.selectobj.getElementsByTagName('IMG')[0].idx].src; } this.parentNode.selectobj.removeAttribute('class'); this.parentNode.selectobj.removeAttribute('className'); } if(this.getElementsByTagName('IMG').length>0) { this.getElementsByTagName('IMG')[0].src = top_menu_on_img[this.getElementsByTagName('IMG')[0].idx].src; } this.className='on'; this.parentNode.selectobj = this; } list_li[i].getElementsByTagName('A')[0].onfocus=function() { this.parentNode.onmouseover(); } j++; } } } function init_left_menu(obj,start, substart, four_depth_start) { if(!four_depth_start) four_depth_start=''; if(!document.getElementById(obj)) return; var list_li = document.getElementById(obj).getElementsByTagName('LI'); var j=1; for(var i=0; i0) { list_li[i].className=list_li[i].className+' more'; list_li[i].getElementsByTagName('A')[0].href='#none'; list_li[i].onclick = function() { if(this.parentNode.selectobj) this.parentNode.selectobj.className=this.parentNode.selectobj.className.replace('on','close'); this.className= this.className.replace('close','on'); this.parentNode.selectobj = this; } list_li[i].getElementsByTagName('A')[0].onfocus = function() { this.parentNode.onclick(); } } j++; } } if(four_depth_start!='' && four_depth_start!='0') { if(document.getElementById('four_depth_nav')){ var list_4_li = document.getElementById('four_depth_nav').getElementsByTagName('LI'); for(var i=0; i로 감싸주세요'); //return; } new_img.show_src = param1; new_img.close_src = param2; new_img.alt = param3; new_img.mode='show'; new_img.src = new_img.show_src; new_img.id = target; new_a.href = '#none'; new_a.img = new_img; new_a.appendChild(new_img); new_target.innerHTML=''; new_target.appendChild(new_a); new_a.param3 = param3; new_a.param4 = param4; new_a.onclick=function() { if(this.img.mode=='show') { this.img.mode='hide'; new_img.alt = this.param4; this.img.src=this.img.close_src; var li_tag = document.getElementById('snb').getElementsByTagName('LI'); for(i=0;i'; }