//Globals
var tipText;
var tipTextArea;
var tipCounter;
var tipLink;
var tipHref;
var current_tip;

//Initialise Variables for Tip Box
function init2() {
	tipText = new Array();
	tipHref = new Array();
	tipTextArea = document.getElementById('tipTextArea');
	tipLink = document.getElementById('tipLink');
	tipCounter = document.getElementById('tipCounter');
	current_tip = 0;

	//Spotlight Texts
	tipText[0] = '<strong>Being your own boss takes personality</strong><br /><br />Look at any group of successful business owners and, chances are, you\'ll find they exhibit similar personality traits.';
	tipText[1] = '<strong>If your plan is to be successful, it helps if your business has one</strong><br /><br />At the heart of any successful business is a thorough, objective and realistic plan.';
	tipText[2] = '<strong>Building a business? Think structure.</strong><br /><br />The legal structure you choose for your business determines, to a large extent, how your company is organized, cash flows, taxes and more.';
	tipText[3] = '<strong>Time to get down to business? Get registered.</strong><br /><br />Most businesses must register with federal, provincial and even municipal government agencies. Requirements may include an operating permit, permission to operate in your chosen location or specific qualifications for you or your employees.';
	tipText[4] = '<strong>Open for business? Open an account - it\'s easy!</strong><br /><br />Opening a Business Deposit Account is an exciting first step toward your future success. Best of all, it\'s simple, requiring a few business-related documents and some basic personal information.';
	tipText[5] = '<strong>Starting a business? Let\'s talk money.</strong><br /><br />Determining whether you have enough money to start you business means creating a variety of realistic cash flow projections, taking as many factors into account as possible. That way, you\'re better prepared and can react quickly if things don\'t turn out as expected.';
	tipText[6] = '<strong>There\'s financing. And there\'s financing.</strong><br /><br />When starting a business, it\'s essential you have sufficient funds. The type of financing you secure will depend on your start up, cash flow and operational requirements. Your RBC small business advisor can help you understand the different types of financing available to meet your specific needs. Meanwhile, here\'s a quick primer to get you started.';
	tipText[7] = '<strong>Know the ABCs of GST, RST, PST and HST</strong><br /><br />Running a business invariably involves collecting and remitting various types of taxes determined by the nature and size of your business, as well as where you operate. Understanding what, when and how to collect, as well as when and where to remit isn\'t as difficult as it may seem. We can help.';
	tipText[8] = '<strong>Do you qualify for a grant?</strong><br /><br />Grant funding for your business would be great, but first you have to find out what\'s available - and whether you qualify for it. It means doing some research, but the rewards can be worth it. ';	
	tipText[9] = '<strong>Developing a network</strong><br /><br />As a small business, you don\'t have an extensive infrastructure supporting you. Networking can even the odds.';	
	tipText[10] = '<strong>Getting customers is important. Keeping them is essential!</strong><br /><br />Every business, big or small, needs customers. Fortunately, with the right approach to customer service management, your business can keep customers loyal for life.';
	tipText[11] = '<strong>Balancing business life with personal life</strong><br /><br />Want to get more from your business? Put more into your personal life. It will give you fresh energy to take on the world... and remind you what you\'re really working for.';
	tipText[12] = '<strong>Want to succeed? Do your homework</strong><br /><br />To succeed, you need solid information - everything from costs to your competitor\'s next move. The way to get that information is through market research.';
	tipText[13] = '<strong>The right way to write it off.</strong><br /><br />When you run your own business, tax-deductible expenses like banking fees can actually be a benefit.';
	tipText[14] = '<strong>Green looks good on you.</strong><br /><br />Saving money and enhancing your client appeal are just two of the many benefits of being environmentally-friendly.';
	tipText[15] = '<strong>Get going faster with a franchise</strong><br /><br />So you love the idea of running your own business, but you don\'t want to build a business from scratch? Here\'s a thought - consider franchising.';
	tipText[16] = '<strong>Stay ahead? Know your competition.</strong><br /><br />Want to get ahead of your competition? Start by doing a competitive review to assess their strengths and weaknesses.';
	tipText[17] = '<strong>Got a network? Then you\'ve got a team!</strong><br /><br />Building a network of people who can give you advice is like having a "virtual team" to back you up.';
	tipText[18] = '<strong>Because everybody likes to get paid.</strong><br /><br />There are a variety of pay options available to help your business.';
	tipText[19] = '<strong>Give your money the care it deserves.</strong><br /><br />Specialized bank services can help make it easier to stay on top of your cash flow.';
	tipText[20] = '<strong>Turning weaknesses &amp; threats into strengths &amp; opportunities</strong><br /><br />When you run a business day-to-day, you focus on the &ldquo;here and now&rdquo;. Conducting a SWOT analysis helps you analyze your business situation, think about both the short-term goals and the long-term objectives so you can be better prepared for tomorrow, and strengthen your presence in the market place.';
	tipText[21] = '<strong>Re-evaluating your business - and yourself - to stay ahead</strong><br /><br />The world of business never stands still; to stay ahead, your business needs to evolve as well.';
	tipText[22] = '<strong>A good credit rating really makes access to credit easier</strong><br /><br />Establishing and maintaining a good credit history takes time. Paying credit obligations on time will help you develop a good credit history and will enable you to obtain additional credit in the future.';
	tipText[23] = '<strong>Big plans can bring big benefits</strong><br /><br />Some of the benefits you can enjoy when your business grows include better access to financing and increased personal wealth.';
	tipText[24] = '<strong>Build a better business</strong><br /><br />There are as many ways to grow your business as there are reasons for doing it. Here are just a few common approaches that may help you build a better future for your business.';
	tipText[25] = '<strong>Matching the right financing options to your needs</strong><br /><br />Want to keep your business growing? Cash flow is the fuel of your business growth. To keep your cash flowing, look for the right financing options to match your needs, and see how you can make your credit work as hard as you do for your business.';
	tipText[26] = '<strong>Keeping your financial picture in sight</strong><br /><br />Successful business owners know that, to manage effectively, you need to be in control of your finances. Here are <strong>four financial tools you can\'t do without</strong>:';
	tipText[27] = '<strong>Reducing your debt takes discipline</strong><br /><br />No matter how strong your business is, excessive debt can drain your finances and damage the business\'s health.  Debt reduction doesn\'t have to be difficult, but it takes discipline. These tips can help ...';
	tipText[28] = '<strong>What to do when growth takes you by surprise?</strong><br /><br />While growth may be something that you\'re working hard for, it can also occur unexpectedly. The situation can be a springboard to success if you can capitalize on the opportunity, or it can be a real challenge if you are unable to keep up with demand. Here are some steps to help you manage unplanned growth...';
	tipText[29] = '<strong>Risk is everywhere. That\'s why you need insurance.</strong><br /><br />When you run your own business, you need to be ready for events that could affect your business\'s future: fire, flood, disability, liability,  delinquent customers and more. An insurance advisor who specializes in business insurance can help you identify those risks.';
	
	//Tip Links
	tipHref[0] = 'business/tips/01-03.html#tip1';
	tipHref[1] = 'business/tips/01-03.html#tip2';
	tipHref[2] = 'business/tips/01-03.html#tip3';
	tipHref[3] = 'business/tips/04-06.html#tip4';
	tipHref[4] = 'business/tips/04-06.html#tip5';
	tipHref[5] = 'business/tips/04-06.html#tip6';
	tipHref[6] = 'business/tips/07-09.html#tip7';
	tipHref[7] = 'business/tips/07-09.html#tip8';
	tipHref[8] = 'business/tips/07-09.html#tip9';		
	tipHref[9] = 'business/tips/10-12.html#tip10';	
	tipHref[10] = 'business/tips/10-12.html#tip11';
	tipHref[11] = 'business/tips/10-12.html#tip12';
	tipHref[12] = 'business/tips/13-15.html#tip13';
	tipHref[13] = 'business/tips/13-15.html#tip14';
	tipHref[14] = 'business/tips/13-15.html#tip15';
	tipHref[15] = 'business/tips/16-18.html#tip16';
	tipHref[16] = 'business/tips/16-18.html#tip17';
	tipHref[17] = 'business/tips/16-18.html#tip18';
	tipHref[18] = 'business/tips/19-21.html#tip19';
	tipHref[19] = 'business/tips/19-21.html#tip20';
	
	tipHref[20] = 'business/tips/19-21.html#tip21';
	tipHref[21] = 'business/tips/22-24.html#tip22';
	tipHref[22] = 'business/tips/22-24.html#tip23';
	tipHref[23] = 'business/tips/22-24.html#tip24';
	tipHref[24] = 'business/tips/25-27.html#tip25';
	tipHref[25] = 'business/tips/25-27.html#tip26';
	tipHref[26] = 'business/tips/25-27.html#tip27';
	tipHref[27] = 'business/tips/28-30.html#tip28';
	tipHref[28] = 'business/tips/28-30.html#tip29';
	tipHref[29] = 'business/tips/28-30.html#tip30';
	
	//Update Text Areas
	tipTextArea.innerHTML = tipText[current_tip];
	tipCounter.innerHTML = (current_tip+1) + " of " + tipText.length;
	tipLink.href= tipHref[current_tip];
}

//Goes to Next Tip
function next() {
	if (current_tip+1 < tipText.length) current_tip++;
	else current_tip=0;
	//Update Text Areas
	tipTextArea.innerHTML = tipText[current_tip];
	tipCounter.innerHTML = (current_tip+1) + " of " + tipText.length;
	tipLink.href= tipHref[current_tip];
}	

//Goes to Previous Tip
function previous() {
	if (current_tip == 0) current_tip = tipText.length-1;
	else current_tip = current_tip-1;
	//Update Text Areas
	tipTextArea.innerHTML = tipText[current_tip];
	tipCounter.innerHTML = (current_tip+1) + " of " + tipText.length;
	tipLink.href= tipHref[current_tip];	
}

function forward() {
		
		var href = document.getElementById('bus_sol_list_id').value;
		// don't continue without support for appendChild
	if (document.body.appendChild) {
    	if(href != "default"){
			var form = document.getElementById('bus_sol');
			form.action = 'http://<!--#echo var="SERVER_NAME" -->/<!--#echo var="SESSION_ID" -->' + href;
			form.submit();
		}
	}
}

function forward2() {
		
		var href = document.getElementById('bus2_sol_list_id').value;
		// don't continue without support for appendChild
	if (document.body.appendChild) {
    	if(href != "default"){
			var form = document.getElementById('bus2_sol');
			form.action = 'http://<!--#echo var="SERVER_NAME" -->/<!--#echo var="SESSION_ID" -->' + href;
			form.submit();
		}
	}
}
