
function loadTab(strTabName, intMaxTabs, type) {	
	closeOtherTabs(strTabName, intMaxTabs, type);
	setDivStyle(strTabName, "current");
	if (type != 'Video') {
		setDivStyle(strTabName + "c", "tabEnclosed" + type);
	}
}

function closeOtherTabs(strTabName, intMaxTabs, type) {
	var strTabPrefix = strTabName.split("-")[0];
	for (i=1; i<=intMaxTabs; i++) {
		setDivStyle(strTabPrefix + "-" + i, "");
		if (type != 'Video') {
			setDivStyle(strTabPrefix + "-" + i + "c", "tabEnclosed" + type + " hidden");
		}
	}
}

function setDivStyle(strDivID, strClass) {	
	document.getElementById(strDivID).className = strClass;
}

function setVideoChannel(intTabNum, strChannel) {
	frames["videoChannels"].location.replace('/feed/video-thumbs.php?video-category=' + strChannel);
	loadTab('video-' + intTabNum, 4, 'Video');
}
