// Is the images collection supported by the DOM? if (document.images) { // Put your image pre-loading code here. } function imageActivate(imageName) { if (document.images) { // If the image objects exist // Put rollover code here. } }