function navigate(url) { location.href=url; } // getElementByID with browser check!! function getElById(idVal) { if (document.getElementById != null) return document.getElementById(idVal) if (document.all != null) return document.all[idVal] alert("Problem getting element by id") return null } // Node object function Node(id, pid, name, url, title, target, icon, iconOpen, open , checkable ,checked, add, del) { this.id = id; this.pid = pid; this.name = name; this.url = url; this.title = title; this.target = target; this.icon = icon; this.iconOpen = iconOpen; this._io = open || false; this.checkable = checkable || false; this.checked = checked || false; this.add = add || false; this.del = del || false; this._is = false; this._ls = false; this._hc = false; this._ai = 0; this._p; }; // Tree object function dTree(objName) { this.config = { target : null, folderLinks : true, useSelection : true, useCookies : true, useLines : true, useIcons : true, useStatusText : false, closeSameLevel : false, inOrder : false } this.icon = { root : 'tree-images/zone.gif', folder : 'tree-images/folder.gif', folderOpen : 'tree-images/folderopen.gif', node : 'tree-images/page.gif', empty : 'tree-images/empty.gif', line : 'tree-images/line.gif', join : 'tree-images/join.gif', joinBottom : 'tree-images/joinbottom.gif', plus : 'tree-images/plus_updown.gif', plusBottom : 'tree-images/plus_up.gif', minus : 'tree-images/minus_.gif', minusBottom : 'tree-images/minus_up.gif', nlPlus : 'tree-images/plus_.gif', nlMinus : 'tree-images/minus_.gif' }; this.obj = objName; this.aNodes = []; this.aIndent = []; this.root = new Node(-1); this.selectedNode = null; this.selectedFound = false; this.completed = false; }; // Adds a new node to the node array dTree.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open, checkable, checked, add, del) { this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open, checkable, checked, add, del); }; // Open/close all nodes dTree.prototype.openAll = function() { this.oAll(true); }; dTree.prototype.closeAll = function() { this.oAll(false); }; // Outputs the tree to the page dTree.prototype.toString = function() { var str = '