function HeadBar( newsCount ) {
	this.newsCount = newsCount;
	this.currentNews = 0;
	this.nextNews = function() {
		if ( this.newsCount > this.currentNews + 1 ) {
			this.hideNews( this.currentNews );
			this.currentNews++;
			this.showNews( this.currentNews );
		}
	}
	this.prevNews = function() {
		if ( 0 < this.currentNews ) {
			this.hideNews( this.currentNews );
			this.currentNews--;
			this.showNews( this.currentNews );
		}
	}
	this.showNews = function( id ) {
		var newsNode = document.getElementById( 'headbarnews' + id );
		newsNode.className = 'current news';
	}
	this.hideNews = function( id ) {
		var newsNode = document.getElementById( 'headbarnews' + id );
		newsNode.className = 'news';
	}
}

