function Images(i_sObjName){
	
	this.name = i_sObjName;
	
	this.addImgRollover = function(){
		var oThisObj = eval(this.name);
		var oImgObjs = document.getElementsByTagName("IMG");
		// loop through all images, find which one has rollover attribute
		for (var i = 0; i < oImgObjs.length; i++){
			if (oImgObjs[i].attributes.rollover && oImgObjs[i].attributes.rollover.value == "true"){
				oImgObjs[i].onmouseover = function(){oThisObj.imageRollOver(this)};
				oImgObjs[i].onmouseout = function(){oThisObj.imageRollOver(this)};
			}
		}
	}
	
	this.imageRollOver = function(i_oImgObj){
		// get image name
		var sImgSrc = i_oImgObj.src;
		var sImgName = sImgSrc.substring(0, (sImgSrc.length-5));
		//get image state
		var sImgState = sImgSrc.substring(sImgName.length, (sImgName.length+1));
		//get image ext
		var sImgExt = sImgSrc.substring((sImgSrc.lastIndexOf(".")+1), sImgSrc.length);
		//change image state
		if(sImgState == "e"){
			i_oImgObj.src = sImgName + "r." + sImgExt;
		}
		else if(sImgState == "r"){
			i_oImgObj.src = sImgName + "e." + sImgExt;
		}
	}
	
	this.changeImageState = function(i_oImgObj, i_sImgState){
		// get image name
		var sImgSrc = i_oImgObj.src;
		var sImgName = sImgSrc.substring(0, (sImgSrc.length-5));
		//get image state
		var sImgState = sImgSrc.substring(sImgName.length, (sImgName.length+1));
		//get image ext
		var sImgExt = sImgSrc.substring((sImgSrc.lastIndexOf(".")+1), sImgSrc.length);
		//change image state
		i_oImgObj.src = sImgName + i_sImgState + "." + sImgExt;
	}
	
	this.enableImage = function(i_oImgObj){
		this.changeImageState(i_oImgObj, "e");
	}
	
	this.selectImage = function(i_oImgObj){
		this.changeImageState(i_oImgObj, "s");
	}
	
	this.disableImage = function(i_oImgObj){
		this.changeImageState(i_oImgObj, "d");
	}
}
