var openedTab = null;
var selectedTab = null;

function swapTabs(tabId, liId)
{
	var lastUS = tabId.lastIndexOf("_")+1;
	var prodID = tabId.substring(lastUS);
	var tabNum = tabId.substring(8,lastUS-1);
	
	for (var i=1;i<=5;i++)
	{
		openedTab = document.getElementById( 'tabView_' + i + '_' + prodID );
		if (openedTab) openedTab.style.display = 'none'; 
		selectedTab = document.getElementById( 'tab_' + i + '_' + prodID );
		if (selectedTab) selectedTab.className = 'notSelected';
	}
	
	openedTab = document.getElementById( tabId );
	openedTab.style.display = 'block';
	selectedTab = document.getElementById( liId );
	selectedTab.className = 'selected';
}
