function gmtClock()
{
  var month=new Array(12);
  month[0]="January";
  month[1]="February";
  month[2]="March";
  month[3]="April";
  month[4]="May";
  month[5]="June";
  month[6]="July";
  month[7]="August";
  month[8]="September";
  month[9]="October";
  month[10]="November";
  month[11]="December";

  var weekday=new Array(7);
  weekday[0]="Sunday";
  weekday[1]="Monday";
  weekday[2]="Tuesday";
  weekday[3]="Wednesday";
  weekday[4]="Thursday";
  weekday[5]="Friday";
  weekday[6]="Saturday";

  time = new Date()
  gmtMS = time.getTime() + (time.getTimezoneOffset() * 60000)
  gmtTime = new Date(gmtMS)

  hour = gmtTime.getHours()
  minute = gmtTime.getMinutes()
  second = gmtTime.getSeconds()
  wDay = gmtTime.getDay()
  nDay = gmtTime.getDate()
  nMonth = gmtTime.getMonth() + 1
  nYear = gmtTime.getFullYear()

  numDate = nYear + ((nMonth < 10) ? ".0" : ".") + nMonth + ((nDay < 10) ? ".0" : ".") + nDay
  fullDate = nDay + " " + month[nMonth - 1] + " " + nYear
  fullTime = ((hour < 10) ? "0" : "") + hour + ((minute < 10) ? ":0" : ":") + minute + ((second < 10) ? ":0" : ":") + second

  statement = "The <a href=\"http://wwp.greenwichmeantime.com/\">current time in GMT</a> is "
  document.getElementById('clockTime').innerHTML = statement + fullTime + " on " + weekday[wDay] + ", " + fullDate + "."
  setTimeout("gmtClock()", 1000)
}
