var intCurrentBlockID = -1;
if(navigator.userAgent.indexOf('Opera') != -1)
{
	var strRowDisplay = 'table-row';
}
else
{
	var strRowDisplay = 'block';
}


function Show(BlockID, strDisplay)
{
	document.getElementById(BlockID).style.display = strDisplay;
}



function Hide(BlockID)
{
	document.getElementById(BlockID).style.display = "none";
}


function ToggleSystem(intShowID, strDisplay)
{

	if(intCurrentBlockID != -1)
	{
		Hide(intCurrentBlockID);
	}

	if(intCurrentBlockID == intShowID)
	{
		Hide(intCurrentBlockID);
		intCurrentBlockID = -1;
	}
	else
	{
		Show(intShowID, strDisplay);
		intCurrentBlockID = intShowID;
	}
}

/*
	Toggle blocks so only one is displayed
*/
function Toggle(intShowID)
{
	ToggleSystem(intShowID, 'block');	
}


/*
	Toggle a specific block, whilst keeping others in tact
*/
function ToggleKeep(BlockID)
{
	strDisplay = document.getElementById(BlockID).style.display;
	
	if(strDisplay == 'none')
	{
		document.getElementById(BlockID).style.display = "block";
	}
	else
	{
		document.getElementById(BlockID).style.display = "none";
	}
}


function ToggleRow(intShowID)
{
	ToggleSystem(intShowID, strRowDisplay);
}

function StartToggler()
{
	var intStartBlockID = cookieGet('ToggleMenu');
	if(intStartBlockID != undefined && intStartBlockID != '' )
	{
		Toggle(intStartBlockID);
	}
}