var IE5 = navigator.userAgent.indexOf("MSIE 5") > -1 ? true : false; function getAbsolutePos(obj, tmpType){ // 0 = left, 1 = right, 2 = top, 3 = bottom if(typeof(tmpType) == "undefined"){ Type = 0; }else{ Type = tmpType; } var tot = 0; var tmp_obj = obj; while(tmp_obj){ if(Type <= 1){ // left, right tot = tot + tmp_obj.offsetLeft; }else{ // top, bottom tot = tot + tmp_obj.offsetTop; } tmp_obj = tmp_obj.offsetParent; } if(Type == 1){ //right return tot + obj.offsetWidth; }else if(Type == 3){ //bottom return tot + obj.offsetHeight; }else{ return tot; } } var child = null; function mnu_over(id, left) { var td = document.getElementById(id); if(td==null) return false; if(divTimer != null) clearTimeout(divTimer); if(IE5) td.style.cursor = "hand"; if(td.innerHTML!="") td.className += "_over"; var link = document.getElementById('link_' + id); if(link != null) window.status = link.href; if(td.className.substr(0,6) != "Level1") return true; if(child != null) { child.style.display = "none"; } child = document.getElementById("div_" + id); if(child != null) { if(left==true) { child.style.top = getAbsolutePos(td, 2); child.style.left = getAbsolutePos(td, 1) - 10; } else { child.style.top = getAbsolutePos(td, 3); child.style.left = getAbsolutePos(td, 0) - 11; } child.style.display = ""; } return true; } function mnu_out(id) { var td = document.getElementById(id); if(td==null) return false; window.status = ""; td.className = td.className.split('_')[0]; if(td.className.substr(0,6)=="Level1") divTimer = setTimeout("if(child!=null){child.style.display = 'none';child=null}", 500) return true; } function mnu_click(id) { var link = document.getElementById('link_' + id); if(link == null) return false; link.click(); } var divTimer; function divOut(id) { if(divTimer != null) clearTimeout(divTimer); divTimer = setTimeout("if(child!=null){child.style.display = 'none';child=null}", 500); } var tSubMenus = new Array(); function addSubMenu(parent_id, id, title, url, td_width) { var submenu = new Object(); submenu.parent_id = parent_id; submenu.id = id; submenu.title = title; submenu.url = url; submenu.td_width = td_width; tSubMenus[tSubMenus.length] = submenu; }