function showmenu(parmObject) {
	// Calculate relative offset
	//var myNavigation = getElement("navigation");
	var myNavOffset = objectOffsetLeft(getElement("navigation"), true);
	var myObjectOffset = objectOffsetLeft(parmObject, true);
	var myMaxWidth = parmObject.parentNode.offsetWidth;

	var isIE6 = false;
	if (navigator.userAgent.indexOf("MSIE") > 0) {
		var find_version = navigator.userAgent.match(/MSIE\s([0-9])/);
		if (find_version && find_version[1]) {
			var ie_version = parseInt(find_version[1]);
			if (ie_version < 7) {
				isIE6 = true;
			}
		}
	}

	if (isIE6) {
		parmObject.className = "menu hover";
	}

	if (myTimer) clearTimeout(myTimer);
	var myLastChild = parmObject.lastChild;
	if ((myActiveMenu != null) && (myActiveMenu != myLastChild)) {
		hidemenu();
	}
	if ((myLastChild != null) && (myLastChild.tagName == "UL")) {
		myLastChild.style.display = "block";
		myActiveMenu = myLastChild;
		var myRightPos = myLastChild.offsetWidth + (myObjectOffset - myNavOffset);
		if (myRightPos > myMaxWidth) {
			var newPos = "-" + (myRightPos - myMaxWidth) + "px";
			myLastChild.style.left = newPos;
		}
	}

	if (isIE6 && (parmObject.childNodes[1].firstChild.firstChild.style.width == "")) {
		var margin = parseInt(parmObject.childNodes[1].firstChild.firstChild.currentStyle['paddingLeft'], 10) + parseInt(parmObject.childNodes[1].firstChild.firstChild.currentStyle['paddingRight'], 10);
		for (var idx = 0; idx < parmObject.childNodes[1].childNodes.length; idx++ ) {
			parmObject.childNodes[1].childNodes[idx].firstChild.style.width = parmObject.childNodes[1].childNodes[idx].offsetWidth - margin;
		}
	}
}

function timermenu(parmObject) {
	if (parmObject.className != "menu") parmObject.className = "menu";
	if (myActiveMenu != null) {
		if (myTimer) clearTimeout(myTimer);
		myTimer = setTimeout("hidemenu();", 500);
	}
}

function hidemenu() {
	myActiveMenu.style.display = "none";
	myActiveMenu = null;
}

function switchimg(parmObject, imgName) {
	parmObject.src = eval(imgName + ".src");
}

myTimer = null;
myActiveMenu = null;
arrow_over = new Image()
arrow_over.src = "images/site/arrow-over.gif"
arrow_out = new Image()
arrow_out.src = "images/site/arrow.gif"
