// i set default values for the image functions
imageOverSuffix="_over";

// i preload the image listed in preloadList
function preloadImages(imageList, imageURL){ 
	var imageSet=imageList.split(/,/);
	document.imageArray=new Array(imageSet.length);
	for(var i=0; i < imageSet.length; i++){
		document.imageArray[i]=new Image;
		document.imageArray[i].src=imageURL + imageSet[i];
	}
}

// i switch the image to the over state
function switchImageOver(sourceId){
	if(document.images){
		var thisImage=document.getElementById(sourceId);
		var	imageAppend=thisImage.src.substring(0, thisImage.src.lastIndexOf('.'));
		var fileExt=thisImage.src.substring(thisImage.src.lastIndexOf('.') + 1, thisImage.src.length);
		thisImage.src=imageAppend + imageOverSuffix + "." + fileExt;
	}
}

// i switch the image back to the normal state
function switchImageOut(sourceId){
	if(document.images){
		var thisImage=document.getElementById(sourceId);
		var	imageAppend=thisImage.src.substring(0, thisImage.src.lastIndexOf(imageOverSuffix));
		var fileExt=thisImage.src.substring(thisImage.src.lastIndexOf('.') + 1, thisImage.src.length);
		thisImage.src=imageAppend + "." + fileExt;
	}
}

