J Wynia has written a nice little include function for JavaScript basically embedding the included-script nicely into the head element of the displaying HTML page. So all you have to do is puts something like js_include('path/to/file.js'); into one of your already “installed” JavaScript files. Definitely much nicer than dothing something

ugly like document.write('<script type="text/javascript" src="http://domain.com/j/newlib.js"></script>');.