/*
	Tabs script by Dwight Brown
	Copyright (C) 2005 Dwight Brown
	Last Revision: 2005-09-08
*/

var activeTabObj     = null;
var activeContentObj = null;
//tabActivate ( document.getElementById( {ElementId} ) );

// Execute this function OnLoad
function tabsInitialize ( tabObjectId, tabStartId, tabLoadingMessageId )
{
	if ( tabLoadingMessageId != undefined && tabLoadingMessageId != null )
	{
		document.getElementById(tabLoadingMessageId).style.display = 'none';
	}
	document.getElementById(tabObjectId).style.visibility = 'visible';
	tabActivate ( document.getElementById(tabStartId) );
}

function tabActivate ( tabId, contentId )
{
	tabObj = document.getElementById(tabId);
	contentObj = document.getElementById(contentId);
	
	if ( tabObj == undefined || tabObj == null ) return;
	
	if ( activeTabObj != undefined && activeTabObj != null )
	{
		activeTabObj.className = 'default';
		activeContentObj.className = 'hidden';
	}
	
	tabObj.className = 'active';
	contentObj.className = 'visible';
	
	activeTabObj = tabObj;
	activeContentObj = contentObj;
}