Format JavaScript double to always show 2 decimal places
function format(n) { parseFloat(Math.round(n * 100) / 100).toFixed(2); }