function Preload(imgName, imgOn, imgOff, path) {
	this.imgName = imgName
	this.imgOn = imgOn;
	this.imgOff = imgOff;
	this.path = path;
	this.on = on;
	this.off = off;
}

Preload.prototype = new Image;

function on() {
	this.src = this.path + this.imgOn;
	document.images[this.imgName].src = this.src;
}

function off() {
	this.src = this.path + this.imgOff;
	document.images[this.imgName].src = this.src;
}