<!-- Clock in Java Script .. Cameron Gregory http://www.bloke.com/
// http://www.bloke.com/javascript/Clock/
speed=1000;
//len=28;
len=7;
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);
      }
  
    // Modifying the original line, so only the "hour:minute:second" will be displayed. The original line is commented.
    // clockA[i].date.value = dt.toGMTString();
    var pattern = /[ ,]/;
    var splittedArray = dt.toGMTString().split(pattern);
    var user_agent = navigator.appName.toLowerCase();
    var time;
    if (user_agent.match("microsoft") || user_agent.match("internet") || user_agent.match("explorer"))
	{
	    time = splittedArray[4];
	}
    else
	{
	    time = splittedArray[5];
	}
    if (time.substring(0,1)=='0')
    {
    	clockA[i].date.value = ' ' + time.substring(1,time.length);
    }
    else
    {
    	clockA[i].date.value = time;
    }
  }

  tid=window.setTimeout("doDate()",speed);
}

function start() {
  clockA[num] = document.forms["form"+num];
  //offsetA[num] = 0;
//window.alert( (new Date()).getTimezoneOffset());
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) {
//window.alert("hay" + (new Date()).toGMTString());
  clockA[num] = document.forms["form"+num];
  //offsetA[num] = (diff - dd.getTimezoneOffset())*60*1000;
  offsetA[num] = (diff)*60*1000;
  //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)
{
  document.write('<FORM name=form'+num+'><input name=date size=')
  // we chop the end, because it would be the wrong timezone
  document.write(len);
  //document.write(19)
  // Modifying the original line, so no input area borders will be displayed. The original line is commented.
  // document.write(' value="Clock: Javascript"></FORM>')
  document.write(' value=" " style="border: 0; font-family: Verdana; font-weight: bold; font-size: 100%; color: #FFFFFF; background: #000A96"></FORM>');
  startLong(diff);
}
// end-->
