function getDaysBefore(year, month, date) {
var oneMinute = 60 * 1000;
var oneHour = oneMinute * 60;
var oneDay = oneHour * 24;
var today = new Date();
var targetDate = new Date();
targetDate.setYear(year);
targetDate.setMonth(month);
targetDate.setDate(date);
alert(targetDate);
var diff = targetDate.getTime() - today.getTime();
diff = Math.floor(diff/oneDay);
return diff;
}