Code for internal and external js