function getMenus()
{
    a = document.getElementsByTagName("*");
	objs = new Array();
	for(i = 0; i < a.length; i++)
	{
		c = a[i].id;
		if(c != "") if(c.indexOf("category_") == 0)
		    objs[objs.length] = a[i];
	} 
	return objs;
}

function icon_mouse_over(menu_name)
{
    // Get the menus.
    menus = getMenus();
    
    // Loop through and flip the visibility.
    for(i = 0; i < menus.length; i++)
    {
        if (menus[i].id == "category_" + menu_name)
        {
            menus[i].style.display = 'block';
            
            name = menus[i].id.split("_")[1];

            icon = document.getElementById(name + "icon");
            if (icon != null)
            {
                icon.style.background = "url('Assets/Images/" + name + "CategoryIconOn.jpg') top center no-repeat";
            }
        }
        else
        {
            menus[i].style.display = 'none';

            name = menus[i].id.split("_")[1];

            icon = document.getElementById(name + "icon");
            if (icon != null)
            {
                icon.style.background = "url('Assets/Images/" + name + "CategoryIcon.jpg') top center no-repeat";
            }
        }
    }
}