/* Image Preloading Functions - add images to the browser's cache
   for later use by mouseover event handler functions.
   
   QueuePreloads('strImagePath1','strImagePath2',etc...) can be
   called any number of times from scripts within the body of the
   document.  DoPreloads() should be called once from the OnLoad=""
   attribute of the page's opening body tag.
   
   Adapted from WM_PreloadImages function by 
   Nadav Savio (nadav@wired.com) from the Webmonkey Code Library
   (http://www.hotwired.com/webmonkey/javascript/code_library/)
*/
   
blnScriptIncluded = true;

function DoPreloads() {

  if (document.images) {
    if (typeof(document.WM) == 'undefined'){
      document.WM = new Object();
    }
    document.WM.loadedImages = new Array();
    for(arg=0;arg<arrPL.length;arg++) {
      document.WM.loadedImages[arg] = new Image();
      document.WM.loadedImages[arg].src = arrPL[arg];
    }
  }
}

function WM_imageSwap(daImage, daSrc){
  var objStr,obj;
  /*
    Source: Webmonkey Code Library
    (http://www.hotwired.com/webmonkey/javascript/code_library/)

    Author: Shvatz
    Author Email: shvatz@wired.com
    Thanks to Ken Sundermeyer (ksundermeyer@macromedia.com) for his help
    with variables in ie3 for the mac. 
    */

  if(document.images){
    // Check to see whether you are using a name, number, or object
    if (typeof(daImage) == 'string') {
      // This whole objStr nonesense is here solely to gain compatability
      // with ie3 for the mac.
      objStr = 'document.' + daImage;
      obj = eval(objStr);
      obj.src = daSrc;
    } else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
      daImage.src = daSrc;
    }
  }
}

