function slideDiv(prevItem, currItem)
{
  if(!advBox || !divs) return;

  var currDiv = divs[currItem];
  var prevDiv = divs[prevItem];

  var xPos = parseInt(currDiv.style.left);
  xPos -= slideStep;
  if(xPos <= padding){
    xPos = padding;
    prevDiv.style.display = "none";
    currDiv.style.left = padding + "px";
    setTimeout("startShow();", timeout * 1000);
  }
  else{
    currDiv.style.left = xPos + "px";
    setTimeout("slideDiv(prevItem, currItem);", slideSpeed);
  }
}