finished javascript validation for adding courses