NextPathArray = { FirstQuestion : "SecondQuestion-pane",  SecondQuestion : "FirstResult-pane", ThirdQuestion : "FirstResult-pane", FourthQuestion : "FirstResult-pane",
					FifthQuestion : "FirstResult-pane",  SixthQuestion : "SixthResult-pane", SeventhQuestion : "FourthResult-pane", EighthQuestion : "ThirdResult-pane",
					NinthQuestion : "SixthResult-pane",  TenthQuestion : "FourthResult-pane", EleventhQuestion : "ThirdResult-pane", TwelthQuestion : "FourthResult-pane",
					ThirteenthQuestion : "ThirdResult-pane"
};


//FlagArray = { LumpSum : 1, RegularSaver : 0 };

var stack = new Array();
var ToggleSwitch=1;



function backButton() {

	previousFrame = stack.pop();
	ScrollSection(previousFrame, 'scroller', 'home-pane');

}


function homeButton() {

		ScrollSection('home-pane', 'scroller', 'home-pane');

}


////////////////////////////////// Code that controls the Co-op elements 'banners' and 'footer'
var orig_footer_top;

function OnFinish(obj) {
	banner_object = document.getElementById('banners');
	banner_object.style.display = 'block';

	footer_object = document.getElementById('footer');
	footer_object.style.top=orig_footer_top +'px';
}


function toggleButton() {



	if (ToggleSwitch) {
		banner_object = document.getElementById('banners');
		banner_object.style.display = 'none';
		
		footer_object = document.getElementById('footer');
		orig_footer_top=parseInt(footer_object.style.top);
		newval=orig_footer_top+232;
		//document.title='Down' + orig_footer_top ;
		footer_object.style.top=newval +'px';
		
		ScrollSection('home-pane', 'scroller', 'home-pane');
		Effect.BlindDown('scroller'); 
		ToggleSwitch=0;
		//return false;
		document.images["toggleImage"].src='cfscombi/img/close_btn.gif'; //close
	} else {
		// close window
		Effect.BlindUp('scroller',   { 
                          afterFinish: OnFinish
                         }); 
		ToggleSwitch=1;
		//return false;
		document.images["toggleImage"].src='cfscombi/img/btn.gif'; //open
	}

}




/////////////////////////////////////////////// FirstQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathFirstQuestion(button) {

	//alert (button.value);

	if(button.value != "") {
		NextPathArray["FirstQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextFirstQuestion() {
	
	//alert('wow!');

	stack.push("FirstQuestion-pane");
	
	//alert ('val=' & NextPathArray["FirstQuestion"]);
	ScrollSection(NextPathArray["FirstQuestion"], 'scroller', 'home-pane');

}





/////////////////////////////////////////////// SecondQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathSecondQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["SecondQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextSecondQuestion() {


	stack.push("SecondQuestion-pane");
	ScrollSection(NextPathArray["SecondQuestion"], 'scroller', 'home-pane');

}





/////////////////////////////////////////////// ThirdQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathThirdQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["ThirdQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextThirdQuestion() {


	stack.push("ThirdQuestion-pane");
	ScrollSection(NextPathArray["ThirdQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// FourthQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathFourthQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["FourthQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextFourthQuestion() {


	stack.push("FourthQuestion-pane");
	ScrollSection(NextPathArray["FourthQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// FifthQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathFifthQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["FifthQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextFifthQuestion() {


	stack.push("FifthQuestion-pane");
	ScrollSection(NextPathArray["FifthQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// SixthQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathSixthQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["SixthQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextSixthQuestion() {


	stack.push("SixthQuestion-pane");
	ScrollSection(NextPathArray["SixthQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// SeventhQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathSeventhQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["SeventhQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextSeventhQuestion() {


	stack.push("SeventhQuestion-pane");
	ScrollSection(NextPathArray["SeventhQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// EighthQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathEighthQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["EighthQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextEighthQuestion() {


	stack.push("EighthQuestion-pane");
	ScrollSection(NextPathArray["EighthQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// NinthQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathNinthQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["NinthQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextNinthQuestion() {


	stack.push("NinthQuestion-pane");
	ScrollSection(NextPathArray["NinthQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// TenthQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathTenthQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["TenthQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextTenthQuestion() {


	stack.push("TenthQuestion-pane");
	ScrollSection(NextPathArray["TenthQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// EleventhQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathEleventhQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["EleventhQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextEleventhQuestion() {


	stack.push("EleventhQuestion-pane");
	ScrollSection(NextPathArray["EleventhQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// TwelthQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathTwelthQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["TwelthQuestion"]=button.value;
		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextTwelthQuestion() {


	stack.push("TwelthQuestion-pane");
	ScrollSection(NextPathArray["TwelthQuestion"], 'scroller', 'home-pane');

}




/////////////////////////////////////////////// ThirteenthQuestion FUNCTIONALITY /////////////////////////////////////////////////////////////


function setPathThirteenthQuestion(button) {

	//alert ('checked=' + children.checked);

	if(button.value != "") {
		NextPathArray["ThirteenthQuestion"]=button.value;
		//alert(button.value);

		//document.title='radio selected=' + button.value ;
	} else {
		//ProgressArray["children"]=0;
	}
	//updateProgressBar(children);
}


function nextThirteenthQuestion() {


	stack.push("ThirteenthQuestion-pane");
	//temp=NextPathArray["ThirteenthQuestion"];
	//alert(temp);
	ScrollSection(NextPathArray["ThirteenthQuestion"], 'scroller', 'home-pane');

}










