function Rollover(id, off, on){

	this.persist = false;

	this.group = null;

	this.obj = [];

	this.id = [];

	if (typeof id == "string") this.id[0] = id;

	else if (typeof id == "object") for (var i = 0; i < id.length; i++)	this.id[i] = id[i];

	this.oOff = [];

	if (typeof off == "string"){this.oOff[0] = new Image();	this.oOff[0].src = off;}

	else if (typeof off == "object")

	 	for (var i = 0; i < off.length; i++){this.oOff[i] = new Image();this.oOff[i].src = off[i];}

	this.oOn = [];

	if (typeof on == "string"){this.oOn[0] = new Image();this.oOn[0].src = on;}

	else if (typeof on == "object")

		for (var i = 0; i < on.length; i++){this.oOn[i] = new Image();this.oOn[i].src = on[i];}

	if(arguments[3]) this.addToGroup(arguments[3])


}

Rollover.prototype.on = function(){

	if(!this.obj.length)for (var i = 0; i < this.id.length; i++)this.obj[i] = document.images ? document.images[this.id[i]] : null;

	if(!this.obj[0])return false;

	for (var i = 0; i < this.obj.length; i++)this.obj[i].src = this.oOn[i].src;

}	

Rollover.prototype.off = function(){

	if(this.persist)return;

	if(!this.obj.length)for (var i = 0; i < this.id.length; i++)this.obj[i] = document.images ? document.images[this.id[i]] : null;

	if(!this.obj[0])return false;

	for (var i = 0; i < this.obj.length; i++) this.obj[i].src = this.oOff[i].src;

	if(this.group) for(var i = 0; i < this.group.length; i++) if(this.group[i].persist) this.group[i].on();

}

Rollover.prototype.setPersist = function(){

	this.persist = true;

	this.on();

}	


