/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */
/* Content Slider v1.0                                       */
/* =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= */

var conter=1;
var timerCount;
var maxHeaderlineCount = 10;
maxHeaderlineCount = maxHeaderlineCount+1;
function ShowNews(selectedItemIndex) {
stopTimer();
	for(i=1;i<maxHeaderlineCount;i++) {
		if(i!=selectedItemIndex) {
			document.getElementById('slideTB_'+i).style.display = 'none';
			document.getElementById('slideAR_'+i).className = '';
		} else {
			document.getElementById('slideTB_'+i).style.display = 'block';
			document.getElementById('slideAR_'+i).className = 'current';
		}
	}
}

function timerStart(conterNum) {
	if(conterNum!=-1)
	conter = conterNum;
	if(conter==maxHeaderlineCount) conter=1;
	for(i=1;i<maxHeaderlineCount;i++) {
		if(i!=conter) {
			document.getElementById('slideTB_'+i).style.display = 'none';
			document.getElementById('slideAR_'+i).className = '';
		} else {
			document.getElementById('slideTB_'+i).style.display = 'block';
			document.getElementById('slideAR_'+i).className = 'current';
		}
	}
	conter=conter+1;
	timerCount=setTimeout("timerStart(-1)",6000);
}
function stopTimer() {
	clearTimeout(timerCount);
}
timerStart(-1);
document.getElementById('slideTB_1').style.display = 'block';
document.getElementById('slideAR_1').className = 'current';

