var texts = new Array(
	"\"<em>We recovered $795,453 in the first ten months of our contract.  Since then, we have received an additional $678,421.  I highly recommend Reimbursement Counselors’ cost report review work.\"</em><div align=\"right\">--Mr. Jesse Hale, CFO, Nueces County Hospital District, Corpus Christi, Texas</div>",
	"\"<em>Reimbursement Counselors is professional, dependable and productive.  They helped us obtain a nice recovery and I recommend them to all.\"</em><div align=\"right\">--Mr. Saad Mikhail, CFO, Memorial Medical Center, Port Lavaca, Texas</div>",
	"\"<em>Reimbursement Counselors is helping us reach our financial goals for this year.\"</em><div align=\"right\">--Mr. Louis Willeke, Administrator/CEO, Refugio County Memorial Hospital, Refugio, Texas</div>");

var numTestimonials = 3;

var index=Math.floor(Math.random()*numTestimonials);;

function init() {
	var testDiv = document.getElementById('testimonials');
	testDiv.innerHTML = texts[index];
	window.setInterval("fadeOut()", 30000);
}

function displayMenu(){
	var menu = document.getElementById('serviceMenu');
	if(menu.style.display == 'none')
		menu.style.display = 'block';
	else
		menu.style.display = 'none';
}

function fadeOut(){
	new Effect.Opacity('testimonialTable', { duration: 1.0, transition: Effect.Transitions.linear, from: 1.0, to: 0 });
	window.setTimeout("fadeIn()", 1000);
}

function fadeIn(){
	var temp = index;
	while(index == temp)
		temp = Math.floor(Math.random()*numTestimonials);
	index = temp;
	var testDiv = document.getElementById('testimonials');
	testDiv.innerHTML = texts[index];
	new Effect.Opacity('testimonialTable', { duration: 0.5, transition: Effect.Transitions.linear, from: 0, to: 1.0 });
}