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