function updateCD(trgDivID, nowMill, trgMill) {
	try {
		var serverTime = new Date(nowMill[0], nowMill[1] - 1, nowMill[2], nowMill[3], nowMill[4], nowMill[5], nowMill[6]);
		var trgTime = new Date(trgMill[0], trgMill[1] - 1, trgMill[2], trgMill[3], trgMill[4], trgMill[5], trgMill[6]);

		this.mSecs = 60;
		this.hSecs = 60 * this.mSecs;
		this.dSecs = 24 * this.hSecs;
		this.trgDivID = trgDivID;
		this.trgMill = trgTime.getTime();
		this.nowDTOffset = (new Date()).getTime() - serverTime.getTime();
		this.cdID = setInterval(function() {
			try {
				this.nowMill = new Date((new Date()).getTime() - this.nowDTOffset);
				var secs = Math.round((this.trgMill - this.nowMill) / 1000);
				var days = Math.floor(secs / this.dSecs); secs -= (days * this.dSecs);
				var hours = Math.floor(secs / this.hSecs); secs -= (hours * this.hSecs);
				var mins = Math.floor(secs / this.mSecs); secs -= (mins * this.mSecs);

				var container = document.getElementById(this.trgDivID);
				document.getElementById("cd_d").innerHTML = leadZeros(days);
				document.getElementById("cd_h").innerHTML = leadZeros(hours);
				document.getElementById("cd_m").innerHTML = leadZeros(mins);
				document.getElementById("cd_s").innerHTML = leadZeros(secs);
			} catch(e) {
				// probably doesn't exist on this page
				clearInterval(this.cdID);
			}
		}, 1000);

		function leadZeros(theVal) {
			return (theVal < 10 ? "0" : "") + theVal;
		}
	} catch(e) {
		// probably doesn't exist on this page
		clearInterval(this.cdID);
	}
}


