/**
*	Countdown - Chris Plock
**/

var Countdown = {
  speed : 60000,
  tid : 0,
  setTarget : function(d) {
	this.target = new Date(d);
	this.rowID = document.getElementById("CountDownRow");
	this.doDate();
  },
  doDate : function() {
	currDt = new Date();
	sec  = 0;
	min  = 0;
	hour = 0;
	day  = 0;

	v1 = Math.round(( this.target - currDt )/1000);

	if (v1 > 0) {
		sec = v1%60;
		v1  = Math.floor(v1/60);
		min = v1%60;
		v1  = Math.floor(v1/60);
		hour = v1%24;
		day = Math.floor(v1/24);
        }

	this.rowID.cells[0].innerHTML = day;
	this.rowID.cells[1].innerHTML = hour;
	this.rowID.cells[2].innerHTML = min;
	this.rowID.cells[2].innerHTML = min ;

	var thisObj = this;
	this.tid=window.setTimeout(function(){ thisObj.doDate() } ,this.speed);
  }
};

