// JavaScript Document
// Home Page(s) Quote js Code file - Loaded in table where Quote is located in HTML document   


// Get random number 
function Frandom(s, e)  { 								// random number function "s" through "e"
	var rNum = Math.round(Math.random() * (e - s) ) + s;
	return rNum;										// number s to e
}  // end function Frandom()


// Main Function 
function MainFunction()  {		
	//var now    = new Date();							// get the date
	var qIndex = Frandom(0, lastQuote);					// this moments's quote index - get random quote
	
	//qIndex = 7;  // for testing
	
	// format quote
	var newQuote = aQuote[qIndex] + '<br>' + '<div align="center">- ' + aAuthors[qIndex] + ' -<\/div>';		

	// write quote to HTML document
	document.write('<div class="minusTwo" align="center">quote for the moment<\/div><br>');
	
	document.write(newQuote);
	
} // end  function MainFunction()


 MainFunction();  									// Execution Starts Here


