Class Scheduling Javascript