<!-- Clock in Java Script .. Cameron Gregory http://www.bloke.com/
speed=1000;
len=27;
tid = 0;
num=0;
clockA = new Array();
offsetA = new Array();
dd = new Date();

function doDate(x)
{
  for (i=0;i<num;i++) {
    dt = new Date();
  
    if (offsetA[i] != 0) {
      gt = dt.getTime();
      gt = gt + offsetA[i];
      dt.setTime(gt);
      }
  
    clockA[i].date.value = dt.toGMTString();
    }

  tid=window.setTimeout("doDate()",speed);
}

function start() {
  clockA[num] = document.forms["form"+num];
  d = new Date();
  if (navigator.appVersion.substring(0,3) == "2.0")
    offsetA[num] = (d.getTimezoneOffset()*60*1000);
  else
    offsetA[num] = -(d.getTimezoneOffset()*60*1000);
  if (num == 0)  
    tid=window.setTimeout("doDate()",speed);
  num++;
}

function startLong(diff) {
  clockA[num] = document.forms["form"+num];
  offsetA[num] = (diff)*60*1000;
  if (num == 0)  
    tid=window.setTimeout("doDate()",speed);
  num++;
}

function cleartid() {
  window.clearTimeout(tid);
}
 
// for some reason on some pages this crashes netscape
function Clock()
{
  document.write('<FORM name=form'+num+'><input name=date size=')
  document.write(len)
  document.write(' value="Clock: Requires Javascript"></FORM>')
  start();
}
 
// for some reason on some pages this crashes netscape
function ServerClock(diff,fnt)
{
  document.write('<FORM name=form'+num+'><input name=date style="{font-family:'+fnt+';color: #00FF00; background: #000000;}" size=')
  // we chop the end, because it would be the wrong timezone
  document.write(25);
  document.write(' value="Clock: Javascript"></FORM>')
  startLong(diff);
}
// end-->
