hello,im newbies here,actually i want to develop a world population script using javascript.actually i already have a script but i want to change/modified it to make it as my country population clock..below is the script:
-------------------------------------------------------------------------
Quote:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>world population</title>
</head>
<body>
<script type="text/javascript">
function maind(){
startdate = new Date()
now(startdate.getYear(),startdate.getMonth(),start date.getDate(),startdate.getHours(),startdate.getM inutes(),startdate.getSeconds())
}
function ChangeValue(number,pv){
numberstring =""
var j=0
var i=0
while (number > 1)
{
numberstring = (Math.round(number-0.5) % 10) + numberstring
number= number / 10
j++
if (number > 1 && j==3) {
numberstring = "," + numberstring
j=0}
i++
}
numberstring=numberstring
if (pv==1) {document.getElementById("worldpop").innerHTML=num berstring }
}
function now(year,month,date,hours,minutes,seconds){
startdatum = new Date(year,month,date,hours,minutes,seconds)
var now = 5600000000.0
var now2 = 5690000000.0
var groeipercentage = (now2 - now) / now *100
var groeiperseconde = (now * (groeipercentage/100))/365.0/24.0/60.0/60.0
nu = new Date ()
schuldstartdatum = new Date (96,1,1)
secondenoppagina = (nu.getTime() - startdatum.getTime())/1000
totaleschuld= (nu.getTime() - schuldstartdatum.getTime())/1000*groeiperseconde + now
ChangeValue(totaleschuld,1);
timerID = setTimeout("now(startdatum.getYear(),startdatum.ge tMonth(),startdatum.getDate(),startdatum.getHours( ),startdatum.getMinutes(),startdatum.getSeconds()) ",200)
}
window.onload=maind
</script>
<img border="0" src="map.jpg" width="136" height="80"><p>
<font size="2">Current World Population</font><font size="1"> </font>  <span id="worldpop" style="font-weight: bold; background-color: #33FFFF;"></span>
</p>
</body>
</html>
|
-------------------------------------------------------------------------
and i want to modified it according to my country formula:
Quote:
- one birth for every 58 seconds
- ,one death for every 4 minutes and 36 seconds,one gain on net migration (International) for every 5 minutes and 15 seconds,overall increase in population, one person for every 59 seconds
|
-------------------------------------------------------------------------
the clock is based on local computer date n time..
please somebody help me...
i really appreciate it..
thanks