moved the javascript in calendar.php into it's own file and added more functionality