﻿//It first changes tab CSS, then goes to the respective RSS feed
function GoTab(url, ajaxID, tabIndex, page) {
	selectTab(ajaxID, tabIndex);
	divAJAX(ajaxID, url + '?ajaxID=' + ajaxID + '&showcontent=true&page=' + page + '&tab=' + tabIndex);
}

function selectTab(ajaxID, tabIndex) {
	var totaltabs = document.getElementById(ajaxID).getAttribute('totalTabs');

	for (var x = 0; x < totaltabs; x++) {
		if (x == tabIndex) {
			document.getElementById(ajaxID + 'ADW1_dropdown' + x).style.display = 'inline';
			document.getElementById(ajaxID + 'ADW1_tab' + x).className = 'ADW1_aTabSelected';
		}
		else {
			document.getElementById(ajaxID + 'ADW1_dropdown' + x).style.display = 'none';
			document.getElementById(ajaxID + 'ADW1_tab' + x).className = 'ADW1_aTabUnSelected';
		}
	}

}
