function startClock() {
        timeRemaining();
}
function string(number, decimals) {
        var tempnum;
				var decimals;

        tempnum= Math.round(number)+" ";
        tempnum= tempnum.substring(0,tempnum.length-1);

        if (tempnum.length > 3) {
        tempnum = tempnum.substring(0,tempnum.length-3) + "," + tempnum.substring(tempnum.length-3, 99);
        }
        if (tempnum.length > 7) {
        tempnum = tempnum.substring(0,tempnum.length-7) + "," + tempnum.substring(tempnum.length-7, 99);
        }
        if (tempnum.length > 11) {
        tempnum = tempnum.substring(0,tempnum.length-11) + "," + tempnum.substring(tempnum.length-11, 99);
        }
				if (decimals > 0) {
	//	tempnum = number - Math.round(number) +" ";
					 decimalstring= number - Math.round(number) +" ";
					 decimalstring= decimalstring.substring(1,decimalstring.length-3);
					 decimalstring= decimalstring.substring(0,decimals+1);
					 tempnum = tempnum+decimalstring;
				}
return tempnum;
}
function timeRemaining() {

	var now = new Date();                                
	var newyears = new Date("January 1, 2008");
	var todaysdate = new Date("January 1, 2008");

	newyears.setFullYear(now.getFullYear());

	secsSince = Math.round(now.getTime() - newyears.getTime())/1000;
          
	todaysdate.setMonth(now.getMonth());
	todaysdate.setDate(now.getDate());
	todaysdate.setFullYear(now.getFullYear());
	// XXX secsToday = (now.getTime()-todaysdate.getTime())/1000;

	total_dollars = string(secsSince * 10474.3785);
      

	if (document.getElementById ("total")) {document.getElementById ("total").firstChild.nodeValue = "$"+total_dollars}
				
	timerID = setTimeout("timeRemaining()", 180);

}
