///////////////////////////////////////////////////////// Init ////////////////////////////////////////////////////////

var testimonials = new Array();
var fullTestimonials = new Array();
var currentTestimonial = -1;

//////////////////////////////////////////////////////// Settings ////////////////////////////////////////////////////////

var scrollRate = 10;  //seconds
var testimonialDivId = "mytestimonial";
var testimonialsDivId = "mytestimonials";

testimonials[testimonials.length] = 
"With each and every order that is completed my confidence in your company\'s ability to meet " +
"our growing needs is fulfilled. Often time\'s words of praise go unnoticed, however, I would " +
"willingly refer your company to others in the estimating industry. -- Michael W.";

fullTestimonials[fullTestimonials.length] = 
"\"<i>With each and every order that is completed my confidence in your company\'s ability to meet " +
"our growing needs is fulfilled. Often time\'s words of praise go unnoticed, however, I would " +
"willingly refer your company to others in the estimating industry.</i>\"<br/><b>-- Michael W.</b>";

testimonials[testimonials.length] = 
"GeoEstimator is great if you're in a hurry and want results fast! It's simple, easy to use, and " +
"very user friendly.  The support staff is efficient, helpful and courteous.  They seem eager to " +
"go the extra mile! -- Daniel P.";

fullTestimonials[fullTestimonials.length] = 
"\"<i>GeoEstimator is great if you're in a hurry and want results fast! It's simple, easy to use, and " +
"very user friendly.  The support staff is efficient, helpful and courteous.  They seem eager to " +
"go the extra mile!</i>\"<br/><b>-- Daniel P.</b>";

testimonials[testimonials.length] = 
"I have found the folks at GeoEstimaor to provide timely, accurate and cost effective reports.  " +
"Their system is easy to use and it my pleasure to unconditionally recommend their services. -- Bill S.";

fullTestimonials[fullTestimonials.length] = 
"\"<i>I have found the folks at GeoEstimaor to provide timely, accurate and cost effective reports.  " +
"Their system is easy to use and it my pleasure to unconditionally recommend their services.</i>\"<br/><b>-- Bill S.</b>";

testimonials[testimonials.length] = 
"I would like to thank you and your company for all the great work that you have done and will " +
"continue to do. Our company has been completely satisfied with GeoEstimator's exceptional service " +
"coupled with a friendly and helpful staff. -- AAR";

fullTestimonials[fullTestimonials.length] = 
"\"<i>I would like to thank you and your company for all the great work that you have done and will " +
"continue to do. Our company has been completely satisfied with GeoEstimator's exceptional service " +
"coupled with a friendly and helpful staff.</i>\"<br/><b>-- AAR</b>";

testimonials[testimonials.length] = 
"We have become one of the top 10 roofing companies in our region and we owe it all to Geoestimator. " +
"The orders are easy to place, are processed quickly and are easy to read and understand - and our clients " +
"love the satellite imagery picture of their home and the ease of understanding the report! -- Margarita & Joshua";

fullTestimonials[fullTestimonials.length] = 
"\"<i>After moving our company across the country, we felt like we were starting all over again, but with " +
"Geoestimator we quickly gained a competitive edge over the market place. It's the #1 reason we are as " +
"successful as we are in such a short period of time. We have become one of the top 10 roofing companies " +
"in our region and we owe it all to Geoestimator. The orders are easy to place, are processed quickly " +
"and are easy to read and understand - and our clients love the satellite imagery picture of their home and " +
"the ease of understanding the report! Our success would not have been possible without Geoestimator!</i>\"<br/>" +
"<b>-- Margarita & Joshua</b>";

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function get_object(id)
{
	var object = null;
	if (document.layers)
	{
		object = document.layers[id];
	}
	else if (document.all)
	{
		object = document.all[id];
	}
	else if (document.getElementById)
	{
		object = document.getElementById(id);
	}
	return object;
}

function displayFullTestimonials()
{
	var myDiv = get_object(testimonialsDivId);
	
	if(myDiv != null)
	{
		for(var i=0; i<fullTestimonials.length; i++)
		{
			myDiv.innerHTML += "<p>" + fullTestimonials[i] + "</p><br/>";
		}
	}
}

function scrollTestimonials()
{
	var myDiv = get_object(testimonialDivId);
	
	if(myDiv != null)
	{
		var randomnumber;
		
		do
		{
			randomnumber = Math.floor(Math.random()*testimonials.length);
		}
		while(randomnumber == currentTestimonial)
		
		currentTestimonial = randomnumber;
		
		myDiv.innerHTML = testimonials[currentTestimonial];
		
		setTimeout("scrollTestimonials();",scrollRate * 1000);
	}
}