', layerID, visibility, (nodes[i].cssClass ? nodes[i].cssClass : this.defaultClass)) : this.stringFormat('
', '');
var onMDown = this.doesMenu() && nodes[i].n.length && nodes[i].isDynamic ? this.stringFormat('onmousedown="{0}.toggleBranch(\'{1}\', true)" style="cursor: pointer; cursor: hand"', this.myname, layerID) : '';
// cc 2002-11-12 variable image dimensions to line below
var imgTag = this.stringFormat('

', this.iconpath, gifname, modifier, layerID, onMDown, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
var linkStart = nodes[i].link ? this.stringFormat('
', nodes[i].link, this.linkTarget) : '';
var linkEnd = nodes[i].link ? '' : '';
// cc 2002-11-12 All these are additions
var selectedStart = nodes[i].selected ? "
" : '';
var selectedEnd = nodes[i].selected ? '' : '';
var nobrStart = this.brOK ? '' : '
';
var nobrEnd = this.brOK ? '' : '';
// cc 2002-11-12 modified
output = this.stringFormat('{0}{1}{2}{3}{4}{5}{6}{7}{8}{9}{10}
',
layerTag,
nobrStart,
prepend,
parentLayerID == null && nodes.length == 1 ? '' : imgTag,
iconimg,
selectedStart, linkStart,
nodes[i].title,
linkEnd, selectedEnd,
nobrEnd);
/**
* Write out the HTML. Uses document.write for speed over layers and
* innerHTML. This however means no dynamic adding/removing nodes on
* the client side. This could be conditional I guess if dynamic
* adding/removing is required.
*/
document.write(output + "\r\n");
/**
* Traverse sub nodes ?
*/
if (nodes[i].n.length) {
/**
* Determine what to prepend. If there is only one root
* node then the prepend to pass to children is nothing.
* Otherwise it depends on where we are in the tree.
*/
if (parentLayerID == null && nodes.length == 1) {
var newPrepend = '';
} else if (i < (nodes.length - 1)) {
// cc 2002-11-12 Both lines, added image size parameters.
var newPrepend = prepend + this.stringFormat('

', this.iconpath, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
} else {
var newPrepend = prepend + this.stringFormat('

', this.iconpath, nodes[i].lineImageWidth, nodes[i].lineImageHeight);
}
this.drawMenu(nodes[i].n,
level,
newPrepend,
nodes[i].expanded,
expanded ? 'inline' : 'none',
layerID);
}
}
}
/**
* Toggles a branches visible status. Called from resetBranches()
* and also when a +/- graphic is clicked.
*/
TreeMenu.prototype.toggleBranch = function (layerID, updateStatus) // OPTIONAL ARGS: noSave = false
{
var currentDisplay = this.getLayer(layerID).style.display;
var newDisplay = (this.branchStatus[layerID] && currentDisplay == 'inline') ? 'none' : 'inline'
for (var i=0; i
= 5));
var is_gecko = (agt.indexOf('gecko') != -1);
var is_ie = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
var is_ie4 = (is_ie && (is_major == 4) && (agt.indexOf("msie 4")!=-1) );
var is_ie4up = (is_ie && (is_major >= 4));
//--> end hide JavaScript