﻿ /**
    PreloadImages
    takes in an array of image URLs and replaces each array element with an 
    Image object sourced to the replaced URL, causing the image at that URL to 
    be loaded into memory and retained as long as the array is retained.  Useful 
    for loading a bunch of rollover or CSS-hidden images so that they will be 
    ready when they need to be displayed.
    imageUrls: an array of strings containing URLs to the images to pre-load.
    **/
function PreloadImages() {
    var imageUrls = ["/images/layout/logo_prophoenix_header.gif", "/images/layout/header_slogan.gif", "/images/layout/nav_left.png", "/images/layout/nav_right.png", "/images/layout/nav_bg.gif", "/images/layout/logo_prophoenix_header.gif", "/images/layout/header_slogan.gif", "/images/aspots/aspot_home1.jpg", "/images/layout/left_products_btn_on.png", "/images/layout/left_products_btn_off.png"];
        
        for (var i=0; i < imageUrls.length; i++) { 
            var image = new Image();
            image.src = imageUrls[i];
            imageUrls[i] = image;
        }
    }
