function showMenu (targetObjectId, eventObj) {
    if(eventObj) {
	hideCurrentMenu();
	eventObj.cancelBubble = true;
	//moveObject(targetObjectId, newXCoordinate, newYCoordinate);
	if( changeObjectVisibility(targetObjectId, 'visible') ) {
	    window.currentlyVisiblePopup = targetObjectId;
	    return true;
	} else {
	    return false;
	}
    } else {
	return false;
    }
}

function hideCurrentMenu() {
    if(window.currentlyVisiblePopup) {
	changeObjectVisibility(window.currentlyVisiblePopup, 'hidden');
	window.currentlyVisiblePopup = false;
    }
}

window.onload = initializeMenuHacks;
document.onclick = hideCurrentMenu;

function initializeMenuHacks() {
    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
	window.onresize = explorerMenuMacResizeFix;
    }

    if ((navigator.appVersion.indexOf('MSIE 5') != -1) 
	&& (navigator.platform.indexOf('Mac') != -1)
	&& getStyleObject('blankDiv')) {
	getStyleObject('blankDiv').width = document.body.clientWidth - 20;
	getStyleObject('blankDiv').height = document.body.clientHeight - 20;
    }

    if (!window.event) {
	window.event = false;
    }
}

function explorerMenuMacResizeFix () {
    location.reload(false);
}

