var group;//Declaring second combobox of retail investor page
var secondGroup;//Declaring first combobox of retail investor page

function linkLocation(location) { 
           window.location.href=location;
}
function changeTo(callerId,newSrc) {
	document.getElementById(callerId).src = newSrc;
}
//This function will populate the second combobox of retail investor page
/*function redirect(x){
	var temp= document.getElementById("stage2");

	for (m=temp.options.length-1;m>0;m--){
		temp.options[m]=null;
	}

	for (i=0;i<group[x].length;i++){
		temp.options[i]=new Option(group[x][i].text,group[x][i].value)
	}
	temp.options[0].selected=true
	//redirect1(0)
}
//This function will populate the third combobox of retail investor page
function redirect1(y){
	var temp1= document.getElementById("stage3");
	for (m=temp1.options.length-1;m>0;m--){
		temp1.options[m]=null;
	}
	for (i=0;i<secondGroup[document.myForm.questionCombo.options.selectedIndex][y].length;i++){
		temp1.options[i]=new Option(secondGroup[document.myForm.questionCombo.options.selectedIndex][y][i].text,secondGroup[document.myForm.questionCombo.options.selectedIndex][y][i].value)
	}
	temp1.options[0].selected=true
}
//This function will load values in combo in retail investor page
function loadArray(){
	try{
		var select1 = document.getElementById("questionCombo");
		var groups=select1.options.length;
		group=new Array(groups)
		for (i=0; i<groups; i++)
		group[i]=new Array()

		group[0][0]=new Option("---Select Sub Question---"," ");

		group[1][0]=new Option("Now Select This One"," ");
		group[1][1]=new Option("Question 1 AAA","Question 1 AAA");
		group[1][2]=new Option("Question 1 BBB","Question 1 BBB");
		group[1][3]=new Option("Question 1 CCC","Question 1 CCC");

		group[2][0]=new Option("Now Select This One"," ");
		group[2][1]=new Option("Question 2 AAA","Question 2 AAA");
		group[2][2]=new Option("Question 2 BBB","Question 2 BBB"); 


		var temp= document.getElementById("stage2");


		var secondGroups=temp.options.length
		secondGroup=new Array(secondGroups)
		for (i=0; i<secondGroups; i++)  {
			secondGroup[i]=new Array(group[i].length)
			for (j=0; j<group[i].length; j++){
				secondGroup[i][j]=new Array()  
			}
		}

		secondGroup[0][0][0]=new Option("---Select Super Sub Question---"," ");
		secondGroup[1][0][0]=new Option("---Select Super Sub Question---"," ");
		secondGroup[1][1][0]=new Option("Now Select This One"," ");
		secondGroup[1][1][1]=new Option("Question 1 AAA aaa","Question 1 AAA aaa");
		secondGroup[1][1][2]=new Option("Question 1 AAA bbb","Question 1 AAA bbb");
		secondGroup[1][1][3]=new Option("Question 1 AAA ccc","Question 1 AAA ccc");

		secondGroup[1][2][0]=new Option("Now Select This One"," ");
		secondGroup[1][2][1]=new Option("Question 1 BBB aaa","Question 1 BBB aaa");
		secondGroup[1][2][2]=new Option("Question 1 BBB bbb","Question 1 BBB bbb");
		secondGroup[1][2][3]=new Option("Question 1 BBB ccc","Question 1 BBB ccc");

		secondGroup[1][3][0]=new Option("Now Select This One"," ");
		secondGroup[1][3][1]=new Option("Question 1 CCC aaa","Question 1 CCC aaa");
		secondGroup[1][3][2]=new Option("Question 1 CCC bbb","Question 1 CCC bbb");

		secondGroup[2][0][0]=new Option("---Select Super Sub Question---"," ");
		secondGroup[2][1][0]=new Option("Now Select This One"," ");
		secondGroup[2][1][1]=new Option("Question 2 AAA aaa","Question 2 AAA aaa");
		secondGroup[2][1][2]=new Option("Question 2 AAA bbb","Question 2 AAA bbb");
		secondGroup[2][1][3]=new Option("Question 2 AAA ccc","Question 2 AAA ccc");

		secondGroup[2][2][0]=new Option("Now Select This One"," ");
		secondGroup[2][2][1]=new Option("Question 2 BBB aaa","Question 2 BBB aaa");
		secondGroup[2][2][2]=new Option("Question 2 BBB bbb","Question 2 BBB bbb");
		

	}catch(e){
		alert(e)
	}
}*/
//This function will show the Step-4 section after populating third combo box
function showDiv(){
	document.getElementById("text").style.visibility='visible';
}