// JavaScript Document
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

if (checkIt('konqueror'))
{
	browser = "Konqueror";
	OS = "Linux";
}
else if (checkIt('safari')) browser = "Safari"
else if (checkIt('omniweb')) browser = "OmniWeb"
else if (checkIt('opera')) browser = "Opera"
else if (checkIt('webtv')) browser = "WebTV";
else if (checkIt('icab')) browser = "iCab"
else if (checkIt('msie')) browser = "Internet Explorer"
else if (!checkIt('compatible'))
{
	browser = "Netscape Navigator"
	version = detect.charAt(8);
}
else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);

if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("menu");
navRoot = navRoot.firstChild;
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", "");
   }
   }
  }
 }
}
window.onload=init;

function init(){
	startList();
	if ( !(OS == "Mac" && browser == "Internet Explorer") ) {
		sidebarMenu();
	}
}
function sidebarMenu(){
if (document.all&&document.getElementById) {
sideBar = document.getElementById("sidebarLinkGroup");
  if(sideBar != null){
  for (s=0; s<sideBar.childNodes.length; s++) {
	  navRoot = sideBar.childNodes[s];
	  if (navRoot.nodeName=="UL") {
				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", "");
						}
						// nested loop to take care of li's in second menu
						for (j=0; j<node.childNodes.length; j++) {
							ulsubnode = node.childNodes[j];
							if (ulsubnode.nodeName=="UL") {
								// take care of inner ul's lis
								for (k=0; k<ulsubnode.childNodes.length; k++) {
									lisubnode = ulsubnode.childNodes[k];
									if (lisubnode.nodeName=="LI") {
										// take care of inner ul's lis
										lisubnode.onmouseover=function() {
											this.className+=" over";
										}
										lisubnode.onmouseout=function() {
											this.className=this.className.replace(" over", "");
										}
									}
								}
							}
						}
					}
				 }
			  }
  }
  }
}
}
/*
OLD VERSION
function sidebarMenu(){
if (document.all&&document.getElementById) {
navRoot = document.getElementById("sidebarMenu");

  if(navRoot != null){
	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", "");
			}
			// nested loop to take care of li's in second menu
			for (j=0; j<node.childNodes.length; j++) {
				ulsubnode = node.childNodes[j];
				if (ulsubnode.nodeName=="UL") {
					// take care of inner ul's lis
					for (k=0; k<ulsubnode.childNodes.length; k++) {
						lisubnode = ulsubnode.childNodes[k];
						if (lisubnode.nodeName=="LI") {
							// take care of inner ul's lis
							lisubnode.onmouseover=function() {
								this.className+=" over";
							}
							lisubnode.onmouseout=function() {
								this.className=this.className.replace(" over", "");
							}
						}
					}
				}
			}
		}
	 }
  }
  
}
}
*/


function hide_select() {
	if ( !(OS == "Mac" && browser == "Internet Explorer") ) {
		document.getElementById("quickSearchSelect").style.visibility = "hidden";
	}
}

function show_select() {
	if ( !(OS == "Mac" && browser == "Internet Explorer") ) {
		document.getElementById("quickSearchSelect").style.visibility = "visible";
	}
}
