/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this script and the associated (x)html
is available at http://www.stunicholls.com/various/tabbed_pages.html
Copyright (c) 2005-2007 Stu Nicholls. All rights reserved.
This script and the associated (x)html may be modified in any 
way to fit your requirements.

Modified: March 2008 / University of North Carolina - General Administration
=================================================================== */

function tabClick(resultID, tabID, contentID) 
{
	var resultElement = document.getElementById(resultID);
	var tabElement = document.getElementById(tabID);
	var contentElement = document.getElementById(contentID);
	if( !resultElement || !tabElement || !contentElement )
		return( false );
	var getEls = resultElement.getElementsByTagName('DIV');

	for (var z=0; z<getEls.length; z++) {
		getEls[z].className=getEls[z].className.replace(/^show$/i, 'hide');
		getEls[z].className=getEls[z].className.replace(/^on$/i, 'off');
	}
	tabElement.className = 'on';
	contentElement.className = "show";
	return true;
}

