var scrollCount=1;
var pauseTime=3*1000; /*数字越小移动的时间越快*/
var timer;
function changeClips() {
 for (i=1; i<4; i++){
  var allCtn="ctn"+i;
  var allTtl="ttl"+i;
  document.getElementById(allCtn).style.display="none";
  document.getElementById(allTtl).className="default";
  }
 }
 
function ttlOn(n) {
 var curCtn="ctn"+n;
 var curTtl="ttl"+n;
 changeClips();
 document.getElementById(curCtn).style.display="block";
 document.getElementById(curTtl).className="current";
 scrollCount=n;
 }
 
function affScroll() {
 stopScroll();
 ttlOn(scrollCount);
 scrollCount+=1;
 if (scrollCount==4) {
  scrollCount=1;
  }
  timer=setTimeout("affScroll()",pauseTime);
 }
 
function stopScroll() {
 clearTimeout(timer);
 }

