

// How many seconds before incrementing by 1

var inc = 12;

 

// Start date of original inventory

var s = new Date("06/1/2010");

 

// Start count of original inventory

var start = 5398087;

 

document.writeln("<div align=\"center\" style=\"padding: 5px 0 5px 0;\"><div id=\"counter_inc\"  style=\"display: inline; border: 2px solid black;  font: Arial; font-size: 32px;  font-weight: bold; padding: 0 0 0 0;\"></div></div>");

 

function counter_inc(){

       d = new Date();

       i = start + parseInt(((d.getTime()-s.getTime())/1000)/inc);

       incx = '';

       document.getElementById("counter_inc").style.fontSize = parseInt(190/(i.toString().length*0.80));

       for ( j = 0; j <= i.toString().length; j++){

              if ( i.toString().substring(j,j+1) != '' ){

                     incx += "<div style=\"display: inline; padding: 0 3px 0 3px; border-left: 1px solid #000; border-right: 1px solid #000;\">";

                     incx += i.toString().substring(j,j+1);

                     incx += "</div>";

              }

       }

       document.getElementById("counter_inc").innerHTML = incx;

       setTimeout(counter_inc,1000*inc);

}

counter_inc();

 