<!--

var pid = null;
var id;

function getOffset(object, type){
	var offset = (type == 'left') ? object.offsetLeft : object.offsetTop;
	var parent = object.offsetParent;
	while (parent!=null) {
		offset = (type == 'left') ? offset + parent.offsetLeft : offset + parent.offsetTop;
		parent = parent.offsetParent;
	}
	return offset;
}

function toggleMenu(id, opener) {
	var drop;
	var parent;

	drop = (document.getElementById) ? document.getElementById(id).style : document.all[id].style;
	if (verifyId(id)) parent = (document.getElementById) ? document.getElementById(pid).style : document.all[pid].style; 

	if (verifyId(id)) parent.visibility = "hidden";
	drop.visibility = "visible";

	drop.top = -500
	drop.left = getOffset(opener, 'left') - 5 + "px"
	drop.top = getOffset(opener, 'top') + opener.offsetHeight + 4 + "px"
	pid=id;



}

function closeMenu() {

	if (verifyId(id)) {
		drop = (document.getElementById) ? document.getElementById(pid).style : document.all[pid].style;
		drop.visibility = "hidden";
		drop.left = "0px"
		drop.top = "0px"
	}
}

function verifyId(id) {
	if (pid != id && pid != null) return true;
	else return false;
}

if (!document.all) {
	document.captureEvents(Event.CLICK);
}

function mouseDowm(e) {
	if (e && e.button && e.button != 2)
		closeMenu(pid)
}

document.onclick = mouseDowm;
window.onresize = closeMenu;

startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("navigation");
		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", "");
				}
			   
			}
		}
	}
}


//-->
