Might be better to code the function this way ...
function preloader() {
imageObj = new Image();
// set image list
images = ['image1.jpg','image2.jpg','image3.jpg','image4.jpg'];
// start preloading
for (var i=0; i<=images.length; i++) { imageObj.src=images[i]; }
}
Advantage is that you would nust add the new image filenames to the "images" array.
Then you need not worry about the "for" settings for the loop limit.