

function WM_preloadImages() 
{

/*
	Usage: WM_preloadImages('image 1 URL', 'image 2 URL', 'image 3 URL', ...);
*/

  // Don't bother if there's no document.images
  if (document.images) {
	if (typeof(document.WM) == 'undefined') {
	  document.WM = new Object();
	}
	document.WM.loadedImages = new Array();
	var argLength = WM_preloadImages.arguments.length;
	for(arg=0; arg < argLength; arg++) {
	  document.WM.loadedImages[arg] = new Image();
	  document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
	}
  }
}
		

function WM_imageSwap(daImage, daSrc) 
{
  var objStr,obj;
  /*
	Usage: WM_imageSwap(originalImage, 'newSourceUrl');
	*/

  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;
	}*/
  }
}	
