Availability Scheduler in Javascript and Html