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