if (typeof navMenu == 'undefined') {
	var navMenu = function (elem) {
		this.main=elem;
		elem.control=this;
		this.Menu = this.main.getElementsByTagName('ul').item(0);
		this.lists = Array();
		var ct=0;
		for (var i=this.Menu.firstChild; i; i=i.nextSibling) {
			if (i.nodeName.toLowerCase()!="li") continue;
			this.lists[ct] = i;
			i.control=this;
			i.index=ct;
			i.maxHeight = parseInt(i.offsetHeight);
			navMenu.attach(i,'click',navMenu.eventHandlers.click);
			if (document.all) {
				navMenu.attach(i,'mouseover', navMenu.eventHandlers.mOver);
				navMenu.attach(i,'mouseout', navMenu.eventHandlers.mOut);
				i.style.cursor='hand';
			}
			if (!navMenu.isLinkedToHere(i)) {
				i.open=false;
				i.style.height='27px';
				this.minHeight=parseInt(i.offsetHeight)-1;
				i.style.overflow='hidden';
			} else {
				i.style.height=(parseInt(i.offsetHeight)-1)+"px";
				i.style.overflow='visible';
			}
			ct++;
		}
	}
	navMenu.isLinkedToHere = function (li) {
		return true;
	}
	navMenu.eventHandlers = Object();
	navMenu.eventHandlers.docLoad = function() {
		navMenu.instance=new navMenu(document.getElementById('navMenu'));
	}
	navMenu.eventHandlers.click = function () {
		var src=this;
		if (window.event) src=window.event.srcElement;
		while (!src.control) src=src.parentNode;
		var ctl=src.control;
		for (var i = 0; i < ctl.lists.length; i++) {
			if ((i==src.index)&&(ctl.lists[i].open==false)) ctl.lists[i].open=true;
			else ctl.lists[i].open=false;
		}
		ctl.scootch();
	}
	navMenu.eventHandlers.mOver = function () {
		var src=this;
		if (window.event) src=window.event.srcElement;
		while (src.className && src.className.toLowerCase().search('button')==-1) 
			src=src.parentNode;
		src.style.backgroundPosition="0 -27px";
		src.style.cursor='hand';
	}
	navMenu.eventHandlers.mOut = function () {
		var src=this;
		if (window.event) src=window.event.srcElement;
		while (src.className && src.className.toLowerCase().search('button')==-1) 
			src=src.parentNode;
		var ctl=src.control;
		src.style.backgroundPosition="0 0";
	}
	navMenu.prototype.scootch = function () {
		var tgtHeight;
		var curHeight;
		var delHeight;
		var newHeight;
		var keepGoing=false;
		for (var i=0; i < this.lists.length; i++) {
			tgtHeight=(this.lists[i].open?this.lists[i].maxHeight:this.minHeight);
			curHeight=parseInt(this.lists[i].style.height);
			if (tgtHeight==curHeight) continue;
			delHeight=Math.ceil(Math.max(Math.abs(tgtHeight-curHeight)/4),1)*((tgtHeight>curHeight)?1:-1);
			newHeight=curHeight+delHeight;
			this.lists[i].style.height=newHeight+"px";
			if (tgtHeight!=curHeight) keepGoing=true;
			this.lists[i].style.overflow=(this.lists[i].open?'visible':'hidden');
		}
		if (keepGoing) setTimeout("navMenu.instance.scootch();",20);
	}
	navMenu.attach = function (obj, evt, fnc) {
		if (obj.addEventListener) obj.addEventListener(evt,fnc,false);
		else if (obj.attachEvent) obj.attachEvent('on'+evt,fnc);
		else obj['on'+evt]=fnc;
	}
	navMenu.attach(window,'load',navMenu.eventHandlers.docLoad);
}