function updateCountdown() {
	var d = new Date();
	d.setUTCFullYear(2010, 3 - 1, 2);
	d.setUTCHours(9 - 1);
	d.setUTCMinutes(0);
	d.setUTCSeconds(0);
	
	var n = new Date();
	var x = Math.max(0, Math.round((d.valueOf() - n.valueOf()) / 1000));

	//alert(x);
	
	setTick('cs', x % 60);
	setTick('cm', Math.floor(x / 60) % 60);
	setTick('ch', Math.floor(x / 3600) % 24);
	setTick('cd', Math.floor(x / 3600 / 24));
}

function setTick(id, value) {
	if(!document.getElementById(id)) return;
	
	var v = value.toString()
	if (v.length < 2) v = '0' + v;
	if(document.getElementById(id).innerHTML != v) document.getElementById(id).innerHTML = (v);
}

setInterval('updateCountdown()', 333);
