
var DAhold = false;
var DAtimer = null;
var DApcur = 0;
var DAdir = 1;


function DArefresh(navdir){
  if(DApcnt>0){
    DApcur+=navdir;
    if(DApcur>=DApcnt) DApcur = 0;
    if(DApcur<0) DApcur = DApcnt-1;
    //window.frames[DArootname].navigate(DArootnamelc + DApcur + ".htm");
    window.frames[DArootname].location = DArootnamelc + DApcur + ".htm";
  }
}

function DAstatechange(){

  if(DAinterval>0){
    clearInterval(DAtimer);
    DAtimer = null;
    DAtimer = setInterval("DArefresh(DAdir);",DAinterval);
  }else{
    DAhold = true;
    if(DAtimer!=null){
	clearInterval(DAtimer);
	DAtimer = null;
    }
  }
}


function DAset(tint,tmpdir){
  DAinterval=tint;
  DAdir=tmpdir;
  DAstatechange();
}

function DAstop(){
  DAinterval = 0;
  DAdir=0;
  DAstatechange();
}

function DAgostart(){
  DApcur = 0;
  window.frames[DArootname].navigate(DArootnamelc + 0 + ".htm");
}

function DAgoend(){
  DApcur = (DApcnt-1);  
  window.frames[DArootname].navigate(DArootnamelc + (DApcnt-1) + ".htm");
}
