/*  Document: DigitalCLock.js
    Created on: November 29, 2007
    Author: Derek De Jager
    Description: Digital Clock javascript
*/ 

function DigitalClock(element, hours){
    this.elem = element;
    this.formattedDateTime;
    this.showClock();
}
    DigitalClock.prototype.showClock = function(){
        if(!document.all&&!document.getElementById){
            return;
        }
        var saveClockRef = this;
        setInterval(function(){saveClockRef.updateTimer();},1000);
    }
    
    DigitalClock.prototype.updateTimer = function(){
        this.now = new Date();
	this.formattedDateTime = this.now.toDayOfWeekString() + " " + this.now.toSlashDateString()
        + " " + this.now.toTimeString(12);
	this.elem.innerHTML = this.formattedDateTime;
    }

