start javascript for handling stats page rendering