Created JavaScript File

With some code copied from Google. ;)