/**
 * @author mike
 * 
 * Simple Javascript to display a random quote in an HTML page. 
 * 
 * Usage: 
 *  	1) Include the Javascript file in the HTML page, like so:
 *  		<script src="quotations.js"></script>
 *  	2) Include the CSS stylesheet in the HTML page, like so:
 *  		<link rel="stylesheet" type="text/css" href="quotation.css" />
 *  	3) Create an element within the HTML page with an id of "quotation", like so:
 *  		<div id="quotation"></div>
 *  	4) Call the "loadQuote()" function when the page loads, like so:
 *  		<body onload="loadQuote();">
 *  
 *  To add more quotations just add a new element to the fwRandomQuote array.
 *  The simplest way to do this is to copy one of the other elements. Then paste
 *  it below the last element. Then increment the index number and change
 *  the text contained within the quotes.
 */

function QuoteRandomNumber()
{
	fwRnd.seed = (fwRnd.seed*fwRnd.a+fwRnd.c)%fwRnd.m;
	return fwRnd.seed/fwRnd.m;
}
var fwRnd=new Object;
fwRnd.m=714025;fwRnd.a=4096;fwRnd.c=150889;
fwRnd.seed = (new Date()).getTime()%fwRnd.m;

function QuoteRandomNumberInt(max,last)
{
	if (max < 2) return max; 
	var result = Math.floor(QuoteRandomNumber()*max-1)+1;
	while(last && result == last)
		result = Math.floor(QuoteRandomNumber()*max-1)+1;
	return result;
}

var fwRandomQuote= new Array();

fwRandomQuote[0] = "You have provided us with 8 years of exceptional service, redefining the meaning of customer service. -Cathy M";
fwRandomQuote[1] = "We appreciate your help with this and look forward to working with you for a long time to come! -John D";
fwRandomQuote[2] = "Thanks a bunch for all you do. You and the rest of NextLevel rock! -John K";
fwRandomQuote[3] = "Thanks guys! For the always seamless way you do things. -Leigh L";
fwRandomQuote[4] = "The new wired T1 is so much better than the wireless solution we had. Thanks again! -Kris K";
fwRandomQuote[5] = "You can use me for a rave performance review any time you need a referral. -Charles C";
fwRandomQuote[6] = "No problems. No issues. You were the only ones that came through 110%! -Adrian H";
fwRandomQuote[7] = "NextLevel Internet has truly earned my respect and future business. -Cynthia C";
fwRandomQuote[8] = "NextLevel and your guys are the best ISP I have EVER experienced. -Mike S";
fwRandomQuote[9] = "I would not trust any other provider with our customers' networks. I put my name to them. -Jim H";

function loadQuote() {
	var cell = document.getElementById("quotation");
	var index = QuoteRandomNumberInt(fwRandomQuote.length);
	var quotation = fwRandomQuote[index];
	cell.innerHTML = quotation;
}

