// JavaScript Document
/*
This code is from Dynamic Web Coding 
at http://www.dyn-web.com/
See Terms of Use at http://www.dyn-web.com/bus/terms.html
Permission granted to use this code 
as long as this entire notice is included.
*/

// put images to preload in this array
var preload_list = new Array("image1.jpg",	"image2.jpg", "image3.jpg",	"image4.jpg",	"image5.jpg", "image6.jpg",	"image7.jpg");
var path_to_images = "images/thmc_large/";

// preload (change path to images if necessary)
if (document.images) {
	var image_list = new Array();
	for (var preload_counter=0; preload_counter<preload_list.length; preload_counter++) {
  	image_list[preload_counter] = new Image(); 
		image_list[preload_counter].src = path_to_images + preload_list[preload_counter];	
  }
}

var swapTimer;
// delay before restoring original image onmouseout
var restore_delay = 800; // milliseconds
function swapImage(num) {
	if (swapTimer) clearTimeout(swapTimer);
	if (document.images) {
		document.swap.src = image_list[num].src;
	}
}

function restoreImg() {
	swapTimer = setTimeout("swapImage("+0+")",restore_delay);
}