Modified calendar javascript