var tInterval = "";
var currentTestimonial = 0;
var numTestimonials = 0;

function tInitialize()
{
    currentTestimonial = Math.round(Math.random()*(numTestimonials));
    startInterval();
}

function startInterval()
{
    tRotate();
    tInterval = window.setInterval('tRotate()', 10000);
} 

function stopInterval()
{
    window.clearInterval (tInterval);
    tInterval="";
}

function tRotate()
{
	tHideAll();
	currentTestimonial++;
	if(currentTestimonial>numTestimonials){currentTestimonial=1;}
	document.getElementById('test_'+currentTestimonial).style.display = "block";
}

function tHideAll()
{
	var i;
	
	for(i=1;i<=numTestimonials;i++)
		document.getElementById('test_'+i).style.display = "none";
}
