google.load("jquery","1.3.2");

google.setOnLoadCallback(function(){
	
	$.ajaxSetup({async: false});
	$.getScript("jquery.countdown.js");
	$.ajaxSetup({async: true});
	
	untilDate = new Date("April 29, 2010 15:00:00");
	
	$('#countdownTimer').countdown({until: untilDate});

	halfway=setBoxCenter();
	$("#countdownBox").css("left",halfway+"px");
	
	$(window).resize(function() {
		
		halfway=setBoxCenter();
		$("#countdownBox").css("left",halfway+"px");
		
	});	
		
});

function setBoxCenter() {

if (parseInt(navigator.appVersion)>3) {

		if (navigator.appName=="Netscape") {

			halfWindowWidth = (window.innerWidth)/2;
		
		}
		if (navigator.appName.indexOf("Microsoft")!=-1) {
			
			halfWindowWidth = (document.body.offsetWidth)/2;
			
		}
	
	}
	
	return(halfWindowWidth-170);
	
}