function ImageChanger(instance, id, delay) {
	this.img = document.getElementById(id)
	this.instance = instance
	this.delay = delay
	this.opacity = 100
	this.up = 0
}
ImageChanger.prototype.refresh = function() {
	if (this.up) {
		this.opacity++
		if (this.opacity == 99) {
			this.up = 0
			setTimeout(this.instance + '.refresh()', this.delay)
			return;
		}
	} else {
		this.opacity--
		if (this.opacity == 0) {
			this.up = 1
			setTimeout(this.instance + '.refresh()', this.delay)
			return;
		}
	}
	this.img.style.filter = "Alpha(opacity=" + this.opacity + ")"
	this.img.style.MozOpacity = this.opacity / 100
	setTimeout(this.instance + '.refresh()', 10)
}

