var MaxMenuItems = 100; function ShowMenu(MenuNo) { if (document.getElementById("Submenu" + MenuNo)) { document.getElementById("Submenu" + MenuNo).style.visibility = "visible"; } } function HideMenu(MenuNo) { if (document.getElementById("Submenu" + MenuNo)) { document.getElementById("Submenu" + MenuNo).style.visibility = "hidden"; } } // ExceptNo - multiple params like 1,3,8 function HideMenuAll(ExceptNo) { var i; var arr; var found; ExceptNo = ExceptNo + ','; arr = ExceptNo.split(","); for(i = 1; i <= MaxMenuItems; i++) { found = 0; for (x in arr) { if (arr[x] == i) { found = 1; } } if ((found == 0) && (document.getElementById("Submenu" + i))) { document.getElementById("Submenu" + i).style.visibility = "hidden"; } } } // IMAGE BUTTONS function SwitchImg() { var rem, keep=0, store, obj, switcher=new Array, history=document.Data; for (rem=0; rem < (SwitchImg.arguments.length-2); rem+=3) { store = SwitchImg.arguments[(navigator.appName == 'Netscape')?rem:rem+1]; if ((store.indexOf('document.layers[')==0 && document.layers==null) || (store.indexOf('document.all[')==0 && document.all==null)) store = 'document'+store.substring(store.lastIndexOf('.'),store.length); obj = eval(store); if (obj != null) { switcher[keep++] = obj; switcher[keep++] = (history==null || history[keep-1]!=obj)?obj.src:history[keep]; obj.src = SwitchImg.arguments[rem+2]; } } document.Data = switcher; } function RestoreImg() { if (document.Data != null) for (var rem=0; rem<(document.Data.length-1); rem+=2) document.Data[rem].src=document.Data[rem+1]; } // TreeCollapse, TreeExpand function TreeExpandToogle(ID) { var ExpandButton = document.getElementById("tree_expand"+ID); var ExpandArea = document.getElementById("tree"+ID); if (ExpandArea) { if (ExpandArea.style.display == "") { ExpandButton.innerHTML = ""; ExpandArea.style.display = "none"; } else { ExpandButton.innerHTML = ""; ExpandArea.style.display = ""; } } } // Popup window function PopupNewWindow(url, width, height, params) { if (params == "") params = 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=no'; var left = (screen.width - width) / 2; var top = (screen.height - height) / 2; params = params + ',width=' + width + ',height=' + height + ',screenX=' + left + ',screenY=' + top; window.open(url, '' ,params); }