/*
 * Javascript clock that displays unix time and count down to the start
 * of the 1st LHC collision at 1269900000.
 * Eddie Niese 2010
 *
 * Make sure you add a <span id="lhctime"></span> section to the page in which
 * you load this script.
 */
function update_clock()
{
	var docref=document.getElementById("lhctime");
	var d=new Date();
	var t=d.getTime();
	var s=(t+"").substring(0,10);
	if (s <= 1269900000) {
		var v = 1269900000-s;
		s="<br />" + v + " seconds until obliteration";
	} else {
	    s="<br />Earth is obliterated!";
	}
	docref.innerHTML=s;
	setTimeout(update_clock, 1000);
}
update_clock();


