function showPosition(a){position=document.getElementById(a);if(position.tagName=="TD"){position.style.display="table-cell"}else{position.style.display="block"}}var menuIndex=-1;var menus=new Array();function createMenu(a){if(!currentMenuId){return}else{menus[++menuIndex]=new DynamicMenu("menu_"+currentMenuId,menuIndex,a);delete currentMenuId}}function DynamicMenu(g,e,b){var a=null;var e=e;this.menu=document.getElementById(g);this.menu.id="menu_"+e;this.buttons=this.menu.childNodes;var d=new Array();var f=new Array();for(var c=0;c<this.buttons.length;c++){if(!isNaN(this.buttons[c].id)&&this.buttons[c].id>0){d.push(this.buttons[c])}}this.showSubMenu=function(){currentItems=new Array();var h=true;clearTimeout(a);this.hideAll(this.menuLevel);var m=0;for(var j=0;j<d.length;j++){if(d[j].getAttribute("parent_id")==this.id){d[j].style.display="block";d[j].menuLevel=this.menuLevel+1;var l=this.offsetLeft;var k=this.offsetTop;d[j].originalWidth=d[j].offsetWidth;if(!this.getAttribute("parent_id")>0&&document.all&&getIEVersion()<8){l=getOffsetPropertyInIE(this,"offsetLeft");k=getOffsetPropertyInIE(this,"offsetTop")}if(this.getAttribute("parent_id")>0||b){d[j].style.left=(l+this.offsetWidth)+"px";d[j].style.top=(k+m)+"px"}else{d[j].style.left=l+"px";d[j].style.top=(k+this.offsetHeight+m)+"px"}m+=d[j].offsetHeight;currentItems.push(d[j])}}this.regulateWidths(currentItems)};this.regulateWidths=function(h){if(h.length<=0){return}if(h[0].regulated){return}var k=0;for(var j=0;j<h.length;j++){if(k<h[j].originalWidth){k=h[j].originalWidth}}if(k<100){k=100}for(var j=0;j<h.length;j++){h[j].style.width=k+"px";h[j].regulated=true}};this.hideAll=function(j){for(var h=0;h<d.length;h++){if(d[h].menuLevel>j){d[h].style.display="none"}}};this.hideSubMenu=function(){a=setTimeout("menus["+e+"].hideAll(0)",1000)};for(var c=0;c<d.length;c++){d[c].menuLevel=0;d[c].style.zIndex=1000000+c;d[c].hideAll=this.hideAll;d[c].regulateWidths=this.regulateWidths;d[c].onmouseover=this.showSubMenu;d[c].onmouseout=this.hideSubMenu}}function getOffsetPropertyInIE(a,b){var d=a;var c=d[b];while(d.offsetParent){d=d.offsetParent;if(!isNaN(d[b])){c+=d[b]}}return c}function getIEVersion(){var c=-1;if(navigator.appName=="Microsoft Internet Explorer"){var a=navigator.userAgent;var b=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");if(b.exec(a)!=null){c=parseFloat(RegExp.$1)}}return c};
