/* Written by Peter Russell */
country_basedate = new Date("July 1, 2005 12:00:00") ;
country_today = new Date() ;
country_basemillisecs = country_basedate.getTime();
country_millisecs = country_today.getTime();

var country_PopNow = 16339100 + (millisecs - basemillisecs)*0.0016824616/1000;
country_PopNow=15000000+Math.round(country_PopNow-15000000);

var country_TimeoutID = null;
var country_countRunning = false;

function country_stopCount() {
	if(country_countRunning)
		clearTimeout(country_timeoutID);
	country_countRunning = false;
}

function country_startCount() {
	country_stopCount();
	country_updatePop();
}

function country_updatePop() {
	/*test browser base date is 1/1/70*/
	country_testdate = new Date("Dec 31, 1969 00:00:00") ;
	country_testmillisecs = testdate.getTime();
	if(country_testmillisecs<20000000){
		var country_pop = country_PopNow++;
		document.counter_country.elements[0].value = numberFormat(country_pop);
	}
	country_timeoutID = setTimeout("country_updatePop()", 640000);
	country_countRunning = true;
}

function country_numberFormat(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;
}