/**************************************
 * ---- Class changing functions ---- *
 **************************************/

/*
 * Changes the CSS class of an element.
 */
function ChangeClass (theElement, theClass)
{
	// If the specified class is different to the current class, change it.
	if (theElement.className != theClass)
	{
		theElement.className = theClass;
	}
}

/*
 * Changes the CSS class of an element selected by id.
 */
function ChangeClassById (theId, theClass)
{
	// Get the element.
	theElement = document.getElementById (theId);

	// If the specified class is different to the current class, change it.
	if (theElement.className != theClass)
	{
		theElement.className = theClass;
	}
}

/*
 Specific function to toggle between the 'visible' and 'hidden' CSS classes.
 Selected by id.
*/
function ToggleVisibility (theId)
{
	// Get the element.
	theElement = document.getElementById (theId);

	// If the class is hidden, toggle it to visible.
	if (theElement.className == 'hidden')
	{
		theElement.className = 'visible';
	}
	// Otherwise toggle to hidden.
	else
	{
		theElement.className = 'hidden';
	}
}





function Nothing ()
{
}
