/*
 * Function: fnInitTabs
 * Purpose:  Init spryspell tabs
 * Returns:  -
 * Inputs:   -
 * Errors:   -
 */
fnInitTabs = function ()
{
	YAHOO.util.Event.addListener('tab_web_label', "click", fnTabSwitch, 'web'); 
	YAHOO.util.Event.addListener('tab_local_label', "click", fnTabSwitch, 'local'); 
}

/*
 * Function: fnTabSwitch
 * Purpose:  Switch the display tabs
 * Returns:  -
 * Inputs:   event:e - Action event object
 *           string:sTarget - The tab to be used
 * Errors:   -
 */
fnTabSwitch = function ( e, sTarget )
{
	var nLabelWeb = document.getElementById('tab_web_label');
	var nLabelLocal = document.getElementById('tab_local_label');
	
	var nContentWeb = document.getElementById('tab_web_content');
	var nContentLocal = document.getElementById('tab_local_content');
	
	if ( sTarget == 'local' )
	{
		nLabelWeb.className = '';
		nLabelLocal.className = 'active';
		
		nContentWeb.style.display = "none";
		nContentLocal.style.display = "block";
	}
	else
	{
		nLabelWeb.className = 'active';
		nLabelLocal.className = '';
		
		nContentWeb.style.display = "block";
		nContentLocal.style.display = "none";	
	}
}

/* INIT */
YAHOO.util.Event.onContentReady('fw_content', fnInitTabs, null);