﻿var CurrentBoxID = 0;

var Play;

function Rotate(){

    CurrentBoxID = CurrentBoxID % 4; 
    
    var CurrentBox;
    
    if(CurrentBoxID == 0){
        CurrentBox = Box1;
    }else if (CurrentBoxID == 1){
        CurrentBox = Box2;
    }else if (CurrentBoxID == 2){
        CurrentBox = Box3;
    }else if (CurrentBoxID == 3){
        CurrentBox = Box4;
    }
       
  
    //el.fade(0);
       
    div_Rotator.innerHTML = CurrentBox.innerHTML;    
    
    //el.fade(1);
    
    CurrentBoxID ++;
    
}

function StartRotate(){
    
    Play = setInterval("Rotate();", 2600);
    
}



function stopPlay(){
    
    clearInterval(Play);

}

function resumePlay(){
    StartRotate();
}

