/*var mylen=0;
var timer;
$(document).ready(function(){
	ani();
});
function ani(){	
	mylen=$("#imglist").height();
	timer=setInterval("scrolltop()",4);
}
function scrolltop(){
	myh=parseInt($("#imglist").css("marginTop"));
	if((myh+mylen)==($(".imglistout").height()+20)){
		clearInterval(timer);
		$("#imglist").animate({marginTop:0},1000);
		ani();
	}
	$("#imglist").animate({marginTop:"-=1"},4);
}*/
/*$(function(){  
	
	var num=0;   
	var speed=10;mylen=$(".roll").height();
	function howlking(){  
		num++;   
		
		var imgWidth=mylen;
		if(num<imgWidth){         
			$('.roll').css('top',-num+"px");
			if(num>imgWidth-418){				
				$('.roll').find("tr").appendTo($('.roll'));
				num=0;
			}
		}
	}  
	var times=setInterval(howlking,speed);  
	$('.imglistout').hover(function(){clearTimeout(times)},function(){times=setInterval(howlking,speed)});}
	);*/
$(document).ready(function(){
	var speed=30;
	document.getElementById("scroll_top2").innerHTML= document.getElementById("scroll_top1").innerHTML; //克隆scroll_top1为scroll_top2 
	function Marquee1(){ 
	//当滚动至scroll_top1与scroll_top2交界时 
	if( document.getElementById("scroll_top2").offsetTop- document.getElementById("scroll_top").scrollTop<=0){ 
	document.getElementById("scroll_top").scrollTop-= document.getElementById("scroll_top1").offsetHeight //scroll_top跳到最顶端 
	}else{ 
	document.getElementById("scroll_top").scrollTop++;
	} 
	} 
	var MyMar1=setInterval(Marquee1,speed);//设置定时器 
	//鼠标移上时清除定时器达到滚动停止的目的 
	document.getElementById("scroll_top").onmouseover=function() {clearInterval(MyMar1)} ;
	//鼠标移开时重设定时器 
	document.getElementById("scroll_top").onmouseout=function(){MyMar1=setInterval(Marquee1,speed)} ;

});

