  TreeParams = {       // You will probably have to change these.  /** TreeParams:   *  OPEN_MULTIPLE_MENUS     --  boolean   *                         if true, more than one menu can   *                         be open at a time. Otherwise,   *                         opening a new menu closes any   *                         open menu.   *   *  OPEN_MULTIPLE_SUBMENUS  --  boolean   *                         Same as OPEN_MULTIPLE_MENUS but   *                         applies to the submenus of each menu.   *   *  OPEN_WHILE_CLOSING      --  boolean   *                         If either OPEN_MULTIPLE_MENUS or   *                         OPEN_MULTIPLE_SUBMENUS are true,   *                         OPEN_WHILE_CLOSING will simultaneously   *                         open a new menu while closing the   *                         currently open menu.   *   *  TIME_DELAY              --  int   *                         How slowly a menuNode collapses   *                         in milliseconds. (0 to 100).   */      OPEN_MULTIPLE_MENUS    : false,      OPEN_WHILE_CLOSING     : true,      TIME_DELAY             : 20,      OPEN_MENU_ICON         : "images/btn_expanded.gif",      CLOSED_MENU_ICON       : "images/btn_collapsed.gif" // don't add a comma after last property!  };/** * util.js  * by Garrett Smith  * Provides functionality for working nodeLists. */Browser={isSupported:function(){return(Boolean(document.getElementsByTagName)&&Boolean(document.getElementById));},id:new function(){var ua=navigator.userAgent;var OMNI=ua.indexOf("Omni")>0;this.OP5=ua.indexOf("Opera 5")>=0||ua.indexOf("Opera 6")>=0;this.OP7=ua.indexOf("Opera 7")>=0;this.MAC=ua.indexOf("Mac")>0;if(!this.OP5&&!OMNI){this.IE5=ua.indexOf("MSIE 5")>0;this.IE5_0=ua.indexOf("MSIE 5.0")>0;this.NS6=ua.indexOf("Gecko")>0;this.MOZ=this.NS6&&ua.indexOf("Netscape")==-1;this.MAC_IE5=this.MAC&&this.IE5;this.IE6=ua.indexOf("MSIE 6")>0;this.KONQUEROR=ua.indexOf("Konqueror/")>0;}}};var px="px";TokenizedExps={};function getTokenizedExp(t){var x=TokenizedExps[t];if(!x)x=TokenizedExps[t]=new RegExp("\\b"+t+"\\b");return x;}function hasToken(s,t){return getTokenizedExp(t).test(s);};function getChildNodesWithClass(p,kl){var coll=p.childNodes;var rc=[];var exp=getTokenizedExp(kl);for(var i=0,n=0;i<coll.length;i++)if(exp.test(coll[i].className))rc[n++]=coll[i];return rc;}function getElementsWithClass(p,t,kl){var rc=[];var exp=getTokenizedExp(kl);var coll=(t=="*"&&p.all)?p.all:p.getElementsByTagName(t);for(var i=0,n=0;i<coll.length;i++){if(exp.test(coll[i].className))rc[n++]=coll[i];}return rc;}function get_elements_with_class_from_classList(el,t,classList){var rc=new Array(0);var coll=(t=="*"&&el.all)?el.all:el.getElementsByTagName(t);var exps=[];for(var i=0;i<classList.length;i++)exps[i]=getTokenizedExp(classList[i]);for(var j=0,coLen=coll.length;j<coLen;j++){kloop:for(var k=0;k<classList.length;k++){if(exps[k].test(coll[j].className)){rc[rc.length]=coll[j];break kloop;}}}return rc;}function findAncestorWithClass(el,kl){var exp=getTokenizedExp(kl);for(var p=el.parentNode;p!=null;){if(exp.test(p.className) )return p;p=p.parentNode;}return null;}function getDescendantById(p,id){var childNodes=p.all?p.all:p.getElementsByTagName("*");for(var i=0,len=childNodes.length;i<len;i++)if(childNodes[i].id==id)return childNodes[i];return null;}function removeClass(el,kl){el.className=el.className.replace(getTokenizedExp(kl),"").normalize();}function repaintFix(el){el.style.visibility='hidden';el.style.visibility='visible';}String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"");};String.prototype.normalize=function(){return this.trim().replace(/\s\s+/g," ");};if(!Array.prototype.unshift)Array.prototype.unshift=function(){this.reverse();for(var i=arguments.length-1;i>-1;i--)this[this.length]=arguments[i];this.reverse();return this.length;};/** Animated TreeMenu script by Garrett Smith**  email:admin@dhtmlkitchen.com**  Usage: see http://dhtmlkitchen.com/*  Last Modified [12/08/02]*/function toggleMenu(el){if(Browser.id.OP5||Browser.id.NS4) return;var l=Button.getLabel(el);if(l.dp){if(TreeParams.OPEN_MULTIPLE_MENUS||l.m.c.aM==l.m){l.m.cS();l.m.c.aM=null;}}else{if(TreeParams.OPEN_MULTIPLE_MENUS||l.m.c.aM==null){l.m.oS();l.m.c.aM=l.m;}else{l.m.c.aM.cS();if(!TreeParams.OPEN_WHILE_CLOSING){if(l.m.c.aM!=l.m)l.m.c.aM.mic=l.m;else{l.m.mic=null;l.m.oS();}}else{l.m.oS();l.m.c.aM=l.m;}}}}function activateMenu(id){if(!window.toggleMenu||Browser.id.OP5)return;var b=document.getElementById(id);if(!b) return;var me=findAncestorWithClass(b,"menu");if(me!=null)activateMenu(me.id.replace(/Menu$/,""));var l=Button.getLabel(getElementsWithClass(b,"*","buttonlabel")[0]);if(!l.dp){toggleMenu(l.el);l.dp=true;}}function buttonOver(el){window.status=el.parentNode.id;l=Button.getLabel(el);if(hasToken(l.el.className,"labelHover"))return;l.el.className+=" labelHover";}function buttonOff(l){window.status=window.defaultStatus;removeClass(l,"labelHover");}if(typeof document.getElementsByTagName=="undefined"||Browser.id.OP5)buttonOver=buttonOff=function(){};Button=function(el,cat){this.el=el;this.cat=cat;this.m=new Menu(document.getElementById(this.cat+"Menu"),this);var icons=el.getElementsByTagName("img");this.i=(icons.length>0)?icons[0]:null;this.isI=false;if(el.tagName.toLowerCase()=="img"){this.isI=true;this.i=el;}this.dp=false;};Button.getLabel=function(el){var be=findAncestorWithClass(el,"button");if(Menus[be.id])return Menus[be.id].oB;return new Button(el,be.id);};Button.prototype.sdl=function(){if(this.isI)return void(this.i.src=TreeParams.CLOSED_MENU_ICON);removeClass(this.el,"labelHover");removeClass(this.el,"labelDown");if(this.i!=null)this.i.src=TreeParams.CLOSED_MENU_ICON;};Menu=function(el,l){this.oB=l;this.id=l.cat;this.el=el;this.c=this.getC();this.it=getChildNodesWithClass(el,"menuNode");this.it.unshift(el);var all=getElementsWithClass(el,"*","menuNode");if(all.length==0){lis=getElementsWithClass(el,"li","menuNode");divs=getElementsWithClass(el,"div","menuNode");all=lis.length>divs.length?lis:divs;}this.al=all;this.al.unshift(el);this.cur=0;this._root=null;this.aM=null;this.mic=null;Menus[this.id]=this;};Menus={};Menu.prototype={oS:function(){if(this.io) return;if(this.oB.i!=null)this.oB.i.src=TreeParams.OPEN_MENU_ICON;if(this.ic){this.cE();if(this.itc){this.ito=this.itc.reverse();this.cur=this.itc.length-this.cur;}}else{this.cur=0;this.ito=new Array();if(this.itc)this.ito=this.itc.reverse();elsethis.ito=this.it;if(!this.oB.isI)this.oB.el.className+=" labelDown";}this.ic=false;this.io=true;if(this.ito[0]!=this.el)this.ito.reverse();this.pat=setInterval("Menus."+this.id+".o()",TreeParams.TIME_DELAY);this.oB.dp=true;},cS:function(){if(this.ic) return;if(this.io){this.oE();}else{this.io=false;this.cur=0;this.itc=new Array();for(var i=this.al.length-1,n=0;i>0;i--)if(this.al[i].style.display=="block")this.itc[n++]=this.al[i];}this.itc[this.itc.length]=this.el;this.pat=setInterval("Menus."+this.id+".cl()",TreeParams.TIME_DELAY);this.ic=true;this.oB.dp=false;},o:function(){this.ito[this.cur].style.display="block";if(++this.cur==this.ito.length)this.oE();},cl:function(){this.itc[this.cur].style.display="";if(++this.cur>=this.itc.length)this.cE();},oE:function(){clearInterval(this.pat);this.io=false;this.itc=this.ito.reverse();this.cur=this.ito.length-this.cur;if(!TreeParams.OPEN_MULTIPLE_MENUS&&this.c.aM!=this)this.cS();this.c.aM=this;},cE:function(){clearInterval(this.pat);this.ic=false;if(this.cur>=this.itc.length)this.oB.sdl();if(!TreeParams.OPEN_WHILE_CLOSING&&this.c.aM&&this.c.aM.mic!=null&&this.c.aM.mic!=this){this.c.aM.mic.oS();if(this.mic)this.c.aM=this.mic;}else{}this.mic=null;if(Browser.id.IE6)setTimeout("repaintFix(document.getElementById('"+this.el.id+"'));",50);},getC:function(){var pe=findAncestorWithClass(this.el,"menu");if(pe!=null){pId=pe.id.replace(/Menu$/,"");if(!Menus[pId])return Button.getLabel(getElementsWithClass(document.getElementById(pId),"*","buttonlabel")[0]).m;return Menus[pId];}if(!this._root){var rt=findAncestorWithClass(this.el,"AnimTree");if(!rt)rt=document.body;if(!rt.id)rt.id="AnimTree_"+Math.round(Math.random()*1E5);if(Trees[rt.id]!=null)this._root=Trees[rt.id];elsethis._root=new Tree(rt);}return this._root;}};Tree=function(el){this.el=el;this.aM=null;this.id=el.id;Trees[this.id]=this;};Trees={};if(document.getElementById&&!Browser.id.OP5&&!window.T_ini){document.writeln("<style type='text/css'>","/*<![CDATA[*/\n",".menu,.menuNode{display:none;}\n","/*]]>*/","<"+"/style>");window.T_ini=true;}/** * persistentTree.js  * by Garrett Smith  * * This is an add-on module for AnimTree.js * that allows you to save and restore states of various trees  * on your site. * * getCookie function based upon: * Cookie API  v1.0 * http://www.dithered.com/javascript/cookies/index.html * maintained by Chris Nott (chris@NOSPAMdithered.com - remove NOSPAM) */var LISTENER_SCRIPT_SRC = "src/global.js";var msPerDay = 1000 * 60 * 60 * 24;var PERSISTENCE_MILLIS = 22000;function setTreeCookie(id){		if(!document.getElementById) return;	var tree = document.getElementById(id);	var ab = getElementsWithClass(tree, "*", "labelDown");	for(var i = 0; i < ab.length; i++)		ab[i] = findAncestorWithClass(ab[i], "button").id;	document.cookie = id + "=" + escape(ab) + "; path=/; expires=" 	+ new Date(new Date().getTime()+ PERSISTENCE_MILLIS).toGMTString();};restoreTreeState = function(treeId, dBId){	var ab = getTreeCookie(treeId);	var aF = false;	if(ab.length > 0)		for(var i = 0; i < ab.length; i++)			if(ab[i])				restoreMenuState(ab[i], aF = true);	if(!aF)		activateMenu(dBId);}function restoreMenuState(sButtonId, isTarget) {	var b = document.getElementById(sButtonId);	if(!b) return;	var pe = findAncestorWithClass(b, "menu");	var l = Button.getLabel(getElementsWithClass(b, "*", "buttonlabel")[0]);	var m = l.m;	if(isTarget) {		if(!l.dp) {			toggleMenu(l.el);			l.dp = true;			if(pe && pe.style.display != 'block')				for(var i = 0; i < m.it.length; m.it[i++].style.display = 'none');		}	}	else if(!m.itc && !l.dp) {		m.itc = [];		for(var i = m.al.length-1, j = m.it.length-1, n = 0; i > -1; i--)			if(m.al[i].style.display == 'block')				(m.itc[n++] = m.al[i]).style.display = "none";			else if(m.al[i] == m.it[j])				m.itc[n++] = m.it[j--];	}	if(pe) 		restoreMenuState(pe.id.replace(/Menu$/,""));}if(!window.addEventListener && !window.attachEvent && document.write)	document.write("<script src='"+LISTENER_SCRIPT_SRC+"' type='text/javascript'></","script>");function saveTreeOnUnload(id){	var _id = id;	var handler = function(){setTreeCookie(_id);};		if(window.addEventListener)		window.addEventListener("unload", handler, false);			else if(window.attachEvent)		window.attachEvent("onunload", handler);			else if(document.write){		if(!window.id)			window.id = "window";		var contentPane = (window.contentPane ? window.contentPane : new EventQueue(window))		contentPane.addEventListener("onunload", handler);	}	}function getTreeCookie(id){	var ab = getCookie(id);	return (ab != null ? ab.split(",") : []);	}function getCookie(name) {	var dc = document.cookie;		var prefix = name + "=";	var begin = dc.lastIndexOf(prefix);	if (begin == -1) return null;		var end = dc.indexOf(";", begin);	if (end == -1) end = dc.length;		return unescape(dc.substring(begin + prefix.length, end));}