/*
#################### MozillaOnly ####################
function switchLayer(containerID, newIndex) 
{
  var actualIndex = $(containerID).getAttribute('counter');
  var contentChildNodes = $(containerID +'_content').childNodes;
  var nodes = document.getElementsByName(containerID);
  
  for (var i = 0; i < nodes.length; i++) 
  {
    if (i == actualIndex) {
      nodes[i].style.display = 'none';
    } else if (i == newIndex) {
      nodes[i].style.display = 'block';
    }
  }
  $(containerID).setAttribute('counter', newIndex);
  newIndex = (++newIndex % nodes.length);
  window.setTimeout("switchLayer(\'" + containerID + "\', " + newIndex + ")", eval(containerID + "_timeout"));
}
*/

function switchLayer(containerID, newIndex) 
{
  var actualIndex = $(containerID).getAttribute('counter');
  var contentChildNodes = $(containerID +'_content').childNodes;
  
  if (actualIndex > -1) 
  {
    $(containerID + "-" + actualIndex).style.display = 'none';
    $(containerID + "-" + newIndex).style.display = 'block';
  }
  
  $(containerID).setAttribute('counter', newIndex);
  newIndex = (++newIndex % $(containerID).getAttribute('size'));
  window.setTimeout("switchLayer(\'" + containerID + "\', " + newIndex + ")", eval(containerID + "_timeout"));
}