I'm a cut and paste script guy and play with variables, but write no code.

I'm using a count up script that I want to set how many digits / numbers are displayed. The variables use large numbers and for this particular display I want to use three digits and a decimal, e.g. 16.5 versus 16.00000000000000.

Here is my code:


var START_DATE = new Date("February 27, 2013 11:53:00"); // put in the starting date here
var INTERVAL = 1; // in seconds
var INCREMENT = .000000048994; // increase per tick
var START_VALUE = 16.6; // initial value when it's the start date
var count = 0;




window.onload = function() {
var msInterval = INTERVAL * 1000;
var now = new Date();
count = parseInt((now - START_DATE)/msInterval) * INCREMENT + START_VALUE;
document.getElementById('counter').innerHTML = addCommas(count.toString());
setInterval(incrCount, msInterval);
}

function incrCount() {
count += INCREMENT;
document.getElementById('counter').innerHTML = addCommas(count.toString());
}

function addCommas(nStr){
nStr += '';
x = nStr.split('.');
x1 = x[0];
x2 = x.length > 1 ? '.' + x[1] : '';
var rgx = /(\d+)(\d{3})/;
while (rgx.test(x1)) {
x1 = x1.replace(rgx, '$1' + ',' + '$2');
}
return x1 + x2;
}


</script>