//**************************************************************************************
//Name:             getRandomQuote()
//Description:      Returns a random Envisa client quote extolling our virtues.
//Input:            (string)	category		Theme of the quote--can be any category 
//                  							listed in the second dimension of the 
//                  (string)       				client_quotes array 
//												(ecommerce, emarketing, bizintel, etc.)
//
//Output:			(string)					randomly selected matching client quote
//04-23-07			PDD 
//**************************************************************************************

var client_quotes = new Array();

//Build a two dimensional array so the second dimension can store a tag to categorize the quote.
for (i=0; i<10; i++)	{
	client_quotes[i]= new Array(1);
						}

//Client quotes strings below are pipe-delimited:
//"\"quote_text\"|client_company|name and position"
client_quotes[0][0] = "\"Envisa helped increase our site capacity by a factor of 10 before the holiday season, while also making the system more stable and reliable.\"|SmartBargains|Lawrence Chiango, VP Technology";
client_quotes[1][0] = "\"Since launch, we've seen a 60% improvement in performance along with significant gains in incremental business.\"|Smith+Noble|Jim Nazario, Dir Mktg Ops";
client_quotes[2][0] = "\"Envisa was instrumental in designing and engineering our highly flexible, promotions-ready, internationalized e-commerce site.\"|VistaPrint|Robert Keane, CEO";
client_quotes[3][0] = "\"Envisa put in the extra time and effort to make sure everything was perfectly thought through and well-engineered. This type of commitment is all too rare.\"|Smith+Noble|Claire Gordon, Co-President";
client_quotes[4][0] = "\"We chose [Envisa] for our redesign because [they] are leaders in their field, and possess a wealth of experience, knowledge, and technology innovation that addressed our highly complex business requirements.\"|Smith+Noble|Tony Morris, e-Commerce Manager" ;
client_quotes[5][0] = "\"They are true professionals and understand the value of customer-centric solutions.\"|Smith+Noble|Tony Morris, e-Commerce Manager";
client_quotes[6][0] = "\"We turned to Envisa to help us address key, fundamental issues and improve the delivery of content to our customers without hindering performance. In the short time since the [Envisa] updated site has gone live, the project is proving itself successful, with up to a 60% increase in performance, as well as a significant lift in incremental business. Hands down, Envisa was the best and right choice.\"|Smith+Noble|Jim Nazario, Dir Mktg Ops";
client_quotes[7][0] = "\"With the Envisa reporting solution in place, the speed, flexibility and accuracy with which we can now analyze our business is astounding.\"|SmartBargains|Mark Oliver, Director of Marketplace Development";
client_quotes[8][0] = "\"While staying focused on some very aggressive goals, Envisa wasn't afraid to point out potential problems—and was eager to solve them to stay on track. I'd work with them again anytime!\"|ScanSoft Professional Services|Senior Director of User Interface Design"
client_quotes[9][0] = "\"The results from Envisa's match-back solution were staggering—the program will pay for itself within a year, if not sooner. Envisa was a pleasure to work with—they are a professional and very capable group.\"|Stonewall Kitchen|Joan Walsh, Director of Catalog Division" 

//Quote categories:
//List as many categories as you want to associate with a given quote separated by commas.
client_quotes[0][1] = "any, ecommerce, bizintegration";
client_quotes[1][1] = "any, ecommerce, bizintegration";
client_quotes[2][1] = "any, ecommerce, bizintegration";
client_quotes[3][1] = "any, ecommerce, emarketing, bizintel, bizintegration";
client_quotes[4][1] = "any, ecommerce, emarketing, bizintel, bizintegration";
client_quotes[5][1] = "any, ecommerce, emarketing, bizintel, bizintegration";
client_quotes[6][1] = "any, ecommerce, bizintegration";
client_quotes[7][1] = "any, bizintel";
client_quotes[8][1] = "any, bizintegration";
client_quotes[9][1] = "any, ecommerce, bizintel";

function getRandomQuote(category)	{

	var i=0;
	var possible_matches = new Array();
	var num_possible_matches=0;
	
	//Parse category indexes to make a list of all quote indexes valid for this category.
	for (i=0; i<=((client_quotes.length)-1); i++)	{
		if ( client_quotes[i][1].search(category) != -1 )	{
			possible_matches[num_possible_matches]=i;
			num_possible_matches++;
															}
													}
	minIndex = 0; 
	maxIndex = num_possible_matches-1; 
	
	randResult=Math.floor(Math.random()*(maxIndex-minIndex+1)+minIndex);
	return(client_quotes[possible_matches[randResult]][0]);
											}
	
function fwLoadMenus() {
    if (window.fw_menu_0) return;
    window.fw_menu_0 = new Menu("root",160,20,"Tahoma, Verdana, Helvetica, Arial, sans-serif",11,"#3060A6","#dfb163","#ffffff","#F1F1F1");
    fw_menu_0.addMenuItem("Our Company","location='page1.asp?id=3'");
    fw_menu_0.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>Leadership Team","location='page1.asp?id=53'");
    fw_menu_0.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>In the News","location='page1.asp?id=6'");
    fw_menu_0.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>Partners","location='page1.asp?id=5'");
    fw_menu_0.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>Join Envisa","location='page1.asp?id=7'");
    fw_menu_0.hideOnMouseOut=true;
    window.fw_menu_1 = new Menu("root",160,20,"Tahoma, Verdana, Helvetica, Arial, sans-serif",11,"#3060A6","#dfb163","#ffffff","#F1F1F1");
    fw_menu_1.addMenuItem("What We Do","location='page1.asp?id=15'");
    fw_menu_1.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>E-Commerce","location='page1.asp?id=16'");
    fw_menu_1.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>E-Marketing","location='page1.asp?id=17'");
    fw_menu_1.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>Business Intelligence","location='page1.asp?id=18'");
    fw_menu_1.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>Business Integration","location='page1.asp?id=19'");
    fw_menu_1.hideOnMouseOut=true;
    window.fw_menu_2 = new Menu("root",160,20,"Tahoma, Verdana, Helvetica, Arial, sans-serif",11,"#3060A6","#dfb163","#ffffff","#F1F1F1");
    fw_menu_2.addMenuItem("Our Clients","location='page1.asp?id=9'");
    fw_menu_2.addMenuItem("<img src='images/spacer.gif' width='6' height='13'>Featured Clients","location='page1.asp?id=32'");
    fw_menu_2.hideOnMouseOut=true;
    fw_menu_2.writeMenus();
} // fwLoadMenus()		
