// Node object function Node(id, pid, name, url, title, target, icon, iconOpen, open) { 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._is = false; this._ls = false; this._hc = false; this._ai = 0; this._p; }; // Tree object function treeControl(objName) { this.config = { target : null, folderLinks : true, useSelection : true, useCookies : true, useLines : true, useIcons : true, useStatusText : false, closeSameLevel : false, inOrder : false } this.icon = { root : 'dccom/components/treeControl/styles/default/images/icons/base.gif', folder : 'dccom/components/treeControl/styles/default/images/icons/folder.gif', folderOpen : 'dccom/components/treeControl/styles/default/images/icons/folderopen.gif', node : 'dccom/components/treeControl/styles/default/images/icons/page.gif', empty : 'dccom/components/treeControl/styles/default/images/icons/empty.gif', line : 'dccom/components/treeControl/styles/default/images/icons/line.gif', join : 'dccom/components/treeControl/styles/default/images/icons/join.gif', joinBottom : 'dccom/components/treeControl/styles/default/images/icons/joinbottom.gif', plus : 'dccom/components/treeControl/styles/default/images/icons/plus.gif', plusBottom : 'dccom/components/treeControl/styles/default/images/icons/plusbottom.gif', minus : 'dccom/components/treeControl/styles/default/images/icons/minus.gif', minusBottom : 'dccom/components/treeControl/styles/default/images/icons/minusbottom.gif', nlPlus : 'dccom/components/treeControl/styles/default/images/icons/nolines_plus.gif', nlMinus : 'dccom/components/treeControl/styles/default/images/icons/nolines_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 treeControl.prototype.add = function(id, pid, name, url, title, target, icon, iconOpen, open) { this.aNodes[this.aNodes.length] = new Node(id, pid, name, url, title, target, icon, iconOpen, open); }; // Open/close all nodes treeControl.prototype.openAll = function() { this.oAll(true); }; treeControl.prototype.closeAll = function() { this.oAll(false); }; // Outputs the tree to the page treeControl.prototype.toString = function() { var str = '