function cent(amount) {
// returns the amount in the .99 format
    return (amount == Math.floor(amount)) ? amount + '.00' : (  (amount*10 == Math.floor(amount*10)) ? amount + '0' : amount);
}

function update(form) {

    var hosting = (form.plan.value - 0)
    hosting = Math.floor(hosting * 1000)/1000;
    form.totalhosting.value = cent(hosting);
	
    var ses = (form.submission.value - 0)
	var opt = (form.optimization.value - 0)
	var dir = (form.directory.value - 0)

	subtotal = ses + opt + dir;
    subtotal = Math.floor(subtotal * 1000)/1000;
    form.totalopt.value = cent(subtotal);

	total = hosting + ses + opt + dir;
    total = Math.floor(total * 1000)/1000;
    form.totalcurrent.value = cent(total);
}