var quote = null;
var timer = 0;
var i = 999;

Event.observe(window, 'load', function() {
// Testimonial code
	quote = new Array(
	"<p><img src=\"images/index_quote.png\" />An effective and simple way to combine the freedom of handling today&rsquo;s mail tomorrow with the peace of mind in knowing urgent matters will find their way to you in time.<img src=\"images/index_small_quote.png\" /></p><p align=\"right\"><span class=\"name\">About.com</span></p>",
	"<p><img src=\"images/index_quote.png\" />I now check email two to three times a day, when my schedule permits. Email does not control me, I control it.<img src=\"images/index_small_quote.png\" /></p><p align=\"right\"><span class=\"name\">DidIGetThingsDone.com</span></p>",
	"<p><img src=\"images/index_quote.png\" />The online equivalent of having an administrative assistant screen your mail and only bother you for the important things.<img src=\"images/index_small_quote.png\" /></p><p align=\"right\"><span class=\"name\">Web Worker Daily</span></p>");
	clearTimeout(timer);
	timer = setTimeout( "fadeTestimonial();", 10000 );
	//getCountryName();
});
/*
function getCountryName() {
	new Ajax.Request('http://orchant.awayfind.com/country', {
		method: 'get',
		onSuccess: function(resp) {
			var json = resp.responseText.evalJSON();
		}
	});
}
*/
function fadeTestimonial() {
	$('quoteSpace').fade({ duration: 4.0 });
	clearTimeout(timer);
	timer = setTimeout( "appearTestimonial();", 4000 );
}
function appearTestimonial() {
	if (i >= quote.length-1) {i = 0;} else {i++;}
	$('quoteSpace').update(quote[i]);
	$('quoteSpace').appear({ duration: 4.0 });
	clearTimeout(timer);
	timer = setTimeout( "fadeTestimonial();", 10000 );
}
