
function startList() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("console-nav");
		
		if (navRoot == null){return;}
		
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
	startListDept();
}

function startListDept() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("DeptSubList");
		
		if (navRoot == null){return;}
		
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

function toggleLayer(id) {	
	var layer = document.getElementById(id);				
	layer.style.display = (layer.style.display != "none") ? "none" : "block";
	var newimage = document.getElementById(id + 'x');
	if (newimage.src.indexOf("channelclosed.gif") != -1)
	{
		newimage.src = "/UCLHi/Images/channelopen.gif";
	}
	else
	{
		newimage.src = "/UCLHi/Images/channelclosed.gif";
	}
}
		
function toggleLayers()
{		
	var lists = document.getElementsByTagName("ul");
	for (var i = 0; i < lists.length; i++)
	{
		if (lists[i].id.indexOf("ChannelTree") != -1)
		{
			lists[i].style.display = "none";
		}
	}				
}