you could probably include the script multiple times from different places, so long as you're not doing something within it as it loads (i.e. it's just functions)
I don't know enough about JS to say, but you might be able to do if(!$loadedvar){document.whatever.write("<script src=\"...\" />"); }; as well