// This script activates my CSS menu in IE. The browser detect is simply to make sure that only Internet Explorer uses JavaScript; most others can use CSS more effectively.

var detect = navigator.userAgent.toLowerCase();

function checkIt(string)
{
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}
var browser;
if (checkIt('opera')) browser = 'Opera';
else if (checkIt('msie')) browser = 'IE';
version = detect.charAt(place + thestring.length);

startList = function() {
	if (document.getElementById && browser == 'IE' && version < 7 ) {
		navRoot = document.getElementById('nav');
		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', '');
				}
			}
		}
	}
}