/* this code is copyright (c) 2003 Simpsons Collector Sector / G E K E . N E T    */
/* please do not copy, modify or use it without permission                        */

var sMenu;
sMenu = "";

if (document.addEventListener) {
	document.addEventListener("mouseout", function (e) {
        	window.event = e;
		}, true); // using capture
	}

function showhide(sID) {
	if (document.getElementById(sID).style.display == "block") {
		if (sMenu && sMenu != sID) { document.getElementById(sID).style.display = "none"; }
		if (document.getElementById("wosnavform")) { document.getElementById("wosnavform").style.visibility = "visible"; }
	} else {
		document.getElementById(sID).style.display = "block";
		if (document.getElementById("wosnavform")) { document.getElementById("wosnavform").style.visibility = "hidden"; }
		if (sMenu && sMenu != sID) { hide(sMenu); }
		sMenu = sID;
	}
}

function hide(sID) {
	document.getElementById(sID).style.display = "none";
	if (document.getElementById("wosnavform")) { document.getElementById("wosnavform").style.visibility = "visible"; }
	if (sMenu == sID) { sMenu = ""; }
}

function hideout(sID) {
	if (window.event.toElement) {
		sTEx = window.event.toElement;
		} else {
		sTEx = window.event.relatedTarget;
		while ( sTEx ? (sTEx.nodeType ? sTEx.nodeType != 1 : false != false ) : false != false ) { sTEx = sTEx.parentNode; }
		}
	
	var bHide = true;

	while (sTEx != null) {
		if (document.getElementById(sID) == sTEx) {
			bHide = false;
			break;
		}
		sTEx = sTEx.parentNode;
	}
	if (bHide) {
		if (document.getElementById("wosnavform")) { document.getElementById("wosnavform").style.visibility = "visible"; }
		document.getElementById(sID).style.display = "none";
		if (sMenu == sID) { sMenu = ""; }
		}
}

function show(sID) {
	if (sMenu != sID) {
		document.getElementById(sID).style.display = "block";
		if (document.getElementById("wosnavform")) { document.getElementById("wosnavform").style.visibility = "hidden"; }
		sMenu = sID;
	} else { hide(sID); }
}