var texts = new Array(
	"<em>\"Every age has its problems, by solving which humanity is helped forward.\"</em><br><br>-- Heinrich Heine</div>",
	"<em>\"When you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind. It may be the beginning of knowledge, but you have scarcely, in your thoughts, advanced to the state of science.\"</em><br><br>-- William Thomson, <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The Lord Kelvin</div>",
	"<em>\"When performance is measured, performance improves. When performance is measured and reported back, the rate of improvement increases.\"</em><br><br>-- Thomas S. Monson</div>",
	"<em>\"The greatest thing in this world is not so much where we are, but in what direction we are moving\"</em><br><br>-- Oliver Wendell Holmes</div>",
	"<em>\"Statistical thinking will one day be as necessary for efficient citizenship as the ability to read and write.\"</em><br><br>-- H. G. Wells</div>",
	"<em>\"Six Sigma has become a key enabling skill ... of the next generation.\"</em><br><br>-- Stephen R. Covey</div>",
	"<em>\"If we can't express what we know in the form of numbers, we really don't know much about it. If we don't know much about it, we can't control it. If we can't control it, we are at the mercy of chance.\"</em><br><br>-- Mikel J. Harry</div>",
	"<em>\"In disquisitions of every kind there are certain primary truths or first principles upon which all subsequent reasonings must depend.\"</em><br><br>-- Alexander Hamilton</div>"
	);

var numQuotes = 8;

var index=Math.floor(Math.random()*numQuotes);;

function init() {
	var testDiv = document.getElementById('quotes');
	testDiv.innerHTML = texts[index];
	window.setInterval("fadeOut()", 20000);
}


function fadeOut(){
	new Effect.Opacity('quotebox', { 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()*numQuotes);
	index = temp;
	var testDiv = document.getElementById('quotes');
	testDiv.innerHTML = texts[index];
	new Effect.Opacity('quotebox', { duration: 0.5, transition: Effect.Transitions.linear, from: 0, to: 1.0 });
}
