//  ShowTime - to show the actual time at call-time
//  ---------------------------------------------------------------------------
  var timer = null
  var timeTagId = "time";
  var interval = 10000;

//  ---------------------------------------------------------------------------
function startClock() {
  if (!document.getElementById(timeTagId)) return;
  timer = setInterval('showTime()', interval);
}

//  ---------------------------------------------------------------------------
function stopClock() {
  if (!document.getElementById(timeTagId)) return;
  clearTimeout(timer)
}

//  ---------------------------------------------------------------------------
function showTime() {
  if (!document.getElementById(timeTagId)) return;
  document.getElementById(timeTagId).innerHTML=formatDate(new Date());
}

//  ---------------------------------------------------------------------------
function formatDate (d) {
  var year=d.getYear()
  if (year < 1000) year+=1900
  var month=d.getMonth()+1;
  if (month < 10) month="0"+month;
  var day=d.getDate()
  if (day < 10) day="0"+day
  var hours=d.getHours()
  if (hours < 10) hours="0"+hours
  var minutes=d.getMinutes()
  if (minutes < 10) minutes="0"+minutes
  return year+"-"+month+"-"+day+" "+hours+":"+minutes;
}

//  ---------------------------------------------------------------------------

addLoadEvent(function () {startClock (); showTime()});