var currPane;
var currPaneButton;

function setDivs()
{
	currPane = document.getElementById('pane_0');
	currPaneButton = document.getElementById('pane_0_button');
}

function hoverButton(id, color)
{
	
	button = document.getElementById(id + '_button');
	if (button != currPaneButton)
		button.style.backgroundColor = color;	
}
function showPane(id, anchorName)
{
	if (!currPane && !currPaneButton)
		setDivs();
	
	currPane.style.display = 'none';
	
	newPane = document.getElementById(id);
	newPane.style.display = 'block';
	
	//butons
	
	currPaneButton.style.backgroundColor = 'white';	
	newPaneButton = document.getElementById(id + '_button');
	newPaneButton.style.backgroundColor = '#EFEEEE';
	
	//set the current pane
	currPane = newPane;
	currPaneButton = newPaneButton;
	
	if (typeof anchorName != "undefined")
	{
		location.href = '#'+anchorName;	
	}
	
}