// PAGINATION FUNCTIONS

function showMediaPage(pageNum, totalPages) { // hide all page div's except for pageNum

	selectedPage = 'p' + pageNum;
	selectedPageButtonB = 'pageButtonB' + pageNum;
	selectedPageButtonT = 'pageButtonT' + pageNum;
	// hide all the wrong ones
	for (i=1; i<=totalPages; i++) {
		whichPage = 'p' + i;
		whichButtonB = 'pageButtonB' + i;
		whichButtonT = 'pageButtonT' + i;
		if (i == pageNum) {
			// show the right ones
			document.getElementById(selectedPage).style.display = 'block';
			document.getElementById(selectedPageButtonB).style.backgroundColor = '#873131';
			document.getElementById(selectedPageButtonT).style.backgroundColor = '#873131';
		} else {
			// hide the others
			document.getElementById(whichPage).style.display = 'none';
			document.getElementById(whichButtonB).style.backgroundColor = '#421414';
			document.getElementById(whichButtonT).style.backgroundColor = '#421414';
		}
	}

}

function showAllMediaPages(totalPages) {
	for (i=1; i<=totalPages; i++) {
		whichPage = 'p' + i;
		whichButtonB = 'pageButtonB' + i;
		whichButtonT = 'pageButtonT' + i;
		document.getElementById(whichPage).style.display = 'block';
		document.getElementById(whichButtonB).style.backgroundColor = '#421414';
		document.getElementById(whichButtonT).style.backgroundColor = '#421414';
	}
	hideDiv('mediaPaginateT');
	hideDiv('mediaPaginateB');
	
}

