// modified code from Dr. Garvey's class page

	// defines array for days and month
    dayName = new Array ("Sunday", "Monday", "Tuesday", "Wednesday",
                         "Thursday", "Friday", "Saturday");
    monName = new Array ("January", "February", "March", "April",
                         "May", "June", "July", "August", "September",
                         "October", "November", "December");

	// defines new day
    now = new Date;

	// get the real year because of java script programing
    thisYr = now.getYear();
    if (thisYr < 1900) {
      thisYr = thisYr+1900;
    }
	//gets the month and day
    thismo = now.getMonth();
    thisday = now.getDate();
    
	// decides if the 5 day of the month has passed and if it has, it goes to the next month
    if (thisday > 5){
	thismo = thismo + 1;
	}

	// defines when OTM are due based on the year, the month and the 5 day
    otm = new Date(thisYr,thismo,5);


    function dayToDays(inTime) {
      return (inTime.getTime() / (1000 * 60 * 60 * 24));
    }

    function daysTill(inDate) {
      return (Math.ceil(dayToDays(inDate) - dayToDays(now)));
    }