js part for photoalbum and target date