var aryImages = new Array(2);

    aryImages[0] = "navhomeblue.jpg";
    aryImages[1] = "navhomewhite.jpg";

    for (i=0; i < aryImages.length; i++) 
    {
      var preload = new Image();
      preload.src = aryImages[i];
    }
    
    function swap(img1Name, img2Source) 
    {
      if(document.images)
      {
        document.images[img1Name].src=img2Source;
      }
    }