 var banners_rotate = {
	banners:	false,

	current:	-1,
	timer:		false,

	init:		function(arr) {
				this.banners = arr;

				this.put();
			},

	put:		function() {
				this.current ++;

				if (this.banners.length - 1 < this.current) this.current = 0;

				for (q=0;q<this.banners.length; q++) {
					if (this.current == q) { this.gobj("t"+this.banners[q]).style.display = "block"; }
					else { this.gobj("t"+this.banners[q]).style.display = "none"; }
				}

				var _self = this;

				this.gobj("t"+this.banners[this.current]).onmouseover = function() { clearTimeout(_self.timer); };
				this.gobj("t"+this.banners[this.current]).onmouseout = function() { _self.repeat(); };


				this.repeat();
			},

	repeat: 	function() {
				this.TimeoutUpDown( 3 * 1000 );
			},

	TimeoutUpDown:	function (ms) {
        			var _self = this;
				clearTimeout(_self.timer);
        			_self.timer = setTimeout(function(ms){
            				_self.put();
            			}, ms);
			},

	gobj:		function(id) {
				return document.getElementById(id);
			}
  }
