function Rollover(id, off, over, on){
	this.persist = false;
	this.hasOn = false;
	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.oOver = [];
	if (typeof over == "string"){this.oOver[0] = new Image();this.oOver[0].src = over;}
	else if (typeof over == "object")
		for (var i = 0; i < over.length; i++){this.oOver[i] = new Image();this.oOver[i].src = over[i];}
	this.oOn = [];
	if (typeof on == "string"){this.oOn[0] = new Image();this.oOn[0].src = on; this.hasOn = 1}
	else if (typeof on == "object") {
		for (var i = 0; i < on.length; i++){this.oOn[i] = new Image();this.oOn[i].src = on[i];}
		this.hasOn = 1;
	}
}
Rollover.prototype.over = function(n){
	if(this.persist)return;
	if(n) {this.persist = true;}
	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.oOver[i].src;
}
Rollover.prototype.on = function(n){
	if(this.persist)return;
	if(n) {this.persist = true;}
	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;
}
Rollover.prototype.setPersist = function(){
	if(this.hasOn) {this.on(1);} else {this.over(1);}
}

