var date;
function load() {
	
	date = new Date();
	date.setFullYear(2010, 9, 1);
		// month here is 0-11
	date.setHours(7, 0, 0, 0);
	countDown();
}

function countDown() {
	var current = new Date();
	
	var since = (current >= date);
	
	var t = setTimeout("countDown()", 1000);
	var difference = date - current;
	difference = Math.floor(difference / 1000);
	var days = Math.floor(difference / (60 * 60 * 24));
	difference -= days * 24 * 60 * 60;
	var hours = Math.floor(difference / (60 * 60));
	difference -= hours * 60 * 60;
	var minutes = Math.floor(difference / 60);
	difference -= minutes * 60;
	var seconds = difference;

	var text = ""; 
	text += "" + getText(Math.abs(days), "day");
	text += ", " + getText(Math.abs(hours), "hour");
	text += ", " + getText(Math.abs(minutes), "minute");
	text += ", " + getText(Math.abs(seconds), "second");
	
	document.getElementById('count').innerHTML = text;
}

function getText(time, text) {
	if (time == 1) {
		return time + " " + text;
	} else {
		return time + " " + text + "s";
	}
}