I have a JS function that may occasionally get used on some pages. It is dependent on another JS file (swfObject.js), but I\'d like to avoid having to include this file all
Checkout the YUI Loader utility. It's super handy, unobtrusive javascript for loading scripts on-demand.
Here's a link to an example using non-YUI scripts:
http://developer.yahoo.com/yui/examples/yuiloader/yl-addmodule.html