<!-- 
/****************************************************************
 *	file : image.js												*							
 *	last updated : 03/25/2003									*
 ****************************************************************/
 
 function RolloverImage(obj) {
 	obj.onload = '';
	this.obj = obj;
	this.name = obj.name;
	this.defaultSrc = obj.src;
	this.init(obj);
 }
 
 RolloverImage.prototype.init = function(img) {
	this.type = img.src.substring((img.src.lastIndexOf(".") + 1), img.src.length);
	this.path = this.defaultSrc.substring(0, this.defaultSrc.lastIndexOf("/") + 1);
	this.base = img.src.substring((img.src.lastIndexOf("/") + 1), img.src.lastIndexOf(((img.src.indexOf("_on") >= 0)? "_" : ".")));
	this.on = new Image();
	this.on.src = this.path + this.base + "_on." + this.type;
	this.off = new Image();
	this.off.src = this.path + this.base + "." + this.type;
}

RolloverImage.prototype.setOn = function(){
	if (this.obj != null) {
		this.obj.src = this.on.src;
	}
}

RolloverImage.prototype.setOff = function(){
	if (this.obj != null) {
		this.obj.src = this.off.src;
	}
}

function RolloverImageMap() {
	this.Images = new Array();	
	return this;
}

RolloverImageMap.prototype.add = function(obj) {
	oImage = this.Images[this.Images.length] = new String(obj.name);
	oImage.obj = new RolloverImage(obj);
}

RolloverImageMap.prototype.get = function(key) {
	for (i=0; i < this.Images.length; i++) {
		if (this.Images[i].toString() == key) {
			return this.Images[i].obj;
		}
	}
}

RolloverImageMap.prototype.setOn = function(key) {
	oImage = this.get(key);
	if (oImage != null && oImage.obj != null) {
		oImage.setOn();
	}
}

RolloverImageMap.prototype.setOff = function(key) {
	oImage = this.get(key);
	if (oImage != null && oImage.obj != null) {
		oImage.setOff();
	}
}

var ro = new RolloverImageMap();
//-->