All you need to do is place the script in a source file and call it myScript.js or whatever name you like. Assuming you place this at your root and the pages that you wish to use it in are also at the root, place the following tag between the openning and closing <head> tag of every page you wish to use the script in:
Of course, you would need to replace myScript.js with whatever name you gave it.
If your html page is somewhere other than where the script source resides, then you need to put the relative path along with the source file name in the src attribute of the <script> tag, the same way you would refer to an image or a document that resides in a folder other than that of the page you are making the link in.
15530-B Rockfield Blvd. Suite 4
Irvine, CA 92618