/**
 * @author jenny.zhan
 */
function scrollNews (){
	//滚动新闻
	var step=1;
	var limit=36;
	var partMaxH=$('#part1').height();
	$('#part2').html($('#part1').html());

	var initNews;
	var moveTop
	
	function moveLayer() {
		moveTop=parseInt($('#newsScroll').css('top'));
		moveTop=moveTop-step;
		$('#newsScroll').css({top:moveTop.toString()+'px'});
	}
	function flagLayer() {
		if (moveTop%limit==0)	{
			clearInterval(initNews);
			if (moveTop==(partMaxH*(-2)+limit))	{
				$('#newsScroll').css({top:(partMaxH*(-1)+limit).toString()+'px'});
			}
			var timer=setTimeout(function () {
				initNews=setInterval(function () 
				{
					moveLayer();
					flagLayer();
				},100);
			},2000)
		}
	}
	initNews=setInterval(function () 
	{
		moveLayer();
		flagLayer();
	},100);	
}
