	var rotator = {
		name : "rotator",
		obj : function(itm) { return document.getElementById(this.name+itm) },
		x : 0,   tX : 0,
		y : 0,   tY : 0,
		x2 : 960,  tX2 : 960,
		y2 : 0,  tY2 : 0,
		w : 960,
		dir : -1,
		step : 0,
		pause : 7000,
		timer : null,
		cItem : 0,
		totalItems : 3,
		initialise : function() {
			this.totalItems = this.obj("").getElementsByTagName("li").length;
			document.getElementById("heroDesc").innerHTML = heroType[this.cItem] + "<br/><span>" + heroDescriptions[this.cItem] + "</span>";
			this.x2 = this.w * this.totalItems;
			this.tX2 = this.x2;
			this.timer = setTimeout('rotator.update()',this.pause);
		},
		redraw : function() {
			this.obj("").style.left = this.x+"px";
			this.obj("2").style.left = this.x2+"px";
		},
		update : function(tX) {
			if (this.x <= (this.totalItems * this.w * this.dir)) {
					this.x = this.w * this.totalItems;
					this.tX = this.x;
			}
			if (this.x2 <= (this.totalItems * this.w * this.dir)) {
					this.x2 = this.w * this.totalItems;
					this.tX2 = this.x2;
			}
			this.tX = (tX==null)?this.x+(this.w*this.dir):tX;
			this.tX2 = this.x2+(this.w*this.dir);
			this.animItem();
		},
		animItem : function() {
			if (this.dir == -1 && this.x > this.tX) {
				this.step = (this.tX - this.x)/10;
				if (this.step > -1) this.step = -1;
				this.x += this.step;
				this.x2 += this.step;
				if (this.x > this.tX) {
					if (this.cItem + 1 == this.totalItems) this.cItem = -1;
					document.getElementById("heroDesc").innerHTML = heroType[this.cItem+1] + "<br/><span>"+heroDescriptions[this.cItem+1]+"</span>";
					this.obj("").style.left = this.x+"px";
					this.obj("2").style.left = this.x2+"px";
					this.timer = setTimeout('rotator.animItem()',10);
				} else {
					this.x = this.tX;
					this.x2 = this.tX2;
					this.cItem += (this.dir * -1);
					this.timer = setTimeout('rotator.update()',rotator.pause);
					this.obj("").style.left = this.x+"px";
					this.obj("2").style.left = this.x2+"px";
				}
			}
		}
	};
	
	var timer = null;
	var winLoad = window.onload;
	if (typeof winLoad == "function") {
		window.onload = function() {
			winLoad();
			rotator.initialise();
		}
	} else {
		window.onload = function() {
			rotator.initialise();
		}
	}

