// How Much Cover for www.policysaver.com 
// 27 Oct 2004



function HowMuchCover(){


// define the values of the variables from the form values


var annualincome=document.form1.form_annualincome.value-0;

var age=document.form1.form_age.value-0;

var mortgage=document.form1.form_mortgage.value-0;

var mortgageterm=document.form1.form_mortgageterm.value-0;

var otherloans=document.form1.form_otherloans.value-0;

var schoolfees=document.form1.form_schoolfees.value-0;

var schoolterm=document.form1.form_schoolterm.value-0;

var othercommitments=document.form1.form_othercommitments.value-0;

var monthlyneededincome=document.form1.form_monthlyneededincome.value-0;

var assets=document.form1.form_assets.value-0;

var existinglifecover=document.form1.form_existinglifecover.value-0;

var existingcicover=document.form1.form_existingcicover.value-0;



// calculate the results of the variables results_life and results_ci


life=(mortgage + otherloans + schoolfees + othercommitments) + (monthlyneededincome*200) - (assets + existinglifecover);
ci=(mortgage + otherloans + schoolfees + othercommitments) + ((annualincome/2)*(65-age)) - (assets + existingcicover);



// print results


document.form1.results_life.value="£ " + life;
document.form1.results_ci.value="£ " + ci;




}