// T1 functionality
	var stories = new Array('nbaT1Story1','nbaT1Story2','nbaT1Story3','nbaT1Story4');
	var rotate = null;
	var r = 1;

	function nbaRotateT1() {
		nbaShowT1(r);
		if (r < 4) {
			rotate = setTimeout('nbaRotateT1()',7000);
		} else if (r = 4) {
			r = 0;
			rotate = setTimeout('nbaRotateT1()',7000);
		}
		r++;
	}

	function nbaRotateT1Continue(){
		clearTimeout(rotate);
		rotate = null;

		//push to next position
		//r = ( (r+1) >= 1 && (r+1) <= 5) ? (r+1) : 1;
		nbaRotateT1();
	}
	function nbaSetPosition(oPosition){
		r = oPosition;
		//alert("position: " + r);
	}

	function nbaShowT1(n) {
	// changes visibility of current story
		for (i = 0; i < stories.length; i++) {
			if (document.getElementById(stories[i])) {
				document.getElementById(stories[i]).style.display = (('nbaT1Story' + n) == stories[i]) ? 'block':'none';
			}
		}

	// Gets current position of the array

	// changes class of current thumb
	var thumbs = document.getElementById('nbaT1Thumbs').getElementsByTagName('a');
		for (j = 0; j < thumbs.length; j++) {
			thumbs[j].className = ((j + 1) == n) ? 'nbaSelected':'';
		}

		//set the positon of the rotate array
		nbaSetPosition(n);
	}
window.onload = function (){
nbaRotateT1();
init();
}
