For production sites, you might like to use a combined .js file with all the code required to setup a Image Web Server layered view control. Reducing the number of referenced files will speed up the loading of your pages.
The .zip file in this document contains two versions - before and after minification. Minification is a process of removing unnecessary whitespace from your script, in order to reduce the file size. Often, doing this reduces the size of the script by 25% or so. The minified script isn't that readable, so i included the "before" script so you can have a look. The combined script also replaces the .vbs (vbscript) with javascript.
You can download the combined script file at:
http://iws.erdas.com/scripts/iws.js (minified)
http://iws.erdas.com/scipts/iws.debug.js (for debugging)