// Clock bkk zone var currenttime = 'September 18, 2010 19:11:07' //PHP method of getting server date ///////////Stop editting here///////////////////////////////// var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December") var serverdate=new Date(currenttime) function padlength(what){ var output=(what.toString().length==1)? "0"+what : what return output } function displaytime(){ serverdate.setSeconds(serverdate.getSeconds()+1) var datestring=montharray[serverdate.getMonth()]+" "+padlength(serverdate.getDate())+", "+serverdate.getFullYear() var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds()) //document.getElementById("clock_bkk_time").innerHTML="Сейчас в Бангкоке: "+datestring+" "+timestring document.getElementById("clock_bkk_time").innerHTML="Сейчас в Бангкоке: "+timestring } window.onload=function(){ setInterval("displaytime()", 1000) } function clock(){ }