Created JavaScript for supporting code