
		var globalStyleSheet="<link rel=stylesheet href=\"/ca/global=prewide.css\"  type=\"text/css\">";
		var toolStyleSheet="<link rel=stylesheet href=\"/ca/visa-selector-common.css\"  type=\"text/css\"> ";
		var specialSheet="<link rel=stylesheet href=\"/ca/visa.css\"  type=\"text/css\"> ";	
		
		var primaryGoal;
		var secondaryGoal;
		var annualHouseholdIncome;
				
		function processFeature() {			
			qStr = location.search.substr(1, location.search.length);
			var pair = qStr.split('=');
			name = pair[0];
			feature = pair[1];
			if (name == 'feature') {
				if (feature == 1) {
					frames['formFrame'].document.getElementById('primaryGoalGettingRewards').checked = true;
				}
				else {
					frames['formFrame'].document.getElementById('primaryGoalNoCharge').checked = true;
				}
			}
		}
		  		
        function activeQuestions()		
		{
		     var userChoice= returnRadioButtonValue('primaryGoal')	;
		     var secondChoice= returnRadioButtonValue('secondaryGoal')	;			 
		     var totalSecondaryChoice=parent.frames['formFrame'].document.forms[0].elements['secondaryGoal'].length;		  			 

		 if(userChoice=="primaryGettingRewards" )
		  {	 		  
		     frames['formFrame'].document.getElementById('secondaryEverydayCardActiveSection').className = "conditionalContentHidden";					  
			 frames['formFrame'].document.getElementById('secondaryEverydaryCardDisableSection').className = "conditionalContentVisible";			  			  					  
		     frames['formFrame'].document.getElementById('secondaryLowInterestRateDisableSection').className = "conditionalContentHidden";				 			 
		     frames['formFrame'].document.getElementById('secondaryLowInterestRateActiveSection').className = "conditionalContentVisible";					 
				 				 				 				 
            
			if(secondChoice=="everydayCard")
		    {	
		     	for(i=0; i<totalSecondaryChoice; i++){ 
				    var secondValue = parent.frames['formFrame'].document.forms[0].elements['secondaryGoal'][i].value;				
					if(secondValue=="everydayCard"){ 
			    		parent.frames['formFrame'].document.forms[0].elements['secondaryGoal'][i].checked=false;				
					}			 
				 } 					 
			}	 
		   else
		   { 
		     defaultRadioButtonUpdate("secondaryGoal", secondChoice);			 
		  }  
		  }
		  else if(userChoice=="primaryNoCharge" )
		  {	 		  
			 frames['formFrame'].document.getElementById('secondaryEverydaryCardDisableSection').className = "conditionalContentHidden";			  			  					  
		     frames['formFrame'].document.getElementById('secondaryEverydayCardActiveSection').className = "conditionalContentVisible";					 			 
		     frames['formFrame'].document.getElementById('secondaryLowInterestRateActiveSection').className = "conditionalContentHidden";					 
		     frames['formFrame'].document.getElementById('secondaryLowInterestRateDisableSection').className = "conditionalContentVisible";						 				 				 				 
			if(secondChoice=="noAnnualFee" || secondChoice=="lowInterestRate" || secondChoice=="travelRewards")
		    {	
		     	for(i=0; i<totalSecondaryChoice; i++)
				 { 
				    var secondValue = parent.frames['formFrame'].document.forms[0].elements['secondaryGoal'][i].value;
				
					if(secondValue=="noAnnualFee" || secondValue=="lowInterestRate" || secondValue=="travelRewards")
					{ 
			    		parent.frames['formFrame'].document.forms[0].elements['secondaryGoal'][i].checked=false;				
					}			 
				 } 			 			 
			}	 
		   else
		   {
		     defaultRadioButton("secondaryGoal", secondChoice);
		   }	            

		  }
		  else
		  {
			 frames['formFrame'].document.getElementById('secondaryEverydaryCardDisableSection').className = "conditionalContentHidden";			  			  					  
		     frames['formFrame'].document.getElementById('secondaryEverydayCardActiveSection').className = "conditionalContentVisible";					 				 
		     frames['formFrame'].document.getElementById('secondaryLowInterestRateActiveSection').className = "conditionalContentVisible";					 
		     frames['formFrame'].document.getElementById('secondaryLowInterestRateDisableSection').className = "conditionalContentHidden";						 				 						 				 		  
		  }
		}
		
function recommendation()
{
	    primaryGoal = frames["submitFrame"].document.forms[0].primaryGoal.value;
        secondaryGoal = frames["submitFrame"].document.forms[0].secondaryGoal.value;
	    annualHouseholdIncome = frames["submitFrame"].document.forms[0].annualHouseholdIncome.value;	

		
		if(annualHouseholdIncome=="student")
		{ 
	        frames["submitFrame"].document.forms[0].prodID1.value=16;
  		    frames["submitFrame"].document.forms[0].prodID2.value=0; 
        	frames["submitFrame"].document.forms[0].prodID3.value=0;	 	 
	        frames["submitFrame"].document.forms[0].prodNum.value=1;	 		
		}
		else if(primaryGoal=="primaryNoCharge")
		{
		    switch (secondaryGoal)
			{
			  case "everydayCard":
		        frames["submitFrame"].document.forms[0].prodID1.value = 6;
  			    frames["submitFrame"].document.forms[0].prodID2.value = 20; 
        		frames["submitFrame"].document.forms[0].prodID3.value = 0;	 	 
	        	frames["submitFrame"].document.forms[0].prodNum.value = 2;				  
				break;			  
			  case "cashBack":
		        frames["submitFrame"].document.forms[0].prodID1.value = 8;
  			    frames["submitFrame"].document.forms[0].prodID2.value = 0; 
        		frames["submitFrame"].document.forms[0].prodID3.value = 0;	 	 
	        	frames["submitFrame"].document.forms[0].prodNum.value = 1;				  
			} 
		}
		else if(primaryGoal=="primaryGettingRewards")
		{
		   if(secondaryGoal=="lowInterestRate")
		   {
		        frames["submitFrame"].document.forms[0].prodID1.value = 7;
  			    frames["submitFrame"].document.forms[0].prodID2.value = 7; 
        		frames["submitFrame"].document.forms[0].prodID3.value = 7;	 	 
	        	frames["submitFrame"].document.forms[0].prodNum.value = 1;				  
		   }
		   else if(secondaryGoal=="noAnnualFee")
		   {
		        frames["submitFrame"].document.forms[0].prodID1.value = 8;
				frames["submitFrame"].document.forms[0].prodID2.value = 0;
        		frames["submitFrame"].document.forms[0].prodID3.value = 0;	 	 
	        	frames["submitFrame"].document.forms[0].prodNum.value = 1;					  
		   }
		   else if(secondaryGoal=="cashBack")
		   {
		        frames["submitFrame"].document.forms[0].prodID1.value = 8;
				
				if(annualHouseholdIncome=="35K")
				{
  			     frames["submitFrame"].document.forms[0].prodID2.value = 9; 
        		 frames["submitFrame"].document.forms[0].prodID3.value = 0;	 	 
	        	 frames["submitFrame"].document.forms[0].prodNum.value = 2;							
				}
				else if(annualHouseholdIncome=="15To35K")
				{
  			     frames["submitFrame"].document.forms[0].prodID2.value = 0; 
        		 frames["submitFrame"].document.forms[0].prodID3.value = 0;	 	 
	        	 frames["submitFrame"].document.forms[0].prodNum.value = 1;								
				}		  
		   }			      
		   else if(secondaryGoal=="travelRewards")
		   {
				if(annualHouseholdIncome=="35K")
				{
		         frames["submitFrame"].document.forms[0].prodID1.value = 1;
  			     frames["submitFrame"].document.forms[0].prodID2.value = 2; 						
        		 frames["submitFrame"].document.forms[0].prodID3.value = 18;	 	 
	        	 frames["submitFrame"].document.forms[0].prodNum.value = 3;							
				}
				else if(annualHouseholdIncome=="15To35K")
				{
		         frames["submitFrame"].document.forms[0].prodID1.value = 18;
  			     frames["submitFrame"].document.forms[0].prodID2.value = 0; 							
        		 frames["submitFrame"].document.forms[0].prodID3.value = 0;	 	 
	        	 frames["submitFrame"].document.forms[0].prodNum.value = 1;								
				}			   
		   }		   
		
		}		
		  
}
			
	function populateRequestChecking(thisPage)
	{
	  var requestPopulatePage=frames['submitFrame'].document.forms[0].requestPopulatePageNumber.value;
	  if(thisPage== requestPopulatePage)
	  {
	    populateData(thisPage);		
	  }	
	}
	
function populateData(pageNumber)
{
    var pageNumber=pageNumber;
	
    
	var primaryGoal = frames['submitFrame'].document.forms[0].primaryGoal.value;
	var secondaryGoal = frames['submitFrame'].document.forms[0].secondaryGoal.value;
	var annualHouseHoldIncome = frames['submitFrame'].document.forms[0].annualHouseholdIncome.value;

	  switch (pageNumber)
	  {		
		case 1:
		{
		  defaultRadioButton("primaryGoal", primaryGoal);		
		  defaultRadioButton("secondaryGoal", secondaryGoal );		
		  defaultRadioButton("annualHouseholdIncome", annualHouseHoldIncome);				  		  		
		  break;
		}

	}				
}	
	
function newApplyWindow(apply_url) {
	var apply;
	apply=window.open(apply_url,"apply","width=640,height=470,directories=no,hotkeys=no,location=no,menubar=no,personalbar=no,resizable=yes,scrollbars=yes,status=yes,titlebar=no,toolbar=yes,top=10,left=10");
	apply.focus();

}