// simple rollover function, checks first to see if Javascript 1.1 - if document.images is supported (not supported in Netscape 2.0 and IE 3.0)
function change_image(image_name, new_image) {
	if (document.images)  document[image_name].src=new_image;
}
	
// this adds to a long list of images to be preloaded in preload function below
function preload_images () {
	var c, a;
	// d.all_images is global, check to make sure it exists, if not initialize as array
	var d=document;
	if (!d.all_images) d.all_images=new Array();
	// loop thru all arguments sent to this function and add onto the end of d.all_images array the filenames
	c = d.all_images.length;
	a = preload_images.arguments;
	for (i=0; i < a.length; i++) d.all_images[c+i] = a[i];		
}

function preload() {
	var d, temp;
	// make an array the same length as d.all_images
	// make each cell in array a new Image and fill it with images from the d.all_images list
	// this effectively loads all the images (into the cache)
	d=document;
	if (!d.all_images) return;
	temp = new Array();
	for (i=0; i < d.all_images.length; i++) { 
		temp[i] = new Image;
		temp[i].src = d.all_images[i];
	}
}
