
function loadAppleCountDate()
{

// no ajax here
	return -16388221;
}

function countdown(timeStr){
	dd = timeStr;
	if(dd*1 < 0){
		document.getElementById("rustybrickcounter").innerHTML = "We have predicted that the contest is over!";
	}else{
		dday=Math.floor(dd/(60*60*24));
		dhour=Math.floor((dd%(60*60*24))/(60*60)*1);
		dmin=Math.floor(((dd%(60*60*24))%(60*60))/(60)*1);
		dsec=Math.floor((((dd%(60*60*24))%(60*60))%(60))/1);
		document.getElementById("rustybrickcounterdays").innerHTML = dday;
		document.getElementById("rustybrickcounterhours").innerHTML = dhour;
		document.getElementById("rustybrickcounterminutes").innerHTML = dmin;
		document.getElementById("rustybrickcounterseconds").innerHTML = dsec;
		document.getElementById("rustybrickcounterlink").innerHTML = "Powered By RustyBrick.com";
		dd--;
		
		setTimeout("countdown(dd)",1000);
	}
}

countdown(loadAppleCountDate());

