addEvent(window,"load",Countdown_Initialise, false);

var targetDate;

function Countdown_Initialise(){
	targetDate = "11/06/2010";
	setInterval(countdown_update,1000);
//	countdown_update();
	
}

function countdown_update(){
	var splitDate = targetDate.split("/");
	var target_year = splitDate[2];
	var target_month = splitDate[1];
	var target_day = splitDate[0];
	var target_hour = 0;
	var target_minute = 0;
	var target_second = 0;
		
//	alert(target_day + " / " + target_month + " / " + target_year);

	
	var today = new Date();
	var today_year = today.getFullYear();
	var today_month = today.getMonth();
	
	var today_Stamp = (new Date(today_year, today_month, today.getDate(), today.getHours(), today.getMinutes(), today.getSeconds())).getTime();
	var target_Stamp = (new Date(target_year, target_month - 1, target_day, target_hour, target_minute, target_second)).getTime();
	
	//Find their difference, and convert that into seconds.                  
	var showClock = true;
    var time_Left = Math.round((target_Stamp - today_Stamp) / 1000);	
	if(time_Left < 0){
		showClock = false;
		time_Left = 0;	
	}
	
	// Get remaining amounts
	var diffDays = Math.floor(time_Left / (60 * 60 * 24));
	time_Left %= (60 * 60 * 24);
	var diffHours = Math.floor(time_Left / (60 * 60));
	time_Left %= (60 * 60);
	var diffMinutes = Math.floor(time_Left / 60);
	time_Left %= 60;
    var diffSeconds = time_Left;
	
	if(showClock){
		//var remainText = diffDays + " days<br />" + diffHours + " hours<br />" + diffMinutes + " minutes<br />" + diffSeconds + " seconds";
		//$('Countdown2010_Days').innerHTML = remainText;
		$('Countdown2010_days').innerHTML = diffDays;
		$('Countdown2010_hours').innerHTML = diffHours;
		$('Countdown2010_minutes').innerHTML = diffMinutes;
		$('Countdown2010_seconds').innerHTML = diffSeconds;
		
		
		$('Countdown2010').style.display = "block";
	}
}