﻿var tabIds = new Array();

function TabInitialise(elementId, current)
{
	getById(elementId).style.display = current ? 'block' : 'none';
	getById('li' + elementId).style.display = current ? 'block' : 'none';
	tabIds.push(elementId);
}

function TabChange(elementId)
{
	for(var count in tabIds)
	{
		if(tabIds[count] == elementId)
		{
			if(IEVersion() == -1)
			{
				$('#' + tabIds[count]).fadeIn();
			}
			else
			{
				getById(tabIds[count]).style.display = 'block';
			}

			getById('li' + tabIds[count]).style.display = 'block';
		}
		else
		{
			getById(tabIds[count]).style.display = 'none';
			getById('li' + tabIds[count]).style.display = 'none';
		}
	}
}

