function Switch($elem, $root, $count) 
{
	// Hide all elements
	for(i=0; i<$count; i++)
	{
		thecontainer = document.getElementById($root + i);
		thecontainer.style.display = 'none';
	}

	// Show the new element
	thecontainer = document.getElementById($elem);
	thecontainer.style.display = 'block';
}