//<script language="javascript">
/*=============================================================================
 WebSolvers Framework Library
 Copyright 2003, WebSolvers, Inc., All Rights Reserved.                

 Library Navbar
 DHTML Tree List code
 
 Revision History:
 5-20-03 Revamped code to new specifications

=============================================================================

 The WebSolvers Framework Library may be used and/or modified by anyone owning
 the original work as it was incorporated into an original development project
 so long as this copyright notice and the comments above remain intact.  

 By using this code you agree to indemnify WebSolvers, Inc. from any liability
 that might arise from its use.

 This code may not be sold exclusively or as a part of other code without prior 
 written consent and is expressly forbidden.

 Obtain permission before redistributing this software over the Internet or 
 in any other medium. In all cases the copyright and header must remain intact. 
============================================================================= */

function preProcNavbarTag(attr, html, args) {
	var spos = 0;
	var epos = 0;
	var stack = Array();

	var mnu = newMenu();
	mnu.cmnu = mnu;
	mnu.citm = mnu;
	mnu.stack = new Array();

	procDTTag(mnu.citm, attr, '');

	html = dhtml.grepTags(new Array('DT', 'DD'), html, -1, new Array(proc_NavbarDTTag, proc_NavbarDDTag), false, mnu.index)

	mnu.cmnu = null;
	mnu.citm = null;
	mnu.stack = null;
	
	html = mnu.draw();
	return html;
}

function proc_NavbarDDTag(attr, html, args) {
	var mnu = Node[args[0]];
	
	if(mnu.cmnu != mnu.citm) {
		mnu.stack.push(mnu.cmnu);
		mnu.cmnu = mnu.citm;
	}

	html = dhtml.grepTags(new Array('DT', 'DD'), html, -1, new Array(proc_NavbarDTTag, proc_NavbarDDTag), false, mnu.index)

	mnu.cmnu = mnu.stack.pop();
	mnu.citm = mnu.cmnu;		
	
	return '';
}

function proc_NavbarDTTag(attr, html, args) {
	var mnu = Node[args[0]];

	mnu.citm = mnu.cmnu.newItem();
	procDTTag(mnu.citm, attr, html);
	
	return '';
}

function procDTTag(itm, attr, html) {
	for(var i = 0; i < attr.length; i++) {
		if(attr[i].length) {
			var m = attr[i];
			if(m && m.length) {
				switch(m[1].toLowerCase()) {
				case "nav":
					itm.plus = m[2];
					itm.minus = m[2];
					itm.space = m[2];
					itm.bar = m[2];
					itm.tee = m[2];
					itm.end = m[2];
					itm.tee_plus = m[2];
					itm.tee_minus = m[2];
					break;
				case "navicon":
					itm.plusIcn = m[2];
					itm.minusIcn = m[2];
					itm.spaceIcn = m[2];
					itm.barIcn = m[2];
					itm.teeIcn = m[2];
					itm.endIcn = m[2];
					itm.tee_plusIcn = m[2];
					itm.tee_minusIcn = m[2];
					break;
				case "plus":
					itm.plus = m[2];
					break;
				case "plusicon":
					itm.plusIcn = m[2];
					break;
				case "minus":
					itm.minus = m[2];
					break;
				case "minusicon":
					itm.minusIcn = m[2];
					break;
				case "space":
					itm.space = m[2];
					break;
				case "spaceicon":
					itm.spaceIcn = m[2];
					break;
				case "bar":
					itm.bar = m[2];
					break;
				case "baricon":
					itm.barIcn = m[2];
					break;
				case "tee":
					itm.tee = m[2];
					break;
				case "teeicon":
					itm.teeIcn = m[2];
					break;
				case "end":
					itm.end = m[2];
					break;
				case "endicon":
					itm.endIcn = m[2];
					break;
				case "teeplus":
					itm.tee_plus = m[2];
					break;
				case "teeplusicon":
					itm.tee_plusIcn = m[2];
					break;
				case "teeminus":
					itm.tee_minus = m[2];
					break;
				case "teeminusicon":
					itm.tee_minusIcn = m[2];
					break;
				case "shownav":
					if(m[2].toLowerCase() == "false" || m[2].toLowerCase() == "0")
						itm.showNav = false;
					else
						itm.showNav = true;
					break;
				case "skipnav":
					if(m[2].toLowerCase() == "false" || m[2].toLowerCase() == "0")
						itm.skipNav = false;
					else
						itm.skipNav = true;
					break;
				case "nowrap":
					if(m[2].toLowerCase() == "false" || m[2].toLowerCase() == "0")
						itm.noWrap = false;
					else
						itm.noWrap = true;
					break;
				case "showone":
					if(m[2].toLowerCase() == "false" || m[2].toLowerCase() == "0")
						itm.showOne = false;
					else
						itm.showOne = true;
					break;
				case "remember":
					if(m[2].toLowerCase() == "false" || m[2].toLowerCase() == "0")
						itm.remember = false;
					else
						itm.remember = true;
					break;
				case "absolute":
					if(m[2].toLowerCase() == "false" || m[2].toLowerCase() == "0")
						itm.absolute = false;
					else
						itm.absolute = true;
					break;
				case "lookup":
					if(m[2].toLowerCase() == "false" || m[2].toLowerCase() == "0")
						itm.lookup = false;
					else
						itm.lookup = true;
					break;
				case "sort":;
				case "sortby":
					if(m[2].substr(0, 3).toLowerCase() == "asc")
						itm.sortBy = Node_Sort_Asc;
					else if(m[2].substr(0, 3).toLowerCase() == "dsc" || m[2].substr(0, 3).toLowerCase() == "des")
						itm.sortBy = Node_Sort_Dsc;
					else
						itm.sortBy = Node_Unsorted;
					break;
				case "label":
					itm.label = m[2];
					break;
				case "class":
					itm.className = m[2];
					break;
				}
			}
		}
	}
	
	if(html)
		itm.text = html;
}

var Node = new Array();
var Node_Loaded = 0;
var Node_OnLoad = null;
var Node_Unsorted = 0;
var Node_Sort_Asc = 1;
var Node_Sort_Dsc = -1;

function getNode(strNode) {
	var aryNode = strNode.split('.');
	var oNode = Node[aryNode[0]];
	var i = 0;

	for(i = 1; (i < aryNode.length) && oNode; i++) {
		oNode = oNode.orgChild[aryNode[i]];
	}

	return oNode;
}

function newMenu(strName) {
	var oNode = new Node_Object();

	oNode.index = Node.length;
	Node[oNode.index] = oNode;
	oNode.draw_node = oNode.draw;
	oNode.draw = Menu_Draw;

	if(strName)
		oNode.id = strName + oNode.index;
	else
		oNode.id = "N_" + oNode.index;

	Node[oNode.id] = oNode;
	
	if(Node_Loaded == 0) {
		Node_OnLoad = dhtml.onload;
		dhtml.onload = Init_Nodes;
	}

	return oNode;
}

function Menu_Draw() {
	this.sort();
	return this.draw_node();
}
function Init_Nodes(e) {
	var i = 0;

	for(i = 0; i < Node.length; i++)
		Node[i].init();

	for(i = 0; i < Node.length; i++)
		if(!Node[i].parent) {
			Node[i].collapse(true);
			Node[i].expand();
			if(Node[i].remember)
				Node[i].load();
			else if(Node[i].lookup && Node[i].absolute)
				Node[i].find(document.location.href);
			else if(Node[i].lookup)
				Node[i].find(document.location.pathname);
		}

	if(Node_OnLoad)
		Node_OnLoad(e);
}

function Node_Object(strText, strURL, strTarget) {
	this.root = this;
	this.parent = null;
	
	this.orgIndex = 0;
	this.index = 0;
	this.id = "";
	this.orgChild = new Array();
	this.child = new Array();
	this.url = ((strURL) ? strURL : null);
	this.text = ((strText) ? strText : null);
	this.label = ((this.text) ? this.text : this.url);
	this.icon = null;
	this.target = ((strTarget) ? strTarget : null);
	this.selected = null;
	this.className = null;

	this.plusIcn = null;
	this.plus = "";
	this.minusIcn = null;
	this.minus = "";
	this.spaceIcn = null;
	this.space = "";
	this.barIcn = null;
	this.bar = "";
	this.teeIcn = null;
	this.tee = "";
	this.endIcn = null;
	this.end = "";
	this.tee_plusIcn = null;
	this.tee_plus = "";
	this.tee_minusIcn = null;
	this.tee_minus = "";
	this.showNav = true;
	this.skipNav = false;

	this.object = null;
	this.n_layer = null;
	this.s_layer = null;
	this.p_layer = null;
	this.image = null;
	this.expanded = false;
	this.noWrap = false;
	this.showOne = false;
	this.remember = false;
	this.absolute = true;
	this.lookup = true;
	this.sortBy = Node_Unsorted;
	
	this.height = 0;
	this.top = 0;
	
	this.init = Node_Init;
	this.newItem = Node_NewChild;
	this.addItem = Node_AddChild;
	this.draw = Node_Draw;
	this.toggle = Node_Toggle;
	this.select = Node_Select;
	this.expand = Node_Expand;
	this.collapse = Node_Collapse;
	this.backExpand = Node_BackExpand;
	this.backCollapse = Node_BackCollapse;
	this.show = Node_Show;
	this.hide = Node_Hide;
	this.overLayer = Node_OverLayer;
	this.overExpand = Node_OverExpand;
	this.overLink = Node_OverLink;
	this.click = Node_Click;
	this.save = Node_Save;
	this.load = Node_Load;
	this.find = Node_Find;
	this.sort = Node_Sort;

	this.slide = Node_Slide;
	this.backSlide = Node_BackSlide;
}

function Node_Init() {
	var i = 0;

	this.object = document.getElement("N_" + this.id);
	this.urls = new Array();

	if(dhtml.NN4) {
		if(!this.parent)
			this.p_layer = this.object;
		else {
			this.p_layer = this.root.p_layer;
			this.object = this.p_layer.document.getElement("N_" + this.id, false);
		}
		if(this.object) {
			this.n_layer = this.object.document.getElement("normal", false);
			this.s_layer = this.object.document.getElement("active", false);
		}
		
		if(this.parent && this.object && this.n_layer)
			for(i = 0; i < this.n_layer.document.links.length; i++)
				if(this.n_layer.document.links[i].href.substr(0, 11) != "javascript:") 
					this.urls[this.urls.length] = this.n_layer.document.links[i].href;
	} else if(dhtml.DOM) {
		if(this.parent && this.object) {
			var anks = this.object.getElementsByTagName("A");
			for(i = 0; i < anks.length; i++) 
				if(anks.item(i).href.substr(0, 11) != "javascript:")
						this.urls[this.urls.length] = anks.item(i).href;
		}
	}
	
	if(this.object) {
		this.image = this.object.document.images["I_" + this.id];
	}
	
	for(i = 0; i < this.orgChild.length; i++)
		this.orgChild[i].init();
}

function Node_Save(strCookie) {
	var i = 0;

	if(!this.remember)
		return "";
		
	if(!strCookie)
		strCookie = ""
	
	if(!window.setCrumb)
		return "";
	
	if(this.expanded && this.parent)
		strCookie = setCrumb(strCookie, this.id, 1);
	else if(this == this.root.selected)
		strCookie = setCrumb(strCookie, this.id, 2);

	for(i = 0; i < this.child.length; i++)
		strCookie = this.child[i].save(strCookie);
	
	if(this.parent)
		return strCookie;
	
	setCookie(this.id, strCookie);
}

function Node_Load(strCookie) {
	var i = 0;
	var crumb = ""

	if(!this.remember)
		return;
	if(!window.getCookie)
		return;
	
	if(!strCookie)
		strCookie = getCookie(this.id);
	
	crumb = getCrumb(strCookie, this.id);
	
	if(this.parent && crumb) {
		if(this.child.length)
			this.expand();
		if(crumb == 2)
			this.select();
	}
	
	if(this.expanded)
		for(i = 0; i < this.child.length; i++)
			this.child[i].load(strCookie);
}

function Node_Find(strURL) {
	var i = 0;
	
	if(!this.lookup)
		return false;

	if(this.url)
		this.urls[this.urls.length] = this.url;

	var sURL = strURL;
		
	for(i = 0; i < this.urls.length; i++) {
		var tURL = this.urls[i];

		if(!this.absolute) {
			var pURL = sURL.substring(0, sURL.lastIndexOf("/"));
				
			while(tURL.substring(0,1) == ".") {
				if(tURL.substring(0, 3) == "../") {
					pURL = pURL.substring(0, pURL.lastIndexOf("/"));
					tURL = tURL.substring(tURL.indexOf("/")+1,tURL.length);
				} else if(tURL.substring(0, 2) == "./") {
					tURL = tURL.substring(tURL.indexOf("/")+1,tURL.length);
				}
			}

			if(!pURL.length || pURL.substring(pURL.length, 1) != "/")
				pURL += "/";
					
			tURL = pURL + tURL;
		}

		if(tURL == sURL) {
			this.select();
			return true;
		}
	}
	
	if(this.child.length) {
		for(i = 0; i < this.child.length; i++) {
			if(this.child[i].find(strURL))
				return true;
		}
	}
	
	return false;
}
function Node_OverLayer(e, isOver) {
	isOver = !(!isOver);

	if(!dhtml.NN4)
		return false;

	if(isOver && !this.object.document.onmouseup) {
		this.object.document.captureEvents(Event.MOUSEUP);
	} else if(!isOver && this.object.document.onmouseup) {
		this.object.document.releaseEvents(Event.MOUSEUP);
		this.object.document.onmouseup=0;
	}	

	if(this.a_layer && this.a_layer.t_layer.contains(e.pageX, e.pageY)) {
		eval('this.object.document.onmouseup = function anonymous() { return getNode(\'' + this.id + '\').toggle(); };');
		return this.overExpand(isOver);
	} else if(this.a_layer && this.a_layer.l_layer.contains(e.pageX, e.pageY)) {
		eval('this.object.document.onmouseup = function anonymous() { return getNode(\'' + this.id + '\').toggle(); };');
		return this.overLink(isOver);
	} else {
		this.object.onmouseup = 0;
	}
	return true;
}
function Node_OverExpand(isOver) {
	isOver = !(!isOver);

	if(isOver)
		this.object.setCursor("pointer");
	else
		this.object.setCursor("");

	if(isOver && this.expanded) {
		this.winStatus = window.status;
		window.status = "Collapse";
	} else if (!isOver && this.expanded) {
		window.status = this.winStatus;
		this.winStatus = "";
	} else if (isOver && !this.expanded) {
		this.winStatus = window.status;
		window.status = "Expand";
	} else {
		window.status = this.winStatus;
		this.winStatus = "";
	}
	
	return true;
}

function Node_OverLink(isOver) {
	isOver = !(!isOver);
	if(isOver)
		this.object.setCursor("hand");
	else
		this.object.setCursor("");

	if(isOver && this.label) {
		this.winStatus = window.status;
		window.status = this.label;
	} else if(!isOver && this.label) {
		window.status = this.winStatus;
		this.winStatus = "";
	}

	return true;		
}

function Node_Show() {
	var i = 0;
	if(!this.object)
		return;

	if(dhtml.NN4) {
		this.height = this.object.getHeight();
		this.object.moveTo(this.object.getLeft(), this.parent.top + this.parent.height);
		this.top = this.object.getTop();
	}

	this.object.show(1);
	if(dhtml.NN4) {
		if(this.root.selected && this.root.selected == this) {
			this.n_layer.hide();
			this.s_layer.show();
			this.a_layer = this.s_layer;
		} else {
			this.n_layer.show();
			this.s_layer.hide();
			this.a_layer = this.n_layer;
		}
	}
	
	if(this.expanded)
		for(i = 0; i < this.child.length; i++) {
			this.child[i].show();
			this.height += this.child[i].height;
		}
}

function Node_Hide() {
	var i = 0;

	if(!this.object)
		return;
	
	this.height = 0;
	this.top = 0;
	this.object.hide(1);
	if(dhtml.NN4) {
		this.n_layer.hide();
		this.s_layer.hide();
	}
		
	for(i = 0; i < this.child.length; i++)
		this.child[i].hide();
}

function Node_Slide(intDiff) {
	var i = 0;
	if(dhtml.NN4)
		return;
	this.object.moveTo(this.object.getLeft(), this.object.getTop() + intDiff);
	this.top = this.object.getTop();
	
	for(i = 0; i < this.child.length; i++)
		this.child[i].slide(intDiff);
}

function Node_BackSlide(oNode, intDiff) {
	var i = 0;
	
	for(i = oNode.index + 1; i < this.child.length; i++)
		this.child[i].slide(intDiff)

	if(this.parent)		
		this.parent.backSlide(this, intDiff);
}

function Node_Toggle(cascade) {
	if(!this.child.length)
		return;
		
	cascade = !(!cascade);

	if(!this.expanded) {
		this.expand(cascade);
		if(this.showOne && this.parent)
			this.parent.backCollapse(this);
	} else
		this.collapse(cascade);
}

function Node_Expand(cascade) {
	var i = 0;
	var ch = this.height;

	if(this.expanded)
		return;
		
	if(!this.child.length)
		return;
		
	cascade = !(!cascade);
	
	this.height = this.object.getHeight();
		
	for(i = 0; i < this.child.length; i++) {
		this.child[i].show();
		if(cascade)
			this.child[i].expand(cascade);
		this.height += this.child[i].height;
	}

	if(this.image && this.minusIcn)
		this.image.src = this.minusIcn;
		
	this.expanded = true;

	if(dhtml.NN4) {
		ch = this.height - ch;

		this.p_layer.resizeTo(this.p_layer.getWidth(), this.p_layer.getHeight() + ch);
		
		if(this.parent)
			this.parent.backSlide(this, ch);
	}
}

function Node_Collapse(cascade) {
	var i = 0;
	var ch = this.height;

	if(!this.expanded)
		return;
		
	if(!this.child.length)
		return;

	cascade = !(!cascade);
		
	this.height = this.object.getHeight();
		
	for(i = 0; i < this.child.length; i++) {
		if(cascade)
			this.child[i].collapse(cascade);
		this.child[i].hide();
	}

	if(this.image && this.plusIcn)
		this.image.src = this.plusIcn;
		
	this.expanded = false;

	if(dhtml.NN4) {
		ch = this.height - ch;
			
		this.p_layer.resizeTo(this.p_layer.getWidth(), this.p_layer.getHeight() + ch);
		
		if(this.parent)
			this.parent.backSlide(this, ch);
	}
}

function Node_BackCollapse(oNode) {
	var i = 0;

	for(i = 0; i < this.child.length; i++)
		if(i != oNode.index)
			this.child[i].collapse(true);
			
	if(this.parent)		
		this.parent.backCollapse(this);
}

function Node_BackExpand(oNode) {
	var i = 0;

	this.expand(false);
			
	if(this.parent)		
		this.parent.backExpand(this);
}

function Node_Click() {
	var win = window;
	
	if(this.child.length)
		this.toggle();

	if(this.target) {
		switch(this.target.toLowerCase()) {
		case "_blank":
			win = window.open();
			break;
		case "_top":
			win = window.top;
			break;
		case "_parent":
			win = window.parent;
			break;
		case "_self":
			break;
		default:
			win = window.open(null, this.target);
		}
	}
	
	this.select();
		
	this.root.save();
	if(this.url)
		win.document.location.href = this.url;
}

function Node_Select() {
	if(dhtml.NN4) {
		if(this.root.selected) {
			this.root.selected.n_layer.show();
			this.root.selected.s_layer.hide();
		}
		this.n_layer.hide();
		this.s_layer.show();
	} else {
		if(this.root.selected)
			this.root.selected.object.setClass("");
		this.object.setClass("selected");
	}

	this.root.selected = this;
	this.expand();
	if(this.parent)
		this.parent.backExpand(this);
}

function Node_AddChild() {
	var i = 0;
	var oNode = null;

	for(i = 0; i < Node_AddChild.arguments.length; i++) {
		oNode = Node_AddChild.arguments[i];

		this.orgChild[(oNode.orgIndex = this.orgChild.length)] = oNode;
		oNode.id = this.id + "." + oNode.orgIndex;
		
		oNode.parent = this;
		oNode.root = this.root;

		oNode.plusIcn = this.plusIcn;
		oNode.plus = this.plus;
		oNode.minusIcn = this.minusIcn;
		oNode.minus = this.minus;
		oNode.spaceIcn = this.spaceIcn;
		oNode.space = this.space;
		oNode.barIcn = this.barIcn;
		oNode.bar = this.bar;
		oNode.teeIcn = this.teeIcn;
		oNode.tee = this.tee;
		oNode.endIcn = this.endIcn;
		oNode.end = this.end;
		oNode.tee_plusIcn = this.tee_plusIcn;
		oNode.tee_plus = this.tee_plus;
		oNode.tee_minusIcn = this.tee_minusIcn;
		oNode.tee_minus = this.tee_minus;
		oNode.showNav = this.showNav;
		oNode.sortBy = this.sortBy;
		
		oNode.noWrap = this.noWrap;
		oNode.showOne = this.showOne;
		oNode.remember = this.remember;
		oNode.absolute = this.absolute;
		oNode.lookup = this.lookup;		
	}

	return this;
}

function strcmpi(a, b) {
	if(!a) a="";
	if(!b) b="";
	
	return (a < b ? -1 : (a == b ? 0 : 1));
}

function Node_Sort() {
	var i = 0;

	this.child = new Array();
	for(i = 0; i < this.orgChild.length; i++) {
		this.orgChild[i].sort();
		this.child[i] = this.orgChild[i];
	}
		
	if(this.sortBy == Node_Sort_Asc)
		this.child.sort(Node_Child_Sort_Asc);
	else if(this.sortBy == Node_Sort_Dsc)
		this.child.sort(Node_Child_Sort_Dsc);
		
	for(i = 0; i < this.child.length; i++) 
		this.child[i].index = i;
}

function Node_Child_Sort_Asc(a, b) {
	if(!a.label || !b.label) alert('a) ' + a.id + ' ' + a.icon + ' ' + a.url + '\n' +
			'b) ' + b.id + ' ' + b.icon + ' ' + b.url);
	return strcmpi(a.label, b.label);
}

function Node_Child_Sort_Dsc(a, b) {
	return strcmpi(b.label, a.label);
}

function Node_NewChild(strText, strURL, strTarget) {
	var i = 0;
	var oNode = new Node_Object(strText, strURL, strTarget);

	this.addItem(oNode);

	return oNode;
}

function Node_Draw(strSpacer, lastChild) {
	var html = "", layer = "";
	var i = 0;
	var strSpc = "", strTee = "";
	
	
	if(!strSpacer)
		strSpacer="";
	lastChild = !(!lastChild);
	
	if(this.parent && this.showNav && !this.parent.skipNav) {
		if(lastChild && this.child.length) {
			if(this.plusIcn)
				strTee = '<img src="' + this.plusIcn + '" border="0" alt="" name="I_' + this.id + '">';
			else
				strTee = this.plus;
			if(this.spaceIcn)
				strSpc = '<img src="' + this.spaceIcn + '" border="0" alt="">';
			else
				strSpc = this.space;
		} else if(lastChild) {
			if(this.endIcn)
				strTee = '<img src="' + this.endIcn + '" border="0" alt="">';
			else
				strTee = this.end;
			strSpc = '';
		} else if(this.child.length) {
			if(this.tee_plusIcn)
				strTee = '<img src="' + this.tee_plusIcn + '" border="0" alt="" name="I_' + this.id + '">';
			else if(this.plusIcn)
				strTee = '<img src="' + this.plusIcn + '" border="0" alt="" name="I_' + this.id + '">';
			else
				strTee = this.tee_plus;
			if(this.barIcn)
				strSpc = '<img src="' + this.barIcn + '" border="0" alt="">';
			else
				strSpc = this.bar;
		} else {
			if(this.teeIcn)
				strTee = '<img src="' + this.teeIcn + '" border="0" alt="">';
			else
				strTee = this.tee;
			strSpc = '';
		}
	}

	if(dhtml.DOM) {
		if(!this.parent)
			html += '<table border="0" cellpadding="0" cellspacing="0" id="N_' + this.id + '">';
		
		if(this.parent || this.text) {
			html += '<tr id="N_' + this.id + '" style="display: none;">';
			html += '<td><table border="0" cellpadding="0" cellspacing="0"><tr><td nowrap valign="top">';
			if(strSpacer.length > 0)
				html += strSpacer;
			if(strTee.length > 0) {
				html += '<span';
				if(this.child.length)
					html += ' onclick="return getNode(\'' + this.id + '\').toggle();"' +
							' onmouseover="return getNode(\'' + this.id + '\').overExpand(true);"' +
							' onmouseout="return getNode(\'' + this.id + '\').overExpand(false);"'
				html += '>' + strTee + '</span>';
			}
			if(strSpacer.length + strTee.length == 0)
				html += '&nbsp;';
			html += '</td><td' + ((this.noWrap) ? ' nowrap' : '') + ((this.className) ? ' class="' + this.className + '"' : '') + ' valign="top"';
			if(this.child.length)
				html += ' onclick="return getNode(\'' + this.id + '\').toggle();"' +
						' onmouseover="return getNode(\'' + this.id + '\').overLink(true);"' +
						' onmouseout="return getNode(\'' + this.id + '\').overLink(false);"'
			html += '>';
			if(this.icon)
				html += '<img src="' + this.icon + '" border="0" alt="' + ((this.label) ? this.label : '') + '">';
			if(this.url)
				html += '<a href="' + this.url + '">';
			if(this.text)
				html += this.text;
			if(this.url)
				html += '</a>';
			html += '</td></tr></table></td>';
			html += '</tr>';
		}
		for(i = 0 ; i < this.child.length; i++) {
			lastChild = (i == (this.child.length - 1))
			html += this.child[i].draw(strSpacer + strSpc, lastChild);
		}

		if(!this.parent)		
			html += '</table>';
	} else if(dhtml.NN4) {
		if(!this.parent)
			html += '<div><ilayer id="N_' + this.id + '">';
		
		if(this.parent || this.text) {
			layer = '<table border="0" cellpadding="0" cellspacing="0"><tr><td nowrap valign="top">';
			if(strSpacer.length > 0)
				layer += strSpacer;
			if(strTee.length > 0) {
				if(this.child.length)
					layer += '<a class="tee" href="javascript: getNode(\'' + this.id + '\').toggle();"' +
							' onmouseover="return getNode(\'' + this.id + '\').overExpand(true);"' +
							' onmouseout="return getNode(\'' + this.id + '\').overExpand(false);">';
				layer += strTee;
				if(this.child.length)
					layer += '</a>';
			}
			if(strSpacer.length + strTee.length == 0)
				layer += '&nbsp;';
			layer += '</td><td' + ((this.noWrap) ? ' nowrap' : '') + ((this.className) ? ' class="' + this.className + '"' : '') + ' valign="top">';
			if(this.child.length)
				layer += '<a class="tee" href="javascript: getNode(\'' + this.id + '\').toggle();"' +
						' onmouseover="return getNode(\'' + this.id + '\').overLink(true);"' +
						' onmouseout="return getNode(\'' + this.id + '\').overLink(false);">';
			if(this.icon)
				layer += '<img src="' + this.icon + '" border="0" alt="' + ((this.label) ? this.label : '') + '">';
			if(this.url)
				layer += '<a href="' + this.url + '">';
			if(this.text)
				layer += this.text;
			if(this.url)
				layer += '</a>';
			if(this.child.length)
				layer += '</a>';
			layer += '</td></tr></table>';
			html += '<layer id="N_' + this.id + '" visibility="hidden">';
			html += '<layer id="normal" visibility="hidden" above="active">' + layer + '</layer>';
			html += '<layer id="active" visibility="hidden" above="normal">' + layer + '</layer>';
			html += '</layer>';
		}
		for(i = 0 ; i < this.child.length; i++) {
			lastChild = (i == (this.child.length - 1))
			html += this.child[i].draw(strSpacer + strSpc, lastChild);
		}

		if(!this.parent)		
			html += '</ilayer></div>';
	}

//	if(this.parent)
		return html;

	document.open();
	document.write(html);
	document.close();
	
	return "";
}

if(window.dhtml) {
	dhtml.addTag('NAVBAR', null, null, preProcNavbarTag, 1);
}