function clickTab (tabid) {
	
	var chunks = tabid.split('-');
	var unique = chunks[0];
	var thisTab = document.getElementById(tabid);
	var thisTabCount = chunks[1].substring(1);
	
	if (thisTab.className == 'tabDark') return;
	
	// Find the parent tr, and all siblings
	var daddy = thisTab.parentNode;
	var bros = daddy.childNodes;
	var numTabs = (bros.length - 1) / 2;
	var broClass;
	var thisBro = (thisTabCount*2) + 1;
	
	// Reset the whole tab strip to unselected
	for (i=0;i<bros.length;i++) {
		broClass = bros[i].className;
		if (broClass == 'tabLeftDark') {
			bros[i].className = 'tabLeftLight';
		} else if (broClass == 'tabDark') {
			bros[i].className = 'tabLight';
		} else if (broClass == 'tabRightDark') {
			bros[i].className = 'tabRightLight';
		} else if (broClass.substring(0,7) == 'tabJoin') {
			bros[i].className = 'tabJoin00';
		}
	}
	
	// Alter the tab, as well as the left and right ends
	bros[thisBro].className = 'tabDark';
	if (bros[thisBro-1].className == 'tabLeftLight') {
		bros[thisBro-1].className = 'tabLeftDark';
	} else {
		bros[thisBro-1].className = 'tabJoin01';
	}
	if (bros[thisBro+1].className == 'tabRightLight') {
		bros[thisBro+1].className = 'tabRightDark';
	} else {
		bros[thisBro+1].className = 'tabJoin10';
	}
	
	// Last, hide the current content and show the new one
	for (i=0;i<numTabs;i++){
		if (i==thisTabCount) {
			document.getElementById(unique+'-f'+i).style.display = 'block';
		} else {
			document.getElementById(unique+'-f'+i).style.display = 'none';
		}
	}
	
}
