
// Global Variable
var SpotLightTxtIS = new Array();
var SpotLightWinIS = new Array();
var SpotLightWin2IS = new Array();
var SpotLightContIS = new Array();
var WinTitleIS;
var TipTitleIS;
var ImageMarkerIS = 0;
var NumberCountIS;
var ImgIS;

var StoryNameIS = new Array();
var StoryTextIS = new Array();
var StoryUrlIS = new Array();


// Image Slide Show Array Start
// Place Images Here
SpotLightWinIS[0] = "/couples-and-families/stories/client-story-managing-cash-flow.html";
SpotLightWinIS[1] = "/couples-and-families/stories/client-story-saving-for-childs-education.html";
SpotLightWinIS[2] = "/couples-and-families/stories/client-story-saving-on-a-single-income.html";
SpotLightWinIS[3] = "/couples-and-families/stories/client-story-immigrants-creating-a-financial-foundation.html";
SpotLightWinIS[4] = "/couples-and-families/stories/client-story-savings-goal-and-strategies.html";
SpotLightWinIS[5] = "/couples-and-families/stories/client-story-budget-analysis-reveals-potential-problems.html";
// Image Slide Show Array Ends

// Text Slide Show Array Start
// Place Text Here 
SpotLightTxtIS[0] = "Managing Cash Flow on a Reduced Income";
SpotLightTxtIS[1] = "Saving for a child's education and a family vacation";
SpotLightTxtIS[2] = "Consolidating and saving on a single income";
SpotLightTxtIS[3] = "New Canadians find their financial comfort zone";
SpotLightTxtIS[4] = "Setting up savings strategies to achieve long-term dreams";
SpotLightTxtIS[5] = "Budget analysis reveals potential problems";
// Text Slide Show Array Ends

StoryNameIS[0] = "Matt";
StoryNameIS[1] = "Collin";
StoryNameIS[2] = "Isabel";
StoryNameIS[3] = "Vasily";
StoryNameIS[4] = "Anya";
StoryNameIS[5] = "Annette";
//StoryNameIS[5] = "Sergey";
StoryNameIS[6] = "Anna";
//StoryNameIS[3] = "Chris";

StoryTextIS[0] = "The process was simple and positive; we feel better about our financial situation now. Thank you for all your help!";
StoryTextIS[1] = "We thought home ownership was a long way off for us, but Chris showed us how we could afford a down payment in as little as two or three years.";
StoryTextIS[2] = "Our RBC advisor helped allay our fears by putting our financial situation in perspective for us.";
StoryTextIS[3] = "The fact that Marina spoke Russian made everything so much easier. She even provided us with pamphlets translated into Russian, which was well beyond our expectations.";
StoryTextIS[4] = "RBC has really shown us that they want to be our partner and help us achieve our goals.";
StoryTextIS[5] = "I would advise friends and family to take advantage of all the information RBC  provides. You might not need the product or service now, but you will in the future.";
//StoryTextIS[5] = "I would advise friends and family to take advantage of all the information RBC  provides. You might not need the product or service now, but you will in the future.";
StoryTextIS[6] = "I was very satisfied with our meeting with Marina. All the information she gave us was pertinent and useful, which made us feel valued and comfortable seeking advice.";

SpotLightWin2IS[0] = "/couples-and-families/stories/client-story-managing-cash-flow.html";
SpotLightWin2IS[1] = "/couples-and-families/stories/client-story-saving-on-a-single-income.html";
SpotLightWin2IS[2] = "/couples-and-families/stories/client-story-saving-on-a-single-income.html";
SpotLightWin2IS[3] = "/couples-and-families/stories/client-story-immigrants-creating-a-financial-foundation.html";
SpotLightWin2IS[4] = "/couples-and-families/stories/client-story-immigrants-creating-a-financial-foundation.html";
SpotLightWin2IS[5] = "/couples-and-families/stories/client-story-savings-goal-and-strategies.html";
SpotLightWin2IS[6] = "/couples-and-families/stories/client-story-savings-goal-and-strategies.html";

// Place Text Here 
SpotLightContIS[0] = "When their household income decreases, Matt and Stephanie look for smart and simple ways of maintaining their current lifestyle.";
SpotLightContIS[1] = "Read how Chris &amp; Amanda are saving money for their daughter's education without changing the travel plans they had for the future.";
SpotLightContIS[2] = "A young couple puts their finances in perspective and discovers that their goals may be easier to reach than they thought.";
SpotLightContIS[3] = "Two recent immigrants create a financial foundation to build on.";
SpotLightContIS[4] = "Young newcomers to Canada discover the value of financial advice to help them manage debt and save for their dreams.";
// Text Slide Show Array Ends

function loadstories(){
document.getElementById("count_image_number").innerHTML = 1;
document.getElementById("count_image_max").innerHTML = SpotLightWinIS.length;
document.getElementById("title_rightnav").innerHTML = SpotLightTxtIS[0];
document.getElementById("stories-img").innerHTML = "<img src='/couples-and-families/_assets-custom/images/stories_img1.jpg' border='0' />";
document.getElementById("winner_rightnav").href = SpotLightWinIS[0];
}

function loadstories2(){
document.getElementById("count_image_number").innerHTML = 1;
document.getElementById("count_image_max").innerHTML = SpotLightWinIS.length;
document.getElementById("title_rightnav").innerHTML = SpotLightTxtIS[0];
document.getElementById("cont_rightnav").innerHTML = SpotLightContIS[0];
document.getElementById("stories-img2").innerHTML = "<img src='/couples-and-families/_assets-custom/images/stories_main_img1.jpg' border='0' />";
document.getElementById("winner_rightnav").href = SpotLightWinIS[0];
}

// Next Image and Text Start
function NextIS() {
	TipTitleIS = document.getElementById("title_rightnav");
	WinTitleIS = document.getElementById("winner_rightnav");
	NumberCountIS = document.getElementById("count_image_number");
	if(document.getElementById("stories-img")){ImgIS = document.getElementById("stories-img");}
	if(document.getElementById("stories-img2")){ImgIS = document.getElementById("stories-img2");}
	if(document.getElementById("cont_rightnav")){ContIS = document.getElementById("cont_rightnav");}

	if (ImageMarkerIS+1 < SpotLightWinIS.length) ImageMarkerIS++;
	else ImageMarkerIS=0;
	

	TipTitleIS.innerHTML = SpotLightTxtIS[ImageMarkerIS];
	WinTitleIS.href = SpotLightWinIS[ImageMarkerIS];
	NumberCountIS.innerHTML = ImageMarkerIS + 1;
	if(document.getElementById("stories-img")){ImgIS.innerHTML = "<img src='/couples-and-families/_assets-custom/images/stories_img"+(ImageMarkerIS+1)+".jpg' border='0' />";}
	if(document.getElementById("stories-img2")){ImgIS.innerHTML = "<img src='/couples-and-families/_assets-custom/images/stories_main_img"+(ImageMarkerIS+1)+".jpg' border='0' />";}
	if(document.getElementById("cont_rightnav")){ContIS.innerHTML = SpotLightContIS[ImageMarkerIS];}
}	

// Next Image and Text End

// Previous Image and Text Start
function PreviousIS() {
	TipTitleIS = document.getElementById("title_rightnav");
	WinTitleIS = document.getElementById("winner_rightnav");
	NumberCountIS = document.getElementById("count_image_number");
	if(document.getElementById("stories-img")){ImgIS = document.getElementById("stories-img");}
	if(document.getElementById("stories-img2")){ImgIS = document.getElementById("stories-img2");}
	if(document.getElementById("cont_rightnav")){ContIS = document.getElementById("cont_rightnav");}
	
	if (ImageMarkerIS == 0) ImageMarkerIS = SpotLightWinIS.length-1;
	else ImageMarkerIS = ImageMarkerIS-1;
	
	WinTitleIS.href = SpotLightWinIS[ImageMarkerIS];
	TipTitleIS.innerHTML = SpotLightTxtIS[ImageMarkerIS];
	NumberCountIS.innerHTML = ImageMarkerIS + 1;
	if(document.getElementById("stories-img")){ImgIS.innerHTML = "<img src='/couples-and-families/_assets-custom/images/stories_img"+(ImageMarkerIS+1)+".jpg' border='0' />";}
	if(document.getElementById("stories-img2")){ImgIS.innerHTML = "<img src='/couples-and-families/_assets-custom/images/stories_img"+(ImageMarkerIS+1)+".jpg' border='0' />";}
	if(document.getElementById("cont_rightnav")){ContIS.innerHTML = SpotLightContIS[ImageMarkerIS];}
}
// Previous Image and Text End






function tellStory() {
	// Nothing to append if ASC not available
		var SId = Math.floor(Math.random()*StoryNameIS.length);
	// Generate string to be appended to the link
	
	document.getElementById("nameblock").innerHTML = StoryNameIS[SId];
	document.getElementById("storyblock").innerHTML = StoryTextIS[SId];
	document.getElementById("urlblock").href = SpotLightWin2IS[SId];
	
	
}

function firsttab(){
	dynamictabs.expandit(0);
}
function hidechat(){
	document.getElementById('chatsolnonly').style.display = 'none';
}
function showchat(){
	document.getElementById('chatsolnonly').style.display = '';
}
