function InfoTicker() {

	var tickerHandel;

	var tickerList;

	this.SetList = function (tickerData) {
                var i;
		tickerList = $('#tickerList');
		list = '';
		for(i = 0; i < tickerData.length; ++i) {
			list += "<p>+++&nbsp;&nbsp;" + tickerData[i].firstname + "&nbsp;" + tickerData[i].lastname + ",&nbsp;" + tickerData[i].city + "&nbsp;&nbsp;</p>";
		}
		list += list;
		$(tickerList).html(list);
		allWidth = 0;
		$(tickerList).find("p").each(function (i) {
			allWidth += $(this).width();
		});
		$(tickerList).css('width', allWidth);
		firstItem = $(tickerList).find('p:first');
		setTimeout(function() { scroll(firstItem, $(firstItem).width(), 0) }, 3000);
	}

	function scroll(currentItem, currentItemWidth, marginLeft) {
		if(currentItemWidth < Math.abs(marginLeft)) {
			marginLeft = 0;
			$(tickerList).find('p:last').after("<p>" + $(currentItem).html() + "</p>");
			$(currentItem).remove();
			currentItem = $(tickerList).find('p:first');
			currentItemWidth = $(currentItem).width();
		}
		$(tickerList).css('margin-left', marginLeft + 'px');
		marginLeft = marginLeft - 1;
		tickerHandel = setTimeout(function() { scroll(currentItem, currentItemWidth, marginLeft); }, 50 );
	}


	function stop() {
		clearTomeout(tickerHandel);
	}

}
