made some changes to calender.js, also moved js from viewclass into a java script file for viewclass