var isNetscape	= (document.layers);
var isOpera	= (document.getElementById);
var isIE	= (document.all);
var TotalListStyle;
var MonthListStyle;
var OtherListStyle;
var TotalIsVisible = 0;
var MonthIsVisible = 0;
var OtherIsVisible = 0;


function InitRankings()
{
	if (isNetscape)
	{
		TotalListStyle	= document.TotalList;
		MonthListStyle	= document.MonthList;
		OtherListStyle	= document.OtherDown;
	}
	else if (isOpera)
	{
		TotalListStyle = document.getElementById("TotalList").style;
		MonthListStyle = document.getElementById("MonthList").style;
		OtherListStyle = document.getElementById("OtherDown").style;
	}
	else if (isIE)
	{
		TotalListStyle = TotalList.style;
		MonthListStyle = MonthList.style;
		OtherListStyle = OtherDown.style;
	}
}

function ShowMenu(MenuName)
{
	if (MenuName == "total")
	{
		TotalListStyle.visibility	=	'visible';
		TotalIsVisible				=	1;
		MonthListStyle.visibility='hidden';
		MonthIsVisible	=	0;
		OtherListStyle.visibility='hidden';
		OtherIsVisible	=	0;
	}
	else if (MenuName == "month")
	{
		MonthListStyle.visibility='visible';
		MonthIsVisible	=	1;
		TotalListStyle.visibility='hidden';
		TotalIsVisible	=	0;
		OtherListStyle.visibility='hidden';
		OtherIsVisible	=	0;
	}
	else if (MenuName == "other")
	{
		OtherListStyle.visibility='visible';
		OtherIsVisible	=	1;
		TotalListStyle.visibility='hidden';
		TotalIsVisible	=	0;
		MonthListStyle.visibility='hidden';
		MonthIsVisible	=	0;
	}
}

function HideMenus()
{
	if (MonthIsVisible != 2)
	{
		MonthListStyle.visibility='hidden';
		MonthIsVisible	=	0;
	}
	if (TotalIsVisible != 2)
	{
		TotalListStyle.visibility='hidden';
		TotalIsVisible	=	0;
	}
	if (OtherIsVisible != 2)
	{
		OtherListStyle.visibility='hidden';
		OtherIsVisible	=	0;
	}
}
function PreserveMenu(MenuName)
{
	if (MenuName == "total")
	{
		TotalIsVisible	=	2;
	}
	else if (MenuName == "month")
	{
		MonthIsVisible	=	2;
	}
	else if (MenuName == "other")
	{
		OtherIsVisible	=	2;
	}
}
function KillMenu(MenuName)
{
	if (MenuName == 0)
	{
		TotalListStyle.visibility='hidden';
		TotalIsVisible	=	0;
	}
	else 
	{
		MonthListStyle.visibility='hidden';
		MonthIsVisible	=	0;
	}
}

function display(id)
{
	if (document.layers)
	{
		document.layers[id].display = (document.layers[id].display != 'block') ? 'block' : 'none';
	}
	else if (document.all)
	{
		document.all[id].style.display = (document.all[id].style.display != 'block') ? 'block'	: 'none';
	}
	else if (document.getElementById)
	{
		document.getElementById(id).style.display = (document.getElementById(id).style.display != 'block') ? 'block' : 'none';
	}
}