Web Widget Tutorial
Example 3 - Dynamically loading JavaScript files
In this example, Prototype and a different version of jQuery have already been loaded.