var prevDrop = null;
var theTimer = null;
window.onload = function() {
	if(navigator.appVersion.indexOf("MSIE") == -1) return;

	var items = document.getElementById("menubar").getElementsByTagName("LI");
	for(i in items) {
		if(items[i].className && (items[i].className.indexOf("top") != -1)) {
			items[i].onmouseover = function() { drop(this); }
			items[i].onmouseout = function() { clearTimeout(theTimer); theTimer = setTimeout("timeout()", 100); }
		}
	}
}

function timeout() {
	if(prevDrop) {
		nancy = prevDrop.getElementsByTagName("UL");
		if(nancy.length > 0) nancy[0].style.display = "none";
		prevDrop = null;
	}
}

function drop(li) {
	clearTimeout(theTimer);
	if(li == prevDrop) return;
	if(prevDrop) {
		nancy = prevDrop.getElementsByTagName("UL");
		if(nancy.length > 0) nancy[0].style.display = "none";
	}

	foo = li.getElementsByTagName("UL");
	if(foo.length > 0) foo[0].style.display = "block";
	prevDrop = li;
}
function getElementsByClassName(node, classname) { var a = []; var re = new RegExp('\\b' + classname + '\\b'); var els = node.getElementsByTagName("*"); for(var i=0,j=els.length; i<j; i++) if(re.test(els[i].className))a.push(els[i]); return a; }