function NewsRotate() {

	var me = this;
	var numNewsCount = 33;
	var numCurrentNews = 0;
	var jqCon;
	var jqNews;
	var jqControl;
	var timerRotate;
	this.numRotateTime = 100; // millisec
	
	this.init = function(strConId) {
		// get dom objects & init params
		jqCon = $('#'+strConId);
		jqNews = jqCon.find('.news').find('li');
		jqControl = jqCon.find('.control').find('li');
		numNewsCount = jqNews.length;
		
		//  hide all news
		jqNews.hide();
		
		// patch click events to controls
		jqControl.click(function() {
			// set current news number
			numCurrentNews = jqControl.index(this);
			// show one news
			me.show(numCurrentNews);
			// reset timer
			me.resetTimer();
		});
		
		// auto show the first news
		me.show(0);

		// set auto rotate
		me.resetTimer();
	}
	
	this.nextIndex = function() {
		numCurrentNews++;
		if (numCurrentNews > numNewsCount-1) {
			numCurrentNews = 0;
		}
		return numCurrentNews;
	}

	this.prevIndex = function() {
		numCurrentNews--;
		if (numCurrentNews < 0) {
			numCurrentNews = numNewsCount-1;
		}
		return numCurrentNews;
	}

	this.show = function(index) {
		// hide all first
		jqNews.hide();
		// show one news
		jqNews.eq(index).fadeIn();
		// lo-lite all control buttons
		jqControl.removeClass('on');
		// hi-lite the control button
		jqControl.eq(index).addClass('on');
	}

	this.resetTimer = function() {
		clearInterval(timerRotate);
		timerRotate = setInterval(function() {me.show(me.nextIndex())}, me.numRotateTime);
	}

}
