// JavaScript Document

function countDownText(uniDateStamp){
	var now = new Date();
	now.setTime(uniDateStamp);
	var monthday = now.getDate();
	rv = 21 - monthday; 
	if(rv >= 2)return rv + " Days Left";
	return rv + " Day Left";
}
  function printCountDown(milisecsTo){
	secs = parseInt((milisecsTo / 1000));
	mins = parseInt((secs / 60));
	hours = parseInt(mins / 60);
	rv =  hours + ":";
	rv += ((mins % 60 + "").length == 2 ?  mins % 60 : "0" + mins % 60) + ":";
	rv += ((secs % 60 + "").length == 2 ?  secs % 60 : "0" + secs % 60);
	return rv;
}

function updateTimer(countDownMillis){
	if(countDownMillis >= 0)$("#topBannerMessage .countdownText").html(printCountDown(countDownMillis) + " Left");
}