function Results(obj)
	{
		//alert('results')
		this.dataObj = obj;
	}

Process.prototype.doResults = function()
	{
		var thisDiv = "interstitial";
		var nextDiv = "results";
		
		
//the following calculations and table are here temporarily just to show the results in the results for testing purposes - comment out in live version...
		
		var age 			= this.dataObj._dataArray[1];
		var job				= this.dataObj._dataArray[2];
		var partner			= this.dataObj._dataArray[3];
		var p_job			= this.dataObj._dataArray[4];
		var p_retire		= this.dataObj._dataArray[5];
		var dependancies	= this.dataObj._dataArray[6];
		var dependants		= this.dataObj._dataArray[7];
		var mortgage		= this.dataObj._dataArray[8];
		var budget			= this.dataObj._dataArray[9];
		var emergency		= this.dataObj._dataArray[10];
		var borrowing		= this.dataObj._dataArray[11];
		var mortgageType	= this.dataObj._dataArray[12];
		var repaymentPlan	= this.dataObj._dataArray[13];
		var own_life		= this.dataObj._dataArray[14];
		var p_life			= this.dataObj._dataArray[15];
		var income			= this.dataObj._dataArray[16];
		var retire			= this.dataObj._dataArray[17];
		var pension			= this.dataObj._dataArray[18];
/*		
		document.getElementById('tempResults').innerHTML = "<table cellpadding='4' cellspacing='0' border='3' width='416' style='border-color:yellow'><tr><td>You are in band - n/a</td></tr><tr><td>Your score is n/a</td></tr></table><table cellpadding='4' cellspacing='0' border='3' width='416' style='border-color:red'><tr><th width='216'>Variable name</th><th width='100'>Value</th><th width='100'>Score</th></tr><tr><td>age group</td><td>"+this.dataObj._dataArray[1]+"</td><td>n/a</td></tr><tr><td>job status</td><td>"+this.dataObj._dataArray[2]+"</td><td>n/a</td></tr><tr><td>partner status</td><td>"+this.dataObj._dataArray[3]+"</td><td>n/a</td></tr><tr><td>partner's job status</td><td>"+this.dataObj._dataArray[4]+"</td><td>n/a</td></tr><tr><td>partners's retirement plan status</td><td>"+this.dataObj._dataArray[5]+"</td><td>n/a</td></tr><tr><td>dependancies status</td><td>"+this.dataObj._dataArray[6]+"</td><td>n/a</td></tr><tr><td>dependants status</td><td>"+this.dataObj._dataArray[7]+"</td><td>n/a</td></tr><tr><td>mortgage status</td><td>"+this.dataObj._dataArray[8]+"</td><td>n/a</td></tr><tr><td>budget status</td><td>"+this.dataObj._dataArray[9]+"</td><td>n/a</td></tr><tr><td>emergency status</td><td>"+this.dataObj._dataArray[10]+"</td><td>n/a</td></tr><tr><td>borrowing status</td><td>"+this.dataObj._dataArray[11]+"</td><td>n/a</td></tr><tr><td>mortgage type</td><td>"+this.dataObj._dataArray[12]+"</td><td>n/a</td></tr><tr><td>repayment plan status</td><td>"+this.dataObj._dataArray[13]+"</td><td>n/a</td></tr><tr><td>own life status</td><td>"+this.dataObj._dataArray[14]+"</td><td>n/a</td></tr><tr><td>partner's life status</td><td>"+this.dataObj._dataArray[15]+"</td><td>n/a</td></tr><tr><td>income status</td><td>"+this.dataObj._dataArray[16]+"</td><td>n/a</td></tr><tr><td>planning retirement status</td><td>"+this.dataObj._dataArray[17]+"</td><td>n/a</td></tr><tr><td>pension status</td><td>"+this.dataObj._dataArray[18]+"</td><td>n/a</td></tr></table>";
*/
// end of temporary code

		if(mortgage == "a")
			{
				document.getElementById('posL1').innerHTML = "<div class=\"darr\"><a href=\"#yourMortgage\" class=\"blue\">Your mortgage</a><br /></div>";
			}
		/*if(job != "b")
			{
				document.getElementById('posL2').innerHTML = "<div class=\"darr\"><a href=\"#planning\" class=\"blue\">Planning ahead</a><br /></div>";
			}*/

// -- - start of section one - your money -------------------------------------------

		if(budget == "a") //struggling
			{
				if(mortgage == "a" && borrowing == "a")//para1
					{
						document.getElementById('section1a').innerHTML = "<p>Before you do anything else, think about what you can do to sort out your day-to-day finances. Remember, if you don't keep up the repayments on your mortgage, you could lose your home. Take a look at our budgeting checklist for some tips on how to make the most of your money. </p>";
					}
				else//para1
					{
						document.getElementById('section1a').innerHTML = "<p>Before you do anything else, think about what you can do to sort out your day-to-day finances. Take a look at our budgeting checklist for some tips on how to make the most of your money. </p>";
					}
			}
		else if(budget == "b") //coping - para2
			{
				document.getElementById('section1').innerHTML = "<p>You say that you're coping with your day-to-day spending at the moment. But it doesn't take much for things to get out of control - you could take a look at our budgeting checklist for some tips on how to make the most of your money.</p>";
			}
		//else if(budget == "c") //fine - no message - para3

			
		if (borrowing == 'd') //problems
			{
				if (budget != 'a') //not struggling - para4
					{
						document.getElementById('section2').innerHTML = "<p>Before you do anything else, you should take action now to tackle your borrowing problems. If you don't do anything, things could easily get worse.</p>";
					}
				else if(budget == 'a')//para4
					{
						document.getElementById('section2').innerHTML = "<p>And take action now to tackle your borrowing problems. If you don't do anything, things could easily get worse.</p>";
					}
				if (mortgage == 'a') //yes - para5
					{
						document.getElementById('section3').innerHTML = "<p>Remember, you could lose your home if you don't keep up the repayments on your mortgage or any other loan secured on the property.</p>";
					}
				else if(mortgage == 'b')//para5
					{
						document.getElementById('section3').innerHTML = "<p>Remember, you could lose your home if you don't keep up the repayments on any loan secured on it.</p>";
					}
				//para6
				document.getElementById('section4').innerHTML = "<p>But don't panic! Most borrowing problems can be sorted out if you take the right steps. Look at our checklist for some ideas on what to do - or take our Debt Test. You might also want to get some specialist debt advice. And think carefully before you take on any more borrowing.</p>";
			}
		else if (borrowing == 'c') // struggling
	  		{
				if (budget != 'a') // not struggling - para7
		  			{
						document.getElementById('section2').innerHTML = "<p>Before you do anything else think now about what you can do to get on top of your borrowing - it sounds as though it may be getting out of control. If you don't do anything, things could easily get worse.</p>";
					}
				else if(budget == 'a')//para7
					{
						document.getElementById('section2').innerHTML = "<p>And think now about what you can do to get on top of your borrowing - it sounds as though it may be getting out of control. If you don't do anything, things could easily get worse.</p>";
					}
				if (mortgage == 'a')//para8
					{
						document.getElementById('section3').innerHTML = "<p>Remember, you could lose your home if you don't keep up the repayments on your mortgage or any other loan secured on the property.</p>";
					}
				else if(mortgage == 'b')//para8
					{
						document.getElementById('section3').innerHTML = "<p>Remember, you could lose your home if you don't keep up the repayments on any loan secured on it.</p>";
					}
				//para9
				document.getElementById('section4').innerHTML = "<p>Look at our  borrowing checklists for some ideas on how to manage your borrowing sensibly and what to do if it has got out of hand. Or you could take our Debt Test. And think carefully before you take on any more borrowing.</p>";
			}
		else if (borrowing == 'b') // coping - para10
			{
						document.getElementById('section2').innerHTML = "<p>Your borrowing seems to be under control at the moment. But debt problems can creep up on you, so remember to keep an eye on it. Our checklist has some tips on how to manage your borrowing sensibly. Or you could look at your borrowing in more detail with our Debt Test.</p>";
			}
		//else if(borrowing == 'a') //none - no message - para11

		if (emergency == 'c') // struggling
			{
				if (budget != 'c') //not no problem - para12
					{
						document.getElementById('section5').innerHTML = "<p>You say you might struggle to find some money in an emergency. Think about putting some money away for a 'rainy day' or making other plans now if you can afford it. Look at our checklist for some ideas on what you could do.</p>";
					}
				else//para12
					{
						document.getElementById('section5').innerHTML = "<p>You say you might struggle to find some money in an emergency. Think about putting some money away for a 'rainy day' or making other plans now. Look at our checklist for some ideas on what you could do.</p>";
					}
			}
		else if (emergency == 'b') // coping
			{
				if (budget != 'c') // not no problem - para13
					{
						document.getElementById('section5').innerHTML = "<p>You say that you could probably find some money in an emergency. But it's a good idea to put a bit of money away for a 'rainy day' or make other plans now if you can afford it. Look at our checklist for some ideas on what you could do.</p>";
					}
				else//para13
					{
						document.getElementById('section5').innerHTML = "<p>You say that you could probably find some money in an emergency. But it's a good idea to put a bit of money away for a 'rainy day' or make other plans now. Look at our checklist for some ideas on what you could do.</p>";
					}
			}
	  
		if (emergency == 'a') //fine
			{
				if (borrowing == 'c' || borrowing == 'd')//struggling or problems - para14
					{
						document.getElementById('section5').innerHTML = "<p>You say that you've got some money put to one side for emergencies, but remember to check from time to time that it's still enough, especially if your circumstances change. And you could think about using some of it to pay off some of your debts</p>";
					}
				else//para14
					{
							document.getElementById('section5').innerHTML = "<p>You say that you've got some money put to one side for emergencies, but remember to check from time to time that it's still enough, especially if your circumstances change.</p>";
					}
			}
				
//moreAbouts
		if (borrowing == 'c' || borrowing == 'd')
    		{
	  			document.getElementById('posL3').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551777.stm' target='_blank'>Tackling borrowing problems</a><br /></div>";
			}
		if (borrowing == 'b' || borrowing == 'c')
			{
				document.getElementById('posL4').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4676462.stm' target='_blank'>Managing your borrowing</a><br /></div>";
			}
		if(borrowing == 'd')
			{
				document.getElementById('posL4a').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551833.stm' target='_blank'>Getting information & advice</a><br /></div>";
			}
// - end of section one - your money -

//-- start of section two - the worst -----------------------------------------
//Own life protection
		if(own_life == 'a' && (partner == 'a' && p_life == 'a'))//para15
			{
				document.getElementById('section7').innerHTML = "<p>It sounds as if money wouldn't be a problem if you or your partner died.  But remember to review your arrangements from time to time, especially if your circumstances change.</p>";
			}
		else
			{
				if(own_life == 'a' && partner == 'a' && p_life != 'a' && dependants == 'a')//para16
					{
						document.getElementById('section7').innerHTML = "<p>You've said that your partner and dependants would manage financially if you died. But remember to review your arrangements from time to time, particularly if your circumstances change.</p>";
					}
					
				else if(own_life == 'a' && partner == 'a' && p_life != 'a' && dependants == 'b')//para17
					{
						document.getElementById('section7').innerHTML = "<p>You've said that your partner would manage financially if you died.  But remember to review your arrangements from time to time, particularly if your circumstances change.</p>";
					}
				else if(own_life == 'a' && partner == 'b' && dependants == 'a')//para18
					{
						document.getElementById('section7').innerHTML = "<p>You've said that your dependants would manage financially if you died.  But remember to review your arrangements from time to time, particularly if your circumstances change.</p>";
					}
				
				if(own_life == 'b' || own_life == 'c')
					{
						if(dependants == 'a' && partner == 'a')//para19
							{ 
								document.getElementById('section8').innerHTML = "<p>It is important to take what steps you can now to provide for your partner and dependants if you die.  Otherwise, they could suffer financially after your death.  Our checklist on 'protecting your dependants' has some ideas on what you could do.</p>";
							}
						else if(dependants == 'b' && partner == 'a')//para19
							{
								document.getElementById('section8').innerHTML = "<p>It is important to take what steps you can now to provide for your partner if you die.  Otherwise, they could suffer financially after your death.  Our checklist on 'protecting your dependants' has some ideas on what you could do.</p>";
							}
						else if(dependants == 'a' && partner == 'b')//para19
							{
								document.getElementById('section8').innerHTML = "<p>It is important to take what steps you can now to provide for your dependants if you die.  Otherwise, they could suffer financially after your death.  Our checklist on 'protecting your dependants' has some ideas on what you could do.</p>";
							}
					}
					
				if(partner == 'a' && p_life == 'a' && own_life != 'a')//para20
					{
						document.getElementById('section9').innerHTML = "<p>It sounds as if money wouldn't be a problem if your partner died.  But remember to review your arrangements from time to time, especially if your circumstances change.</p>";
					}
//Partner life protection - only if has partner					
				if(partner == 'a' && (p_life == 'b' || p_life == 'c'))
					{
						if(dependants == 'a')//para21
							{
								document.getElementById('section9').innerHTML = "<p>It's also important to do what you can now to protect you and your dependants if your partner dies.  Or you could run into money problems after their death. Look at our checklist on 'protecting your dependants' for more information on how you could do this.</p>";
							}
						else if(dependants == 'b')//para21
							{
								document.getElementById('section9').innerHTML = "<p>It's also important to do what you can now to protect yourself financially if your partner dies.  Or you could run into money problems after their death.  Look at our checklist on 'protecting your dependants' for more information on how you could do this.</p>";
							}
					}
			}
//Income protection - only if user and/or partner is working				
				if(job == 'a' && p_job == 'a' && income == 'a')//para22
					{
						document.getElementById('section10').innerHTML = "<p>You've said that you would have enough money to live on if you or your partner lost your job or couldn't work. But you should check this from time to time, particularly if your situation changes.</p>";
					}
				else if(job == 'a' && p_job != 'a' && income == 'a')//para23	
					{
						document.getElementById('section10').innerHTML = "<p>You've said that you would have enough money to live on if you lost your job or couldn't work. But you should check this from time to time, particularly if your situation changes.</p>";
					}
				else if(job != 'a' && p_job == 'a' && income == 'a')//para24	
					{
						document.getElementById('section10').innerHTML = "<p>You've said that you would have enough money to live on if your partner lost their job or couldn't work. But you should check this from time to time, particularly if your situation changes.</p>";
					}
					
				if(income == 'b' || income == 'c')
					{
						if((job == 'a' && p_job == 'a'))
							{
								document.getElementById('section11').innerHTML = "<p>Take time to think about how you would manage if you or your partner lost your job or couldn't work.  Our 'income protection' checklist has some ideas on what you could do to reduce the impact of an unexpected drop in your income.</p>";
							}
						else if(job == 'a' && (p_job != 'a' || partner == 'b'))
							{
								document.getElementById('section11').innerHTML = "<p>Take time to think about how you would manage if you lost your job or couldn't work.  Our 'income protection' checklist has some ideas on what you could do to reduce the impact of an unexpected drop in your income.</p>";
							}
						else if(job != 'a' && p_job == 'a')
							{
								document.getElementById('section11').innerHTML = "<p>Take time to think about how you would manage if your partner lost their job or couldn't work.  Our 'income protection' checklist has some ideas on what you could do to reduce the impact of an unexpected drop in your income.</p>";
							}
					}
//Other person protection - only if depends on someone other than partner
				if(dependancies == 'a')//para26
					{
						document.getElementById('section12').innerHTML = "<p>You've said that you rely on somebody else for financial or other support. It is important to think about how you would cope if something happened to the person you rely on and they were no longer able to support you - because they died or lost their job, for example.  Look at our checklists for tips and more information.</p>";
					}					
			//}
//wills - all users
		if(partner == 'a' && dependants == 'a')
			{
				document.getElementById('section13').innerHTML = "<p>It's usually a good idea to make a will. Keep it up to date and make sure that other people know where to find it. This will help to make sure that your money goes where you want if you die and can help to safeguard the interests of your partner and dependants.</p>";
			}
		else if(partner == 'a' && dependants == 'b')
			{
				document.getElementById('section13').innerHTML = "<p>It's usually a good idea to make a will. Keep it up to date and make sure that other people know where to find it. This will help to make sure that your money goes where you want if you die and can help to safeguard the interests of your partner.</p>";
			}
		else if(partner == 'b' && dependants == 'a')
			{
				document.getElementById('section13').innerHTML = "<p>It's usually a good idea to make a will. Keep it up to date and make sure that other people know where to find it. This will help to make sure that your money goes where you want if you die and can help to safeguard the interests of your dependants.</p>";
			}
		else if(partner == 'b' && dependants == 'b')
			{
				document.getElementById('section13').innerHTML = "<p>It's usually a good idea to make a will.  Keep it up to date and make sure that other people know where to find it.  This will help to make sure that your money goes where you want if you die.</p>";
			}
			
//more abouts
		if (dependancies == 'a' || partner == 'a' || dependants == 'a' || job == 'a' || p_job == 'a')
			{
				document.getElementById('posL5').innerHTML = "<span class='checklist'><b>CHECKLISTS</b> - for more information and useful links</span>";
			}		  
		if (dependancies == 'a' || partner == 'a' || dependants == 'a')
			{
				document.getElementById('posL6').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551785.stm' target='_blank'>Protecting your dependants</a><br /></div>";
			}
		if (dependancies == 'a' || job == 'a' || p_job == 'a')
			{
				document.getElementById('posL7').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551791.stm' target='_blank'>Protecting your income</a><br /></div>";
			}
			
// -- end of section two - the worst

//-- start of section three - your mortgage ----------------------------- 
		if (mortgage == 'a') // yes
			{
				document.getElementById('section14').innerHTML = "<a name=\"yourMortgage\"></a><div class=\"resultsHeader\">YOUR MORTGAGE</div>";
	
				if (budget != 'a' && (borrowing == 'a' || borrowing == 'b')) // struggling & none
					{
						document.getElementById('section15').innerHTML = "<p>You say you're up to date with your mortgage at the moment but remember, if you don't keep up the repayments, you could lose your home. It's worth thinking now about whether you could still pay your mortgage if your circumstances changed (if you were ill, for example) or if interest rates rise.</p>";
					}
	  
				if (mortgageType == 'a') // interest only
					{
						if (repaymentPlan == 'a') // yes
							{
								document.getElementById('section16').innerHTML = "<p>You think you'll have enough money to repay your mortgage when the time comes. But it is a good idea to review your arrangements from time to time to make sure that you are still on track to repay the loan.</p>";
							}
						else if (repaymentPlan == 'b') // not sure
							{
								document.getElementById('section16').innerHTML = "<p>You aren't sure that you will have enough money to repay your mortgage when the time comes. Take time to review your repayment arrangements now to check whether you are still on track to repay the loan and make additional plans if you need to. See our 'interest-only mortgage' checklist for more information.</p>";
							}
						else // no
							{
								document.getElementById('section16').innerHTML = "<p>Your monthly mortgage payments only cover the interest on the loan. So you need to make separate arrangements to repay your mortgage balance when the time comes - or you could lose your home. Our 'interest-only mortgage' checklist has more information on how to do this.</p>";
							}
					}
				else if (mortgageType == 'c') // both
					{
						if (repaymentPlan == 'a') // yes
							{
								document.getElementById('section16').innerHTML = "<p>You think you'll have enough money to repay the interest-only part of your mortgage when the time comes. But it is a good idea to review your arrangements from time to time to make sure that you are still on track to repay the loan.</p>";
							}
						else if (repaymentPlan == 'b') // not sure
							{
								document.getElementById('section16').innerHTML = "<p>You aren't sure that you will have enough money to repay the interest-only part of your mortgage when the time comes. Take time to review your repayment arrangements now to check whether you are still on track to repay the loan and make additional plans if you need to. See our 'interest-only mortgage' checklist for more information.</p>";
							}
						else // no
							{
								document.getElementById('section16').innerHTML = "<p>Part of your mortgage is on an interest-only basis. Your monthly payments only cover the interest on this part of the loan. So you need to make separate arrangements to repay the interest-only part of your mortgage when the time comes - or you could lose your home. Our 'interest-only mortgage' checklist has more information on how to do this.</p>";
							}
					}
				else if (mortgageType == 'd') // don't know
					{
						document.getElementById('section16').innerHTML = "<p>You really need to know what kind of mortgage you have. If you have an interest-only loan and haven't also got plans to repay it when the time comes, then you could lose your home. You can find out what type of mortgage you have now by looking at your annual mortgage statement or contacting your mortgage lender.</p>";
					}
					
				document.getElementById('section17').innerHTML = "<p>If you haven't reviewed your mortgage recently, you might find that you can reduce your monthly payments.  Our checklist has some tips on how to review your mortgage.</p>";

				
				document.getElementById('section18c').innerHTML = "<table cellspacing='0' cellpadding='0' border='0' width='100%'><tr><td colspan='2'><span class='checklist'><b>CHECKLISTS</b> - for more information and useful links</span><br /><img src='img/o.gif' width='1' height='5' alt='' /></td></tr><tr><td colspan='2'><div id='section18e'></div></td></tr><tr><td width='341' align='left'><div id='section18f'></div></td><td width='75' align='right'><div id='section18g'></div></td></tr></table>";

				if (mortgageType != 'b')
  					{
						document.getElementById('section18e').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551813.stm' target='_blank'>Interest-only mortgages</a><br /></div>";
  					}
				
				document.getElementById('section18f').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551799.stm' target='_blank'>Reviewing your mortgage</a><br /></div>";

				document.getElementById('section18g').innerHTML = "<div class='uarr' style='align:right'><a href='#menu'>Back to top</a></div>";


  			}

//-- end of section three - your mortgage ----------------------------------------------------

//-- start of section four - planning ahead --------------------------------------------------
		if (job != 'b') // not retired
			{
				if ((pension == 'b' || pension == 'c') && retire == 'b') // none or don't know & no
					{
						if (age == 'a') // under 30 - para37&38
							{
								if (partner == 'a' && p_job != 'b' && p_retire == 'b') // yes & not retired & not going to
									{
										document.getElementById('section19').innerHTML = "<p>It's never too early to start making plans for your retirement. The earlier you start putting something away, the more time it will have to grow and the more money you're likely to have to live on when you retire.</p><p>Our 'saving for retirement' checklist has some ideas about what you could do. You might also want to take your partner's plans for retirement into account. And remember to review your plans regularly to make sure they'll give you the income you expect when you retire.</p>";
									}
								else
									{
										document.getElementById('section19').innerHTML = "<p>It's never too early to start making plans for your retirement. The earlier you start putting something away, the more time it will have to grow and the more money you're likely to have to live on when you retire. </p><p>Our 'saving for retirement' checklist has some ideas about what you could do. And remember to review your plans regularly to make sure they'll give you the income you expect when you retire.</p>";
									}
							}
						else if (age == 'b') // 30 - 55 - para39&40
							{
								if (partner == 'a' && p_job != 'b' && p_retire == 'b') // yes & not retired & not going to
									{
										document.getElementById('section19').innerHTML = "<p>Although it's still some way off, it's a good idea to start making plans for your retirement now. The earlier you start putting something away, the more time it has to grow and the more money you're likely to have to live on when you retire.</p><p>Our 'saving for retirement' checklist has some ideas about what you could do. You might also want to take your partner's plans for retirement into account. And remember to review your plans regularly to make sure they'll give you the income you expect when you retire.</p>";
									}
								else
									{
										document.getElementById('section19').innerHTML = "<p>Although it's still some way off, it's a good idea to start making plans for your retirement now. The earlier you start putting something away, the more time it has to grow and the more money you're likely to have to live on when you retire. </p><p>Our 'saving for retirement' checklist has some ideas about what you could do. And remember to review your plans regularly to make sure they'll give you the income you expect when you retire.</p>";
									}
							}
						else if (age == 'c')// over 55 - para41
							{
								if (partner == 'a' && p_job != 'b' && p_retire == 'b') // yes & not retired & not going to
									{
												document.getElementById('section19').innerHTML = "<p>You should start thinking about your retirement now. It's never too late to start making plans - our 'saving for retirement' checklist has some ideas about what you could do. But you may not have many years left to put some money away and your options might be more limited now. It might be worth getting some professional advice. And you might also want to take your partner's plans for retirement into account.</p>";
									}
								else
									{
												document.getElementById('section19').innerHTML = "<p>You should start thinking about your retirement now. It's never too late to start making plans - our 'saving for retirement' checklist has some ideas about what you can do. But you may not have many years left to put some money away and your options might be more limited now. It might be worth getting some professional advice.</p>";
									}
							}
					}
	  
  	 			else if ((pension == 'b' || pension == 'c') && retire == 'a') // none or don't know & yes
       				{
	     				if (partner == 'a' && p_job != 'b' && p_retire == 'a')//para42
							{
								document.getElementById('section19').innerHTML = "<p>You should start thinking about your retirement now - what will you live on once you and your partner stop work? It's never too late to start making plans but you don't have much time left to put any money away - your options might be more limited now. You could consider retiring a bit later - this would give you more time to build up some retirement savings</p>";
							}
						else//para42
							{
								document.getElementById('section19').innerHTML = "<p>You should start thinking about your retirement now - what will you live on once you stop work? It's never too late to start making plans but you don't have much time left to put any money away - your options might be more limited now. You could consider retiring a bit later - this would give you more time to build up some retirement savings</p>";
							}
							
						if (partner == 'a' && p_job != 'b' && p_retire == 'b') // yes & not retired & not going to - para43
	      					{
	        					document.getElementById('section19a').innerHTML = "<p>Our retirement checklists have some ideas on what you might need to think about. And it might be worth getting some professional advice. You may also want to take your partner's plans for retirement into account.</p>";
	      					}
						else//para43
	      					{
	        					document.getElementById('section19a').innerHTML = "<p>Our retirement checklists have some ideas on what you might need to think about. And it might be worth getting some professional advice.</p>";
	      					}
					}
	   			
				if (pension == 'a' && retire == 'b') // yes & no
					{
						if (partner == 'a' && p_job != 'b' && p_retire == 'b')//para44
							{
								document.getElementById('section19').innerHTML = "<p>It sounds as though you've already made some plans for your retirement. But remember to review them regularly to make sure that they're still on track to give you the income you expect when you retire. You might also want to take your partner's plans for retirement into account.</p>";
							}
						else//para44
							{
								document.getElementById('section19').innerHTML = "<p>It sounds as though you've already made some plans for your retirement. But remember to review them regularly to make sure that they're still on track to give you the income you expect when you retire.</p>";
							}
					}
				else if (pension == 'a' && retire == 'a') // yes & yes
					{
						if (partner == 'a' && p_job != 'b' && p_retire == 'a')//para45
							{
								document.getElementById('section19').innerHTML = "<p>You should start thinking about your retirement now - what will you live on once you and your partner retire? Our 'income in retirement' checklist has some ideas on what you might need to think about.</p><p>Making the most of your retirement savings can be complicated - you might want to get some professional advice.</p>";
							}
						else if (partner == 'a' && p_job != 'b' && p_retire == 'b')//para45
							{
								document.getElementById('section19').innerHTML = "<p>You should start thinking about your retirement now - what will you live on once you retire? Our 'income in retirement' checklist has some ideas on what you might need to think about.</p><p>Making the most of your retirement savings can be complicated - you might want to get some professional advice. You may also want to take your partner's plans for retirement into account.</p>";
							}
						else//para45
							{
								document.getElementById('section19').innerHTML = "<p>You should start thinking about your retirement now - what will you live on once you retire? Our 'income in retirement' checklist has some ideas on what you might need to think about.</p><p>Making the most of your retirement savings can be complicated - you might want to get some professional advice.</p>";
							}
					}
			}
			
		if(((job != 'b' && retire == 'b') || job == 'b') && (partner == 'a' && p_job != 'b' && p_retire == 'a'))//para46
			{
				document.getElementById('section20').innerHTML = "<p>Start thinking now about what you will live on when your partner retires. Our 'income in retirement' checklist has some ideas on what you might need to think about.</p>";
			}
			
		if(job == 'b' && partner == 'a' && p_job != 'b' && p_retire == 'b')//para46a
			{
				document.getElementById('section20').innerHTML = "<p>Although it may be some way off, it's a good idea to make plans for when your partner retires - and to review them from time to time.  Take a look at our retirement checklists for more information and ideas.</p>";
			}
			
		if (job == 'b')//para47
			{
				document.getElementById('section21').innerHTML = "<p>You might want to think about building up some savings and investments, if you can afford it, or reviewing what you have already - take a look at our 'saving & investing' checklist for some tips. But you may want to look at other areas of your finances first.</p>";
			}
		
		if (job != 'b')//para48
			{
				document.getElementById('section21').innerHTML = "<p>You might want to think about building up some other savings and investments, if you can afford it, or reviewing what you have already - take a look at our 'saving & investing' checklist for some tips. But you may want to look at other areas of your finances first.</p>";
			}	
						
		if (job != 'b' || (job == 'b' && partner == 'a' && p_job != 'b' && p_retire == 'b'))
			{
				document.getElementById('posL8').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551819.stm' target='_blank'>Saving for retirement</a><br /></div>";
			}
		if ((job != 'b') || (job == 'b' && partner == 'a' && p_job != 'b'))
			{
        		document.getElementById('posL9').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551827.stm' target='_blank'>Income in retirement</a><br /></div>";
      		}
		if (job != 'b' && (retire == 'a' || age == 'c'))
			{
				document.getElementById('posL10').innerHTML = "<div class='moreabout'><a href='http://news.bbc.co.uk/1/hi/business/4551833.stm' target='_blank'>Getting information & advice</a><br /></div>";
			}
			
// what you said... --------------------------------------------
		var wotusedString;
		var ageString;
		var jobString;
		var retireString;
		var partnerString;
		var partnerJobString;
		var pRetireString;
		var dependanciesString;
		var dependantsString;
		var mortgageString;
		var borrowingString;
		var budgetString;
		var emergencyString;
		var worstString;
		var worst2String;
		var worst3String;
		var mortgageTypeString;
		var repaymentString;
		var pensionString;

// age
		if (age == 'a')
  			{
    			ageString = "<ul><li>You're under 30</li>";
  			}
		else if (age == 'b')
	  		{
	    		ageString = "<ul><li>You're 30 to 55 years old</li>";
	  		}
		else
	  		{
	    		ageString = "<ul><li>You're over 55</li>";
	  		}
		
		wotusedString = ageString;
		
		// job
		if (job == 'a')
  			{
    			jobString = "<li>You're working</li>";
  			}
		else if (job == 'b')
	  		{
	    		jobString = "<li>You're retired</li>";
	  		}
		else
	  		{
	    		jobString = "<li>You're neither working nor retired</li>";
	  		}
		
		wotusedString = wotusedString +jobString;
		
// partner
		if (partner == 'a')
  			{
    			partnerString = "<li>You're married or living with a partner</li>";
  			}
		else if(partner == 'b')
			{
				partnerString = "<li>You aren't married or living with a partner</li>";
			}
			
		wotusedString = wotusedString +partnerString;
		
// retirement
		/*if (job != 'b')
  			{
    			if (retire == 'a')
	  				{
	    				retireString = "<li>You expect to retire in the next five years</li>";
	  				}
				else
	  				{
	    				retireString = "<li>You don't expect to retire in the next five years</li>";
	  				}
					
				wotusedString = wotusedString +retireString;
  			}*/
			

// partner job and retire  
		if (partner == 'a')
  			{
    			if (p_job == 'a')
	  				{
	    				partnerJobString = "<li>Your partner is working</li>";
	  				}
				else if (p_job == 'b')
		  			{
		    			partnerJobString = "<li>Your partner is retired</li>";
		  			}
				else
		  			{
		    			partnerJobString = "<li>Your partner is neither working nor retired</li>";
		  			}
					
				wotusedString = wotusedString +partnerJobString;
  			}
		
			
	/*	if (partner == 'a' && p_job != 'b')
  			{  
    			if (p_retire == 'a')
	  				{
						pRetireString = "<li>Your partner is planning to retire in the next five years</li>";
	  				}
				else
	  				{
						pRetireString = "<li>Your partner is not planning to retire in the next five years</li>";
	  				}
					
				wotusedString = wotusedString +pRetireString;				
  			}	*/   

		if (dependancies == 'a')
			{
				if (partner == 'b')
					{
						dependanciesString = "<li>You rely on someone else for support</li>";
					}
				else
					{
						dependanciesString = "<li>You rely on someone other than your partner for support</li>";
					}
					
				}  
		else if (dependancies == 'b')
			{
				if (partner == 'b')
					{
						dependanciesString = "<li>You don't rely on anyone else for support</li>";
					}
				else
					{
						dependanciesString = "<li>You don't rely on anyone other than your partner for support</li>";
					}
			}
			
		wotusedString = wotusedString +dependanciesString;
  
		if (dependants == 'b')
  			{
    			if (partner == 'b')
	  				{
	    				dependantsString = "<li>No-one else relies on you for support</li>";
	  				}
				else
	  				{
	    				dependantsString = "<li>No-one other than your partner relies on you for support</li>";
	  				}
  			}
  
		if (dependants == 'a')
  			{
    			if (partner == 'b')
	  				{
	    				dependantsString = "<li>Someone else relies on you for support</li>";
	  				}
				else
	  				{
	    				dependantsString = "<li>Someone other than your partner relies on you for support</li>";
	  				}
  			}
			
		wotusedString = wotusedString +dependantsString;
		 
 //budget 		
		if(budget == 'a')//struggling
			{
				budgetString = "<li>You're struggling to make ends meet</li>";
			}
		else if(budget == 'b')//struggling
			{
				budgetString = "<li>You can mostly afford what you need</li>";
			}
		else if(budget == 'c')//struggling
			{
				budgetString = "<li>You can afford what you want and often have money left over</li>";
			}
  
  		wotusedString = wotusedString +budgetString;
  
  //emergency
  		if(emergency == 'a')//struggling
			{
				emergencyString = "<li>You have some money put aside for a 'rainy day'</li>";
			}
		else if(emergency == 'b')//struggling
			{
				emergencyString = "<li>You would probably be able to find some money in an emergency</li>";
			}
		else if(emergency == 'c')//struggling
			{
				emergencyString = "<li>You might struggle to find some money in an emergency</li>";
			}
  
  		wotusedString = wotusedString +emergencyString;
  
  
  //borrowing
		if (mortgage == 'a')
  			{
    			if(borrowing == 'a')
					{
						borrowingString = "<li>You're up to date with the mortgage and don't have any other loans or money outstanding on any cards</li>";
					}
				else if(borrowing == 'b')
					{
						borrowingString = "<li>You're up to date with the payments on the mortgage, any other loans and cards and know how you will repay what you owe</li>";
					}
				else if(borrowing == 'c')
					{
						borrowingString = "<li>You sometimes miss payments on the mortgage, other loans or cards or don't know how you will repay what you owe</li>";
					}
				else if(borrowing == 'd')
					{
						borrowingString = "<li>You're behind with the mortgage or having serious problems with other borrowing</li>";
					}
					
				wotusedString = wotusedString +borrowingString;
			}
		else if (mortgage == 'b')
	  		{
	    		if(borrowing == 'a')
					{
						borrowingString = "<li>You don't have any loans or money outstanding on any cards</li>";
					}
				else if(borrowing == 'b')
					{
						borrowingString = "<li>You're up to date with the payments on any loans and cards and know how you will repay what you owe</li>";
					}
				else if(borrowing == 'c')
					{
						borrowingString = "<li>You don't know how you will repay what you owe or sometimes miss payments on your loans or cards</li>";
					}
				else if(borrowing == 'd')
					{
						borrowingString = "<li>You're having serious problems with your borrowing</li>";
					}
				
				wotusedString = wotusedString +borrowingString;
  			}
			
		
		
//mortgage
		if(mortgage == 'b')
			{
				mortgageString = "<li>You don't have a mortgage</li>";
				wotusedString = wotusedString +mortgageString;
			}
			
//worst
		if (own_life == 'a')
  			{
    			if (partner == 'a' && dependants == 'a')
	  				{
        				worstString = "<li>Your partner and dependants would have enough money to live on if you died</li>";
	  				}
				else if (partner == 'a' && dependants == 'b')
	  				{
	    				worstString = "<li>Your partner would have enough money to live on if you died</li>";
	  				}
				else if (partner == 'b' && dependants == 'a')
	  				{
	    				worstString = "<li>Your dependants would have enough money to live on if you died</li>";
	  				}
					
				wotusedString = wotusedString +worstString;
			}
		else if (own_life == 'b')
			{
    			if (partner == 'a' && dependants == 'a')
	  				{
        				worstString = "<li>Your partner and dependants would probably struggle to get by if you died</li>";
	  				}
				else if (partner == 'a' && dependants == 'b')
	  				{
	    				worstString = "<li>Your partner would probably struggle to get by if you died</li>";
	  				}
				else if (partner == 'b' && dependants == 'a')
	  				{
	    				worstString = "<li>Your dependants would probably struggle to get by if you died</li>";
	  				}
					
				wotusedString = wotusedString +worstString;
			}
		else if (own_life == 'c')
			{
    			if (partner == 'a' && dependants == 'a')
	  				{
        				worstString = "<li>You're not sure if your partner and dependants would have enough money to live on if you died</li>";
	  				}
				else if (partner == 'a' && dependants == 'b')
	  				{
	    				worstString = "<li>You're not sure if your partner would have enough money to live on if you died</li>";
	  				}
				else if (partner == 'b' && dependants == 'a')
	  				{
	    				worstString = "<li>You're not sure if your dependants would have enough money to live on if you died</li>";
	  				}
					
				wotusedString = wotusedString +worstString;
			}
					  
  				
//worst2
		if(partner == 'a')
			{
				if(p_life == 'a')
					{
						worst2String = "<li>You would have enough money to live on if your partner died</li>";
					}
				else if(p_life == 'b')
					{
						worst2String = "<li>You'd probably struggle to get by if your partner died</li>";
					}
				else if(p_life == 'c')
					{
						worst2String = "<li>You're not sure if you would have enough money to live on if your partner died</li>";
					}
					
				wotusedString = wotusedString +worst2String;
			}
				
//worst3
		if(income == 'a')
			{
				if(job == 'a' && partner == 'a' && p_job == 'a')
					{
						worst3String = "<li>You would have enough money to live on if you or your partner lost your job or couldn't work</li>";
					}
				else if(job != 'a' && partner == 'a' && p_job == 'a')
					{
						worst3String = "<li>You would have enough money to live on if your partner lost their job or couldn't work</li>";
					}
				else if(job == 'a' && (partner == 'b' || (partner == 'a' && p_job != 'a')))
					{
						worst3String = "<li>You would have enough money to live on if you lost your job or couldn't work</li>";
					}
					
				wotusedString = wotusedString +worst3String;			
			}
		else if(income == 'b')
			{
				if(job == 'a' && partner == 'a' && p_job == 'a')
					{
						worst3String = "<li>You would probably struggle to get by if you or your partner lost your job or couldn't work</li>";
					}
				else if(job != 'a' && partner == 'a' && p_job == 'a')
					{
						worst3String = "<li>You would probably struggle to get by if your partner lost their job or couldn't work</li>";
					}
				else if(job == 'a' && (partner == 'b' || (partner == 'a' && p_job != 'a')))
					{
						worst3String = "<li>You would probably struggle to get by if you lost your job or couldn't work</li>";
					}	
					
				wotusedString = wotusedString +worst3String;		
			}
		else if(income == 'c')
			{
				if(job == 'a' && partner == 'a' && p_job == 'a')
					{
						worst3String = "<li>You're not sure if you would have enough money to live on if you or your partner lost your job or couldn't work</li>";
					}
				else if(job != 'a' && partner == 'a' && p_job == 'a')
					{
						worst3String = "<li>You're not sure if you would have enough money to live on if your partner lost their job or couldn't work</li>";
					}
				else if(job == 'a' && (partner == 'b' || (partner == 'a' && p_job != 'a')))
					{
						worst3String = "<li>You're not sure if you would have enough money to live on if you lost your job or couldn't work</li>";
					}	
					
				wotusedString = wotusedString +worst3String;		
			}
				
		
		
//mortgageType
		if(mortgage == 'a')
			{
				if(mortgageType == 'a')
					{
						mortgageTypeString = "<li>You have an interest-only/endowment mortgage</li>";
					}
				else if(mortgageType == 'b')
					{
						mortgageTypeString = "<li>You have a repayment mortgage</li>";
					}
				else if(mortgageType == 'c')
					{
						mortgageTypeString = "<li>Part of your mortgage is interest-only/endowment and part is repayment</li>";
					}
				else if(mortgageType == 'd')
					{
						mortgageTypeString = "<li>You don't know what kind of mortgage you have</li>";
					}
					
				wotusedString = wotusedString +mortgageTypeString;
			}		
				
			
			
//repayment
		if(repaymentPlan == 'a')
			{
				if(mortgageType == 'c')
					{
						repaymentString = "<li>You think you'll have enough money to pay off the interest-only/endowment part of your mortgage</li>";
					}
				else if(mortgageType == 'a')
					{
						repaymentString = "<li>You think you'll have enough money to pay off your mortgage</li>";
					}
					
				wotusedString = wotusedString +repaymentString;
			}
		else if(repaymentPlan == 'b')
			{
				if(mortgageType == 'c')
					{
						repaymentString = "<li>You aren't sure whether you'll have enough money to pay off the interest-only/endowment part of your mortgage</li>";
					}
				else  if(mortgageType == 'a')
					{
						repaymentString = "<li>You aren't sure whether you'll have enough money to pay off your mortgage</li>";
					}
				wotusedString = wotusedString +repaymentString;
			}
		else if(repaymentPlan == 'c')
			{
				if(mortgageType == 'c')
					{
						repaymentString = "<li>You don't know how you will pay off the interest-only/endowment part of your mortgage</li>";
					}
				else  if(mortgageType == 'a')
					{
						repaymentString = "<li>You don't know how you will pay off your mortgage</li>";
					}
					
				wotusedString = wotusedString +repaymentString;
			}
				
		
	
//retire
		if(job != 'b' && retire == 'a')	
			{
				retireString = "<li>You expect to retire in the next five years</li>";
				wotusedString = wotusedString +retireString;
			}
		else if(job != 'b' && retire == 'b')
			{
				retireString = "<li>You don't expect to retire in the next five years</li>";
				wotusedString = wotusedString +retireString;
			}

//p_retire
		if(partner == 'a')
			{
				if(p_job != 'b' && p_retire == 'a')
					{
						pRetireString = "<li>Your partner is planning to retire in the next five years</li>";
						wotusedString = wotusedString +pRetireString;
					}
				else if(p_job != 'b' && p_retire == 'b')
					{
						pRetireString = "<li>Your partner is not planning to retire in the next five years</li>";
						wotusedString = wotusedString +pRetireString;
					}
			}
			
//pension
		if(job != 'b')
			{
				if(pension == 'a')
					{
						pensionString = "<li>You will have some money other than the State pension to live on once you've retired</li>";
					}
				else if(pension == 'b')
					{
						pensionString = "<li>You won't have any money other than the State pension to live on once you've retired</li>";
					}
				else if(pension == 'c')
					{
						pensionString = "<li>You're not sure if you will have any money other than the State pension to live on once you've retired</li>";
					}
				wotusedString = wotusedString +pensionString;
			}
			
		wotusedString = wotusedString +"</ul>";
		
		document.getElementById('wotused').innerHTML = wotusedString;

		
		var styleObject = document.getElementById(thisDiv).style;
		styleObject.visibility = "hidden";
		styleObject = document.getElementById(nextDiv).style;
		styleObject.visibility = "visible";


}

