Code:
function slideshow_auto(counterstart, countermax) {
  var start = counterstart;
  var max = countermax;
  var next = 0;

  if ((start + 1) > max) {
    next = 1;
  } else {
    next = start + 1;
  }
  
  setTimeout(slideshow2('announcement' + next, 'announcement' + start, next, max), 1000);
}

function slideshow2(idin, idout, next, countermax) {
  var objectin = document.getElementById(idin);
  var objectout = document.getElementById(idout);
  
  changeOpac(0, idin);
  
  objectin.style.zIndex = 1;
  objectout.style.zIndex = 0;
  
  opacity(idin, 0, 100, 500);
  
  setTimeout(slideshow_auto(next, countermax), 1000);
}
I call the slideshow_auto function in the body tag onload:

Code:
<body class="home" onload="changeMenuClass('home', 'aboutus', 'media', 'eventscalendar', 'prayer', 'contactus', 'login'); slideshow_auto(1, 2);">
Nothing happens with the designated divs. Any ideas?