/*  Document: DigitalClock.js
    Created on: February 29, 2007
    Author: ddejager & Team Plasma: derek, jody, nate
    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;
    saveClockRef.updateTimer();
    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;
}
