  var ImageList = new Array()
    
  window.onload=PreLoad;
  function PreLoad() {
  ImageList[0] = new Image();
  ImageList[0].src = document.images["SwapImg"].src

   var oImages = new Array(document.images["SwapImg"].src,"images/splash/sp_doors.jpg","images/splash/sp_hardware.jpg","images/splash/sp_decor.jpg","images/splash/sp_lighting.jpg","images/splash/sp_timber.jpg","images/splash/sp_kivas.jpg");
   var i;
   
    for (i = 0; i < oImages.length ; i++){
      ImageList[i] = new Image();
      ImageList[i].src=oImages[i]
    }
  }
  
  function SwapImage(strImageName,iImgList) {
    //alert(iImgList);
    try{
      if (ImageList[iImgList].src.length > 0){
        document.images[strImageName].src=ImageList[iImgList].src;
      }
    }
    catch (e){}
    document.getElementById("Msg").innerHTML = document.getElementById(iImgList).innerHTML;
  }
  
  function RestoreImage(strImageName) {
    try{
      document.images[strImageName].src=ImageList[0].src;
    }
    catch (e){}
    document.getElementById("Msg").innerHTML = " "
  }
 
