// javascript to drive the dynamic menus

// determine the offsets
var hoff = 0;
var voff = 0;
var agt = navigator.userAgent.toLowerCase();

if (agt.indexOf("msie") != -1)
	{
	hoff = -30;
	voff = 0;
	}
else
	{
	hoff = -35;
	voff = -12;
	}

// menus code
window.onload = function() 
	{
	initializeMenu("filmtvMenu", "filmtvActuator");
	initializeMenu("eventsMenu", "eventsActuator");
	initializeMenu("rockrollMenu", "rockrollActuator");
	}
  
var currentMenu = null;
if (!document.getElementById)
document.getElementById = function()
	{
	return null; 
	}

function initializeMenu(menuId, actuatorId)
	{
	var menu = document.getElementById(menuId);
	var actuator = document.getElementById(actuatorId);
	if (menu == null || actuator == null) return;
	if (window.opera) return; 
	actuator.onmouseover = function() 
		{
		if (currentMenu)
			{
			currentMenu.style.visibility = "hidden";
			}
		this.showMenu();
		}

	actuator.onmouseout = function()
		{
		currentMenu.style.visibility = "hidden";
		}
  
	menu.onmouseover = function()
	{
menu.style.visibility = "visible";
}
  
menu.onmouseout = function()
{
menu.style.visibility = "hidden";
currentMenu = null;
}
  
actuator.showMenu = function()
	{
	menu.style.left = this.offsetLeft + hoff + "px";
	menu.style.top = this.offsetTop + this.offsetHeight + voff + "px";
	menu.style.visibility = "visible";
	currentMenu = menu;
	}
}
