<!--
// please keep these lines on when you copy the source
// written by: Michael Weber - http://www.virtual-hiv-test.com

var clockID = 0;

function UpdateClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }

   var tDate = new Date();
   
   	var world_total_inf_2004 = 40000000;
   	var world_inf_per_sec = 0.1620;
	
   	var usa_total_inf_2004 = 900000;
 	var usa_inf_per_sec = 0.001268;
 	
 	var germany_total_inf_2004 = 47000;
 	var germany_inf_per_sec = 0.00009513;
 	
 	var netherlands_total_inf_2004 = 18000;
 	var netherlands_inf_per_sec = 0.00010513;  //gg
 	
 	var southafrica_total_inf_2004 = 5000000;
 	var southafrica_inf_per_sec = 0.0185;  //gg
 	
	
	var ms_2004 = Date.parse("Sat, 31 Dec 2003 23:59:59 GMT");
	var ms_now = Date.parse(tDate.toGMTString());
   
   	var seconds_2004_to_now = (ms_now - ms_2004)/1000;
	var testi = (ms_now - ms_2004)/1000/60/60/24
	var world_infection = world_total_inf_2004 + (seconds_2004_to_now* world_inf_per_sec)
	
	var usa_infection = usa_total_inf_2004 + (seconds_2004_to_now* usa_inf_per_sec)
	var germany_infection = germany_total_inf_2004 + (seconds_2004_to_now* germany_inf_per_sec)
	var netherlands_infection = netherlands_total_inf_2004 + (seconds_2004_to_now* netherlands_inf_per_sec)
	var southafrica_infection = southafrica_total_inf_2004 + (seconds_2004_to_now* southafrica_inf_per_sec)
	
	document.getElementsByName("world_aids_count")[0].innerHTML = world_infection.toFixed(3) 
   	document.getElementsByName("usa_aids_count")[0].innerHTML = usa_infection.toFixed(3)
   	document.getElementsByName("germany_aids_count")[0].innerHTML = germany_infection.toFixed(4) 
   	document.getElementsByName("netherlands_aids_count")[0].innerHTML = netherlands_infection.toFixed(4)  
   	document.getElementsByName("southafrica_aids_count")[0].innerHTML = southafrica_infection.toFixed(4)  
	
  
   clockID = setTimeout("UpdateClock()", 250);
   
}
function StartClock() {
   clockID = setTimeout("UpdateClock()", 500);
}

function KillClock() {
   if(clockID) {
      clearTimeout(clockID);
      clockID  = 0;
   }
}

//-->
		