
	var Ticker = {

		paused: false,
		delay: 15,		
		pixel: 1,
	
		init: function() {
			this.ticker = document.getElementById("ticker");
			this.ticker.scrollLeft = 0;
			window.setInterval("Ticker.tick()", this.delay);		
		},
		
		tick: function() {
			if (!this.paused)
				this.ticker.scrollLeft += this.pixel;

			if (this.ticker.scrollLeft >= (this.ticker.scrollWidth - this.ticker.offsetWidth) )
				this.ticker.scrollLeft = 0;
		},
	
		erase: function(schoolid) {
			var choice = window.confirm('Erase your ticker message?');
			if (choice)
				transfer({'action':'erase','schoolid':schoolid});
		}
	}