function calculate(form) {
// cost of a packet of cigarettes
cost = parseInt(form.cigarettes_cost.value) * 100;

// cost of 1 cigarette
costPer = form.cigarettes_cost.value / 20;

// No. Smoked daily
daily = parseInt(form.cigarettes_daily.value);

// Days not smoking
days = parseInt(form.days.value);

// saving = cost per cigarette x no. smoked daily x days not smoking.
saving = (costPer * daily) * days;

document.getElementById('savingContainer').innerHTML = '<ol><li><label><strong>You could be saving:</strong></label><span>&pound;' + saving.toFixed(2) + '</span></li></ol>';

}
