


/* Resource Clock
Counts the Earth's human population and acres of productive land based on information from the United Nations.

Original script written by Kevin McCann, IDRC, March 1996.
Revised and updated by John Stevenson, jhs@well.com.

This script may be used, but please retain proper credit. Also, be aware
that this script depends on data that is non-static - the starting land
and population numbers, as well as their rates of increase/decrease are
recalculated yearly. Check this site semi-regularly for the latest
numbers.

*/

function counter() {
    startpop 	= 	0;
    poprate 	= 	.6945;
	
    today = new Date()
    startdatepop = new Date("July 25, 1987")
    offset = today.getTimezoneOffset() * 60
    diffpop = (( today.getTime() + offset ) - startdatepop.getTime() ) / 1000;
    var newpop = Math.ceil(startpop + (diffpop * poprate));
    newpop = "" + newpop;

    a1 = newpop.substring(0,3)
    a2 = newpop.substring(3,6)
    a3 = newpop.substring(6,9)

    formpop = a1 + "," + a2 + "," + a3; 
	
javascript:void(document.getElementById("pop").value=formpop);
    setTimeout('counter()',200);
}

