function displaycost()
{
var reduction = .03;
var total = 0;
var cost;
for (var i=0; i<document.form1.bt.length; i++)
  {
   if(document.form1.bt[i].checked){
   var boatrate=document.form1.bt[i].value;};
  };

var hl=boatrate.split(':');
var rate=parseInt(hl[1]);
var nd =document.getElementById('days').value;
if (nd > 30){nd=0;};
if (document.getElementById('season').checked){rate =parseInt(hl[0]);};
total = cal(nd,rate);
if (nd==0){total=0;};
var message = 'The cost of hire will be approx. <strong>&#163; '+Math.round(total)+'</strong><br />For a more detailed quote please phone 01279 42444';
if (nd==0){message+='<br />Input error.  Days can not be greater than 30';};
document.getElementById('cost').innerHTML = message;
document.getElementById('cost').className='cost';
};

function cal(t,a){s=a;if (t>1){for(i=1;i<t;i++){s = a+s*97/100;};};return s;};