// JavaScript Document, written by Brian Bender, Nov 2009
// Functionality: rotates randomly through a list of quotes, with ability to select a specific quote if required

var speed = 8000;
var timeout;
var quotetext;
var lastquote = -1;

//sets automatic quotes rolling. to call, run this function onload from body, and have a div
//in the site with an id of 'quote'
function autoquote(){ 
	quotetext = nextquote();
	timeout = setTimeout("autoquote()",speed);	
	document.getElementById("quote").innerHTML = quotetext;
}

//stops timer, picks new quote, resume timer -- if value 'i' passed to the form, goes to quote 'i'
//in the array and stops quote rotation
function newquote(i){	
	clearTimeout(timeout);
	if (typeof i == 'undefined' )  // If no quotenum is passed to the array, use a random quote
	{
		i = 'default';
		quotetext = nextquote();
  		document.getElementById("quote").innerHTML = quotetext;
		timeout = setTimeout("autoquote()",speed);
	}
	else
	{
		quotetext = nextquote(i);
		document.getElementById("quote").innerHTML = quotetext;
		if (i != -1) document.getElementById("next").innerHTML = '';
	}
}

function nextquote(quotenum){
	var rand_text = new Array();	
	
	// Add new quotes to this array. Please follow the established format of:
	// rand_text[nextnum] = 'formatted text';
	// with formatted text including <em> markup around the quote, two <br /> tags 
	// after the quote, one <br /> tag after each line in the attributed person's title
	// ** make sure to replace javascript special characters with an appropriate replacement character **
	rand_text[0] = '<em>&quot;You guys are the best. Without your team, we could not move forward and continue to grow our company the way we want to.&quot;</em><br /><br />Sue Ann Croft<br />Controller<br />Northwest Podiatric Laboratory';
	rand_text[1] = '<em>&quot;Steve [TRG Consultant] has done so much for us - everything from data migration to custom supporting application written completely outside of Microsoft Dynamics. We owe him a great debt for the amazing work he has done - he is simply the finest software developer that I have ever known.&quot;</em><br /><br />Jason Wojtyna<br />IT Consultant<br />Healthfirst';
	rand_text[2] = '<em>&quot;For us, this implementation was nothing short of revolutionary. We went from a heavily manual, decentralized, non-standardized, periodic system to an automated, centralized, standardized, real-time system. These were huge changes. It was not easy. Fortunately we picked very good software and a very good implementation partner.&quot;</em><br /><br />Kent C. Gordon<br />Vice President and Controller<br />ARUP Laboratories';
	rand_text[3] = '<em>&quot;The TRG culture must include a strong commitment to treating their staff with respect and dignity. Every single individual we&acute;ve encountered in our interactions with TRG has a passion for providing excellent service and a heartfelt investment in our success.&quot;</em><br /><br />Shannon van Oppen <br />Director of HR/IT <br />Farestart';
	rand_text[4] ='<em>&quot;The Resource Group works quickly, efficiently, and most importantly, thoroughly checks and tests their customizations and programming before implementation to ensure a smooth transition.&quot;</em><br /><br />Elaine MacDougall<br />Accounting Manager<br />AAA Washington';
	rand_text[5] ='<em>&quot;The Resource Group has always been responsive and helpful during our long relationship. They respond quickly to problems and advise pertinent solutions. I highly recommend them as a reseller and implementer of Microsoft Dynamics GP software and related products.&quot;</em><br /><br />Peggy O&acute;Reilly<br />VP, Finance and Operations<br />Attenex';
	rand_text[6] ='<em>&quot;We have had to call the Resource Group on more than one occasion with questions and they have always been most helpful. Everyone takes an interest in our problem and it seems like a team effort to solve it. More often than not we can get our problem solved or question answered the same day.&quot;</em><br /><br />Lisa M. Kendall, CPA<br />Controller<br />Bellevue Club';
	rand_text[7] ='<em>&quot;Chris&acute; [TRG Consultant] knowledge of the application material as well as his experience with software and networking showed as he demonstrated diligence and commitment when troubleshooting various problems during the upgrade.&quot;</em><br /><br />Wayne C. Blair<br />President<br />Blair &amp; Company';
	rand_text[8] ='<em>&quot;The platform of Dynamics backed up by the incredible resources and power of Microsoft is a package that will continue to perform at peak level. Add to this the outstanding group of people at The Resource Group, and you will accomplish whatever you set out to do.&quot;</em><br /><br />Anne L. Clune<br />Corporate Account<br />Cascade Fishing';
	rand_text[9] ='<em>&quot;The transition went so smoothly that it was anticlimactic. There were no critical issues. After their past experience with the other solution, people were surprised.&quot;</em><br /><br />Clayton King<br />Manager of Business Solutions<br />Casey Family Programs'; 
	rand_text[10] ='<em>&quot;It was amazing what we achieved in five months. And it actually cost us less to implement our Microsoft Great Plains Solution [Dynamics GP] than it would have to upgrade to the next version of PeopleSoft.&quot;</em><br /><br />Jim Fimiani<br />Director of Accounting Operations<br />Casey Family Programs';
	rand_text[11] ='<em>&quot;The Resource Group has consistently provided Comprehensive Mental Health with exceptional service and a positive attitude in meeting our difficult issues.&quot;</em><br /><br />Lisa A. Burke<br />Management Accountant<br />Central Washington Comprehensive Mental Health';
	rand_text[12] ='<em>&quot;I feel like Marty [TRG President] and his staff members are family and that they want Clark Nuber to succeed as much as we do.&quot;</em><br /><br />Steve Shulze<br />Director of Accounting<br />Clark Nuber';
	rand_text[13] ='<em>&quot;On all matters, The Resource Group personnel have been responsive, helpful, friendly, and fun to work with.&quot;</em><br /><br />John Hackett<br />VP of Finance &amp; Administration <br />Douglass Interior Products';
	rand_text[14] ='<em>&quot;The Resource Group has definitely been a major partner in our organization&acute;s significant growth in preparing and speedily distributing accurate financial information.&quot;</em><br /><br />Robert L. van Winkle<br />Senior Financial Analyst<br />Emerald Heights';
	rand_text[15] ='<em>&quot;It&acute;s been great working with TRG converting to Dynamics from QuickBooks. From the initial contact of Joe Iudice [TRG Account Executive], we&acute;ve appreciated the professionalism and respect of each staff member we&acute;ve come in contact with.&quot;</em><br /><br />Brian M. Weiss<br />Project Manager<br />Global Event Services';
	rand_text[16] ='<em>&quot;Great Plains [Dynamics GP] has been a good system for us, but our satisfaction is due in large part to the efforts, support, and professionalism of The Resource Group.&quot;</em><br /><br />Mary L Herem, CPA<br />Finance Director <br />Greater Lakes Mental Healthcare';
	rand_text[17] ='<em>&quot;The baseline Microsoft Dynamics project had many of the features we desired in a new accounting system, but it required extensive modification to fit the complicated business model of Healthfirst. Your team did a phenomenal job on all phases of the project, and even the often treacherous go live process was very smooth.&quot;</em><br /><br />Thomas J. Schulstad<br /> President/CEO<br />  Healthfirst Corporation';
	rand_text[18] ='<em>&quot;I demand a very attentive support staff to help me solve the problems or technical difficulties we encounter. I can honestly and enthusiastically say that your team always meets those demands with technical expertise and a smile.&quot;</em><br /><br />Travis R. Huismm, CPA<br />Director of Finance<br />Janicki Industries';
	rand_text[19] ='<em>&quot;Since our startup, we have exchanged phone calls with The Resource Group for training, clarification, and general support. They are a proven company that employs a group of people with superior knowledge of business, accounting, and technical background. We are very happy with our decision to grow our business with Microsoft Great Plains [Dynamics GP] and The Resource Group.&quot;</em><br /><br />Jennifer Adelmann<br />LeMond Fitness';
	rand_text[20] ='<em>&quot;The Resource Group has been the best software implementation company I have ever worked with and will be the first company I call should anything new be needed or customized.&quot;</em><br /><br />David Joyce<br />Controller<br />LINK Conference Service';
	rand_text[21] ='<em>&quot;...one of the great benefits of working with the Resource Group has been the high quality training they offer in their Renton office. These sessions gave our team a solid understanding of each of the modules we trained in, including General Ledger, AP, FRx Reporting, and Smartlist Builder. We give our unqualified endorsement to The Resource Group as a highly professional and effective consulting firm.&quot;</em><br /><br />Philip M. Bishop<br />Chief Financial Officer <br />Mars Hill Graduate School';
	rand_text[22] ='<em>&quot;The main reason I chose Great Plains [Dynamics GP] was the confidence and trust I have in The Resource Group. They simply would never recommend or sell a product that was inappropriate for your business.&quot;</em><br /><br />Russell P. Moes<br />Controller<br />Meadow Lake Resort';
	rand_text[23] ='<em>&quot;By far the best move we ever made! The setup, training, and support we have received from TRG has exceeded our expectations, and been better than any I have experienced in my twenty years of accounting.&quot;</em><br /><br />David B. Martin, CPA<br />CFO/Controller<br />Myers Family Limited Partnership';
	rand_text[24] ='<em>&quot;The training we received was outstanding and the support we get when needed is always fast and easy to understand. It has been a pleasure to do business with The Resource Group and we look forward to working with them as time goes on.&quot;</em><br /><br />Becky Todd<br />Naverus';
	rand_text[25] ='<em>&quot;Dynamics GP is a powerful and effective accounting program with lots of versatility when needed. When it comes to the combination of Dynamics GP and The Resource Group, a business would not find a better solution for their accounting solutions provider.&quot;</em><br /><br />Randall Farris<br />Business Solutions Manager<br />Network Business Systems';
	rand_text[26] ='<em>&quot;We strongly recommend Great Plains [Dynamics GP] to any company requiring a robust accounting package, and The Resource Group as the partner to manage the installation.&quot;</em><br /><br />Laura Wildfong, CEO<br />Northwest Nurseries';
	rand_text[27] ='<em>&quot;As our company continues to grow and with our desire to become more responsive to our customers&acute; needs, it excites us to have the power and technology of Microsoft and The Resource Group behind us.&quot;</em><br /><br />Sue Ann Croft<br />Controller <br />Northwest Podiatric Laboratory';
	rand_text[28] ='<em>&quot;We have appreciated the prompt attention to our technical needs and the well organized call response system that The Resource Group has in place. It is with great pleasure that we recommend The Resource Group to anyone using Dynamics software.&quot;</em><br /><br />Julie Bullock<br />Accounting Coordinator<br />Pacific Cataract &amp; Laser Institute';
	rand_text[29] ='<em>&quot;The Resource Group excels at keeping their customers informed with technology and upcoming events. As a customer, we feel knowledgeable and aware of our options... We feel that our account is important to The Resource Group no matter how big or small our project is.&quot;</em><br /><br />Debbie Lodge<br />Director of Accounting<br />PRO Sports Club';
	rand_text[30] ='<em>&quot;All support provided for learning and improving skills for utilizing Microsoft Dynamics GP have streamlined Seaport&acute;s daily operations of Accounts Payable, Accounts Receivable Management, and financial management with regards to banking and tracking expenses and cash flow.&quot;</em><br /><br />Fern Shumway<br />Controller<br />Seaport Steel Company';
	rand_text[31] ='<em>&quot;Many times we have told The Resource Group about a particular problem that is specific to us and that the software seemingly is not able to perform, and The Resource Group has come up with an innovative solution, sometimes requiring them to write the piece of program themselves.&quot;</em><br /><br />Markette Nord<br />Accounting Manager<br />Seattle Mental Health';
	rand_text[32] ='<em>&quot;The implementation was actually relatively painless when we compare this to prior financial system implementations in our organization. We had a very clear path of tasks to be completed and timelines in place and were able to meet those milestones with the help of The Resource Group and the work of our independent consultant.&quot;</em><br /><br />Deborah S. Reece<br />Accounting/Credit Manager<br />Simpson Timber Company';
	rand_text[33] ='<em>&quot;We are so pleased with the outcome of the system and have the confidence in The Resource Group that we are pushing to have this software become the industry standard. We have taken the steps to share this experience with the rest of the dinner train industry because we are seeing a tremendous return on our investment.&quot;</em><br /><br />Diane Hanratty<br />Spirit of Washington Dinner Train';
	rand_text[34] ='<em>&quot;Great Plains [Dynamics GP] was a very economical choice compared with other vertical software or canned programs on the market. By virtue of the modular design of the software, you start with the basics and then have the ability to add the specifics to meet your needs. It is easily tailored to the exact needs of the user.&quot;</em><br /><br />Brian K. Jennings<br />Deputy Chief <br />Spokane County Fire District #3';
	rand_text[35] ='<em>&quot;Upon implementing Collections Management, Correctional Industries set a goal to improve its collections by reducing 90 days past due accounts from 40% to 5%. It has achieved that goal—and more.&quot;</em><br /><br />State of Washington Department of Correctional Industries ';
	rand_text[36] ='<em>&quot;It is with pleasure that we recommend the services of The Resource Group for your Great Plains [Dynamics GP] project, for without their assistance our investment in this accounting software would not have been a success.&quot;</em><br /><br />Janelle DeYoung<br />Controller<br />Tony&acute;s Coffees &amp; Teas';
	rand_text[37] ='<em>&quot;The implementation was a complete success due to the partnership that we built with the Resource Group. They have continued to be a great partner with us supporting our software needs and continue to be helpful any time we need help or programming. What has been most appreciated is that there is always a voice on the other end of the phone when we call.&quot;</em><br /><br />Susan M. Youngblood<br />Comptroller<br />Truesoups';
	rand_text[38] ='<em>&quot;I&acute;ve worked with four different consultants from The Resource Group. They all know exactly what&acute;s happening with our project and what they need to be doing for us. They&acute;ve really been a great group to work with!&quot;</em><br /><br />John Feneis<br />Controller<br />Wesley Homes';
	rand_text[39] ='<em>&quot;The Resource Group has been a reliable support tool all along the way...If you are considering using Microsoft Dynamics GP, get the complete package and utilize the knowledge, experience, and reliability of The Resource Group.&quot;</em><br /><br />Daniel Kelley<br />A/P, Payroll Manager<br />Western Towboat Company';
	rand_text[40] ='<em>&quot;The Resource Group became our Dynamics GP partner in January 2006. Since this time, The Resource Group has provided implementation support, training, and integrations. I have found The Resource Group to be excellent at what they do.&quot;</em><br /><br />Clay Frederick, CPA<br />Chief Financial Officer<br />Western Washington Oncology';
	
	if (typeof quotenum == 'undefined')
	{
		quotenum= 'default';
	}
	else if (quotenum != -1)
	{
		return rand_text[quotenum];
	}

	if ( lastquote == -1 )  // If lastquote=-1 is passed to the array, use a random quote
	{
		lastquote = Math.floor(rand_text.length*Math.random());
		return rand_text[lastquote];
	}
	else // If there is a last quote, then use that quote every time
	{
		if (quotenum == -1)
		{
			lastquote = lastquote - 1;
			if ( lastquote < 0 ) lastquote = rand_text.length - 1;
			return rand_text[lastquote];
		}
		else
		{
			lastquote++;
			if(lastquote == rand_text.length) lastquote=0;
			return rand_text[lastquote];
		}

	}
}



