// quotes.js -- Javascript quote insertion functionality for Inauguration Phase I site

window.quotesArray = new Array(
	"If you want others to be happy, practice compassion. If you want to be happy, practice compassion.", 
	"Until he extends his circle of compassion to include all living things, man will not himself find peace.", 
	"Without a sense of caring, there can be no sense of community.", 
	"Tell me and I forget. Teach me and I remember. Involve me and I learn.", 
	"The quality of a person\'s life is in direct proportion to their commitment to excellence, regardless of their chosen field of endeavor."
);

window.speakersArray = new Array(
	"The Dalai Lama",
	"Albert Schweitzer",
	"Anthony J. D\'Angelo", 
	"Ben Franklin", 	
	"Vincent T. Lombardi"
);

function addQuote() {
	randomNum = Math.random() * (window.quotesArray.length - 1);
	randomNum = Math.round(randomNum);
	
	quoteEl = document.getElementById("quote");
	quoteText = document.createTextNode("“" + window.quotesArray[randomNum] + "”");
	quoteEl.appendChild(quoteText);
	
	citeEl = document.getElementById("quote-cite").firstChild;
	citeText = document.createTextNode(window.speakersArray[randomNum]);
	citeEl.appendChild(citeText);
}