Improved the validation logic for adddisc and editdisc.

couter.js is unchanged
Fixed timing issues in dscourse.js
Fixed timing issues in add/edit disc.php