breaking up client side javascript per page