I can't test this live at the moment, so I'm asking:
If this script is busy loading images from an array (say, a few MB worth), and the user happens to perform some behavior that requires one of the images that has not yet loaded, will its loading be delayed? Or can the browser send out parallel requests?
function preloadImg() { var args = simplePreload.arguments; document.imageArray = new Array(args.length); for(var i=0; i<args.length; i++) { document.imageArray[i] = new Image; document.imageArray[i].src = args[i]; } }