// Image Swap code

function DM_imageSwap(daImage, daSrc) {
	var objStr,obj

	objStr = daImage;
	
	if ((objStr.indexOf('document.layers[')==0 && document.layers==null) || (objStr.indexOf('document.all[')   ==0 && document.all   ==null)) {
		objStr = 'document'+objStr.substring(objStr.lastIndexOf('.'),objStr.length);
	}
	obj = eval(objStr);
	obj.src = daSrc;
}


function WM_imageSwap(daImage, daSrc){
var objStr,obj;

// Check to make sure that images are supported in the DOM.
if(document.images){

	// Check to see whether you are using a name, number, or object
	if (typeof(daImage) == 'string') {
	
		// This whole objStr nonsense is here solely to gain compatability
		// with ie3 for the mac.
		
		daImage.src = daSrc;
		
		objStr = 'document.' + daImage;
					
		obj = eval(objStr);
		obj.src = daSrc;
		
	} else if ((typeof(daImage) == 'object') && daImage && daImage.src) {
			daImage.src = daSrc;
		}
	}
}


// Image Pre-load code

function WM_preloadImages() {

/*
WM_preloadImages()
Loads images into the browser's cache for later use.

Source: Webmonkey Code Library
(http://www.hotwired.com/webmonkey/javascript/code_library/)

Author: Nadav Savio
Author Email: nadav@wired.com

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();
    // Loop through all the arguments.
    var argLength = WM_preloadImages.arguments.length;
    for(arg=0;arg<argLength;arg++) {
      // For each arg, create a new image.
      document.WM.loadedImages[arg] = new Image();
      // Then set the source of that image to the current argument.
      document.WM.loadedImages[arg].src = WM_preloadImages.arguments[arg];
    }
  }
}

// The above Code is subject to the terms, conditions, warranties, and disclaimers of the 
// Webmonkey Public License, Version 1.0 located at 
// http://www.hotwired.com/webmonkey/javascript/code_library/license/wpl.html. 
// Original Code is (c) 1998 Wired Digital Inc. and 
// Modifications are (c) Date: 1999-09-17 Author: Phil Dye; Author URL: http://www.alchemydigital.com; 
// Author Email: phil@alchemydigital.com. All Rights Reserved. This Code came from the Webmonkey 
// Code Library located at http://www.hotwired.com/webmonkey/javascript/code_library/. 
// Webmonkey is a registered trademark of Wired Ventures Inc.

// Code to remove Status Bar text after timeout (c) 1996 Alchemy

var timerID = setTimeout("",0);
defaultStatus="";

function Status(text)
{
	clearTimeout(timerID);
	defaultStatus=text;
	timerID=setTimeout("defaultStatus=''",3000);
}


