// Copyright by http://www.WiseScripts.com //

function showLocalTime(container, wclock){
  if (!document.getElementById || !document.getElementById(container)) return;
  this.container=document.getElementById(container);
  this.localtime=this.serverdate=new Date(wclock);
  this.localtime.setTime(this.serverdate.getTime());
  this.updateTime();
  this.updateContainer();
}

showLocalTime.prototype.updateTime=function(){
  var thisobj=this;
  this.localtime.setSeconds(this.localtime.getSeconds()+1);
  setTimeout(function(){thisobj.updateTime()}, 1000);
}

showLocalTime.prototype.updateContainer=function(){
  var thisobj=this;
  this.container.innerHTML=this.localtime.toLocaleString();
  setTimeout(function(){thisobj.updateContainer()}, 1000);
}






