This appears to have fixed it. Add the line shown in red.
begin_day = new Date (show_date.getYear(),show_date.getMonth(),1);
begin_day_date = begin_day.getDay();
end_day = new Date (show_date.getYear(),show_date.getMonth()+1,1);
count_day = (end_day - begin_day)/1000/60/60/24;
count_day = Math.round(count_day);
This trouble seems to arise in March and October only. In all other months count_day returns an integer, i.e the number of days in the month.
Last edited by Philip M; 10-21-2006 at 10:08 AM..