var expandProduct;
var expandCompany;

function buttonHoverOn(buttonName)
{
	//expandProduct = checkForProduct(buttonName);
	//expandCompany = checkForCompany(buttonName);
	expandProduct = false;
	expandCompany = false;
	var button = document.getElementById(buttonName);	
	button.style.background = "url(images/menuButton_down.png)";

	if (expandProduct)
	{
		// change the visible property of the sub menus to true	
		unHideMenuItem("featureobjex");
		unHideMenuItem("spectralobjex");
	}
	
	if(expandCompany)
	{
		unHideMenuItem("leaders");
		unHideMenuItem("partners");
	}
}

function buttonHoverOut(buttonName)
{
	//expandProduct = checkForProduct(buttonName);
	//expandCompany = checkForCompany(buttonName);
	expandProduct = false;
	expandCompany = false;
	var button = document.getElementById(buttonName);
	button.style.background = "url(images/menuButton.png)";
	
	if (expandProduct)
	{
		// change the visible property of the sub menus to false	
		var t1 = setTimeout("hideMenuItem('featureobjex');", 2000);
		var t2 = setTimeout("hideMenuItem('spectralobjex');", 2000);
	}
	
	if(expandCompany)
	{
		var t3 = setTimeout("hideMenuItem('leaders');", 2000);
		var t4 = setTimeout("hideMenuItem('partners');", 2000);		
	}
}

function checkForProduct(buttonName) 
{
	if ((buttonName == "products"))
	{
		return true;	
	}
	
	return false;
}

function checkForCompany(buttonName) 
{
	if ((buttonName == "company"))
	{
		return true;	
	}
	
	return false;
}

function hideMenuItem(id)
{
	var menuItem = document.getElementById(id);
	menuItem.style.visibility = "hidden";
	menuItem.style.lineHeight = 0;	
}

function unHideMenuItem(id)
{
	var menuItem = document.getElementById(id);
	menuItem.style.visibility = "visible";
	menuItem.style.lineHeight = 2;	
}