function HoverImageLink(linkId){
	this.linkEmtId = linkId;
	this.linkEmt = null;
	this.imgEmt = null;
	this.newImgEmt = null;
	this.origSrc = null;
	this.hoverSrc = null;
	
	
	this.init = function(){
		if(document.getElementById(linkId)){
			this.linkEmt = document.getElementById(linkId);
		}
		
		var imgEmts = this.linkEmt.getElementsByTagName('IMG');
		if(imgEmts.length > 0){
			this.imgEmt = imgEmts[0];
		}
		
		this.origSrc = this.imgEmt.src;
		var extStarts = this.origSrc.lastIndexOf('.');
		this.hoverSrc = this.origSrc.substring(0, extStarts) + '_on' + this.origSrc.substring(extStarts);
		
		this.newImgEmt = new Image();
		this.newImgEmt.src = this.hoverSrc;
	}
	
	
	this.hilite = function(){
		this.imgEmt.src = this.hoverSrc;
	}
	
	this.lolite = function(){
		this.imgEmt.src = this.origSrc;
	}
}



function hiliteHoverImage(arrIdx){
	hoverImageLinks[arrIdx - 1].hilite();
}

function loliteHoverImage(arrIdx){
	hoverImageLinks[arrIdx - 1].lolite();
}

function initHoverImages(){
	for(var i = 0; i < hoverImageLinks.length; i++){
		hoverImageLinks[i].init();
	}
}