// Menu Lists ----->// xMenu5, Copyright 2004,2005 Michael Foster (Cross-Browser.com)// Part of X, a Cross-Browser Javascript Library, Distributed under the terms of the GNU LGPL// Edited by MCMvar mnu = new Array();window.onload = function() {  mnu[0] = new xMenu5('List', 'xList');}function xMenu5(idUL, btnClass, idAutoOpen) // object prototype{  // Constructor  var i, ul, btns, mnu = xGetElementById(idUL);  btns = xGetElementsByClassName(btnClass, mnu, 'DIV');  for (i = 0; i < btns.length; ++i) {    ul = xNextSib(btns[i], 'UL');    btns[i].xClpsTgt = ul;    btns[i].onclick = btn_onClick;    set_display(btns[i], 0);  }  // Private    function btn_onClick()  {    var thisLi, fc, pUl;    if (this.xClpsTgt.style.display == 'none') {      set_display(this, 1);      // get this label's parent LI      var li = this.parentNode;      thisLi = li;      pUl = li.parentNode; // get this LI's parent UL      li = xFirstChild(pUl); // get the UL's first LI child      // close all labels' ULs on this level except for thisLI's label      while (li) {        if (li != thisLi) {          fc = xFirstChild(li);          if (fc && fc.xClpsTgt) {            set_display(fc, 0);          }        }        li = xNextSib(li);      }    }      else {      set_display(this, 0);    }  }  function set_display(ele, bBlock)  {    if (bBlock) {      ele.xClpsTgt.style.display = 'block';	  	// change parent LI to accept width	  	ele.xClpsTgt.parentNode.style.width = 'auto';	 	}    else {      ele.xClpsTgt.style.display = 'none';	  	// change parent LI back	  	ele.xClpsTgt.parentNode.style.width = '300px';    }  }  // Public  this.onUnload = function()  {    for (i = 0; i < btns.length; ++i) {      btns[i].xClpsTgt = null;      btns[i].onclick = null;    }  }} // end xMenu5 prototype