
if (document.layers) {
	visible = 'show';
	hidden = 'hide';
	}
else if (document.getElementById) {
	visible = 'visible';
	hidden = 'hidden';
	}
else if (document.all) {
	visible = 'visible';
	hidden = 'hidden';
	}






//  this variable will help make the quotes more random.  no consecutive duplicate numbers.
var current_div = 'quote1';


//  to add more testimonials, just add another element to the array.  no need to modify the functions.
var quotes = new Array("quote1","quote2","quote3","quote4","quote5","quote6","quote7");




function hideQuotes() {
	var thisdiv = '';

	for (var i=0; i<quotes.length; i++) {
		var div = (quotes[i]);

		if (document.layers) thisdiv = document.layers[div];
		else if (document.getElementById) thisdiv = document.getElementById(div).style;
		else if (document.all) thisdiv = document.all(div).style;

		thisdiv.visibility = hidden;
	}
}

function showQuote() {
	var thisdiv = '';
	var x = Math.floor(Math.random()*quotes.length);    // generate a random number from 0 to the length of the array minus 1
	var div = quotes[x];

	while (current_div==div) {							// keep picking a new random number until it is different than current
		x = Math.floor(Math.random()*quotes.length);    // generate a random number from 0 to the length of the array minus 1
		div = quotes[x];
	}


	hideQuotes();

	if (document.layers) thisdiv = document.layers[div];
	else if (document.getElementById) thisdiv = document.getElementById(div);
	else if (document.all) thisdiv = document.all(div);

	thisdiv.style.visibility = visible;

	//  remember the ID for this DIV
	current_div = thisdiv.id;
	return current_div;
}

function showThisQuote(x) {
	var thisdiv = '';

	hideQuotes();

	if (document.layers) thisdiv = document.layers[x];
	else if (document.getElementById) thisdiv = document.getElementById(x);
	else if (document.all) thisdiv = document.all(x);

	thisdiv.style.visibility = visible;

	//  remember the ID for this DIV
	current_div = thisdiv.id;
	return current_div;
}
