
function chinaFocus(elemPic,elemHandle,classHandle,speed,duration){var elemPic=document.getElementById(elemPic),elemHandle=document.getElementById(elemHandle),_div=elemHandle.getElementsByTagName("div"),_handle=[],flag=0,timer,scrollInterval=0,step;for(var i=0;i<_div.length;i++){if(_div[i].className=="sepln")_div[i].style.display="none";if(_div[i].className=="focusTopic_pic"){elemPic.innerHTML+=_div[i].innerHTML;};if(_div[i].className=="focusTopic"){_handle.push(_div[i]);}}
elemPic.onmouseover=function(){clearTimeout(timer);}
elemPic.onmouseout=function(){timer=setTimeout(function(){scrollFocus()},speed/2);}
for(var i=0;i<_handle.length;i++){(function(i){_handle[i].onmouseover=function(){clearTimeout(timer);thisPic(i);}
_handle[i].onmouseout=function(){clearTimeout(timer);flag=i;timer=setTimeout(function(){scrollFocus()},speed/2);}})(i)}
step=elemPic.getElementsByTagName("img")[0].offsetHeight;function thisPic(index){for(var i=0;i<_handle.length;i++){_handle[i].className=_handle[i].className.replace(classHandle,"");}
_handle[index].className+=" "+classHandle;var current=0;var count=0;if(index!=current&&count>duration/8){return;}
clearInterval(scrollInterval);var span=index-current;var begin_value=elemPic.scrollTop;var chang_in_value=span*step+(current*step-begin_value);scrollInterval=setInterval(function(){doit(begin_value,chang_in_value)},10);function doit(b,c){elemPic.scrollTop=cpu(count,b,c,duration);count++;if(count==duration){clearInterval(scrollInterval);scrollInterval=0;count=0;elemPic.scrollTop=b+c;current=index;}}
function cpu(t,b,c,d){return c*((t=t/d-1)*t*t+1)+b;};}
function scrollFocus(){thisPic(flag);flag++;if(flag==_handle.length)flag=0;timer=setTimeout(function(){scrollFocus()},speed);}
scrollFocus();}
