Java Script pooling for activities