function news(timeout) {
	this.timeout = timeout;
	this.oldOnLoad = window.onload;
	var obj = this; // is a hack, I'm afraid
	this.init = function () {
		if ( !document.getElementById ) return;
		if ( !window.setInterval ) return;
		if ( !document.getElementById('news') ) return;
		if ( !document.getElementById('news3') ) return;
		var el = document.getElementById('news');
		if ( typeof(el.offsetWidth) != 'number' ) return;
		obj.timer = window.setInterval(obj.scroll, timeout);
		el.onmouseover = obj.pause;
		el.onmouseout = obj.resume;
		el.style.display = 'block';
		obj.x = obj.width = el.offsetWidth;
		if ( obj.oldOnLoad ) obj.oldOnLoad();
	}
	this.scroll = function () {
		var el = document.getElementById('news3');
		obj.x -= 1;
		if ( obj.x + el.offsetWidth < 0 ) obj.x = obj.width;
		el.style.left = obj.x + "px";
	}
	this.resume = function () {
		obj.timer = window.setInterval(obj.scroll, timeout);
	}
	this.pause = function () {
		window.clearInterval(obj.timer);
	}
	window.onload = this.init;
}

