// JavaScript Document
function swapTab(toTab)
{
	//Change the tabs: a minimum of two tabs required or this function will fail
	setClassName('tab_1', (toTab == 'section_1' ? 'active' : ''));
	setClassName('tab_2', (toTab == 'section_2' ? 'active' : ''));
	if (document.getElementById('tab_3')) setClassName('tab_3', (toTab == 'section_3' ? 'active' : ''));
	if (document.getElementById('tab_4')) setClassName('tab_4', (toTab == 'section_4' ? 'active' : ''));
	if (document.getElementById('tab_5')) setClassName('tab_5', (toTab == 'section_5' ? 'active' : ''));
	if (document.getElementById('tab_6')) setClassName('tab_6', (toTab == 'section_6' ? 'active' : ''));
	if (document.getElementById('tab_7')) setClassName('tab_7', (toTab == 'section_7' ? 'active' : ''));
	//Show and hide appropriate section
	showHideTabContent('section_1', (toTab == 'section_1'));
	showHideTabContent('section_2', (toTab == 'section_2'));
	if (document.getElementById('tab_3')) showHideTabContent('section_3', (toTab == 'section_3'));
	if (document.getElementById('tab_4')) showHideTabContent('section_4', (toTab == 'section_4'));
	if (document.getElementById('tab_5')) showHideTabContent('section_5', (toTab == 'section_5'));
	if (document.getElementById('tab_6')) showHideTabContent('section_6', (toTab == 'section_6'));
	if (document.getElementById('tab_7')) showHideTabContent('section_7', (toTab == 'section_7'));
}
function setClassName(tabName, newClassName)
{
	toTab=tabName;
	elm = document.getElementById(tabName);
	elm.className = newClassName;
}

function showHideTabContent(idName, showIt)
{
	section = document.getElementById(idName);
	section.style.display = (showIt ? '' : 'none');
	section.style.visibility = (showIt ? 'visible' : 'hidden');
}

