
/*
Drop Down World Clock- By JavaScript Kit (http://www.javascriptkit.com)
Portions of code by Kurt @ http://www.btinternet.com/~kurt.grigg/javascript
This credit notice must stay intact
*/


//isitlocal=true;
function run_once1(){
WorldClock('tm1', 5);
WorldClock('tm2', 3);
WorldClock('tm3', -5);
WorldClock('tm4', 9);
WorldClock('tm5', 0);

}



function WorldClock(spn, isitlocal){
now=new Date();
ofst=now.getTimezoneOffset()/60;
secs=now.getSeconds();
sec=-1.57+Math.PI*secs/30;
mins=now.getMinutes();
min=-1.57+Math.PI*mins/30;
hr=(isitlocal===true)?now.getHours():(now.getHours() + parseInt(ofst)) + parseInt(isitlocal);
hrs=-1.575+Math.PI*hr/6+Math.PI*parseInt(now.getMinutes())/360;
if (hr < 0) hr+=24;
if (hr > 23) hr-=24;


hr2 = hr;
//if (hr2 == 0) hr2=12;
//(hr2 < 13)?hr2:hr2 %= 12;
if (hr2<10) hr2="0"+hr2

var finaltime=hr2+':'+((mins < 10)?"0"+mins:mins); //+':'+((secs < 10)?"0"+secs:secs);

//if (document.all)
//worldclock.innerHTML=finaltime
//else if (document.getElementById)
document.getElementById(spn).innerHTML=finaltime

setTimeout('WorldClock(\''+ spn +'\', '+ isitlocal +')',15000);
}

