// JavaScript Document

function getCurrentDate () {
	var months = new Array("Jan", "Feb", "March", "April", "May", "June", "July", "August", "Sept", "Oct", "Nov", "Dec");
	var dateObj = new Date();
	var currDay = dateObj.getDate();
  var currMonth = dateObj.getMonth();
  var currYear = dateObj.getFullYear();
  
	var dateArr = new Array(currYear, currMonth, months[currMonth], currDay);
	return(dateArr);
}


function daysUntil (futureDate) {
  var currDateObj = new Date();
	var currDateMidnightObj = new Date(currDateObj.getFullYear(), currDateObj.getMonth(), currDateObj.getDate(), 0, 0, 0, 0);
  var futureDateObj = new  Date(futureDate + " 00:00:00");
  // Use midnight on both days to get the exact number of days in between
	
	var timeBetween = futureDateObj.getTime() - currDateObj.getTime();
	var daysBetween = timeBetween / 24 / 60 / 60 / 1000;
	
	return(Math.ceil(daysBetween));
}
