function Roll (a) {
	this.img = a.getElementsByTagName("img")[0];
	//if(!this.img) return;
	this.locked = false;
	this.firstRun = true;
	var o = this;
	this.img.onmouseover = function () { o.firstRun = false; o.change(); }
	this.img.onmouseout = function () { o.change(); }
	
	this.change = function () {
		if (!this.locked) {
			this.behavior = (!Number(this.img.src.charAt(this.img.src.length-5))&&!this.firstRun) ?1 :0;
			this.img.src = this.img.src.substring(0,this.img.src.length-5) + this.behavior + "." + this.img.src.substring(this.img.src.length-3,this.img.src.length);
		}
	}
	this.changeTypeNavOn = function () { this.firstRun = false; this.change(); this.lock(); }
	this.lock = function () { this.locked = true; }
	this.unlock = function () { this.locked = false; }
	
}


function SimpleRoll (obj) {
	this.img = obj;
    if(!this.img) return;
	this.locked = false;
	var o = this;
	this.img.onmouseover = this.img.onmouseout = function () { o.change(); }
}

SimpleRoll.prototype.change = function () {
	if (!this.locked) {
		this.behavior = (!Number(this.img.src.charAt(this.img.src.length-5))) ?1 :0;
		this.img.src = this.img.src.substring(0,this.img.src.length-5) + this.behavior + "." + this.img.src.substring(this.img.src.length-3,this.img.src.length);
	}
}

SimpleRoll.prototype.lock = function () {
	this.locked = true;
}

SimpleRoll.prototype.lock = function () {
	this.locked = true;
}