initialiseMenu = function(id, link) {

	var actuator = document.getElementById(id);
	if (actuator == null) return;
	if (actuator.getElementsByTagName) {
		var menu = actuator.getElementsByTagName("UL")[0];
		var menuElements = menu.getElementsByTagName("LI");
		if (menuElements.length > 0) {
						
      var actuatorLink = jumpWhiteSpace(actuator.childNodes[0]);
			if (!link) {
				actuatorLink.onclick = function() {
					return false;
				}
			}
			
				menu.style.left = actuatorLink.offsetLeft + "px";
				menu.style.top = actuatorLink.offsetTop + actuatorLink.offsetHeight + "px"
				actuator.onmouseover = function() {
					this.className += " menuHover";
				}
				actuator.onmouseout = function() {
					this.className = this.className.replace(new RegExp(" menuHover\\b"), "");
				}
			for (var i = 0; i < menuElements.length; i++) {
				menuElements[i].onmouseover = function() {
					this.className += " menuHover";
				}
				menuElements[i].onmouseout = function() {
					this.className = this.className.replace(new RegExp(" menuHover\\b"), "");
				}
			}
		}
	}
}

function jumpWhiteSpace(node) {
	while (node.nodeType != 1) node = node.nextSibling;
	return node;
}

function SendToParentWindow(url)
{
	if (!window.opener || window.opener.closed)
	{
		var newWindow = window.open(url, "gameshome", "location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes");
		newWindow.focus();
	}
	else
	{
		window.opener.location.href=url;
		window.opener.focus();
	}
}