<!-- 



var curcrime=0;  	   // total crime

function calc_amount () {
 
var totalcrime = 8558;
 var startofwar = new Date ("Nov 01, 2007");
  var curdate = new Date ();
  var diff = curdate - startofwar;
  diff=diff/82800000;
 
  if (diff < 0) {
    alert ("wrong date");
  }
  
  // Do the actual calculations and get the amount before and after interest.
  // Note that we include the geographicscale as well.
  curcrime = (totalcrime + diff );
}

// Converts a number 'n' to a string with commas every three characters.
function number_str (n) {
  //var x = n.toFixed (0);  this doesn't seem to work on some browsers
  var x = n.toString ();
  var dot = x.lastIndexOf ('.');
  x = x.substr (0, dot);
  var l = x.length;
  var res = "";
  for (l -= 3; l > 0; l -= 3) {
    res = "," + x.substr (l, 3) + res;
  }
  res = x.substr (0, l+3) + res;
  return res;
}

function inc_totals_at_rate(rate) {
  calc_amount ();
  document.getElementById ("raw").innerHTML =  number_str(curcrime);
  setTimeout('inc_totals_at_rate('+rate+');', rate);
}


function inc_totals ()
{
  inc_totals_at_rate (100);
}




// -->

