
  function MovePage(direction)
  {
    var pageLength = 4;
    var iconList = document.getElementById('IconList').firstChild.firstChild;
    
    var currentIndex = GetCurrentIndex(iconList);

    var newIndex = (direction * pageLength) + currentIndex;
    if(newIndex < 1)
      newIndex = 1;
    
    for(var j=1;j<iconList.childNodes.length;j++)
    {
      var node = iconList.childNodes[j];

      if(node.className != 'MenuItem')
        continue;

      if(j >= newIndex && j < (newIndex + pageLength))
        node.style.display = document.all ? 'block' : 'table-cell';
      else
        node.style.display = 'none';
    }
    
    SetArrowStyle(iconList, newIndex);
  }
  
  function GetCurrentIndex(iconList)
  {
    var currentIndex=0;
    for(currentIndex=1;currentIndex<iconList.childNodes.length;currentIndex++)
    {
      var node = iconList.childNodes[currentIndex];
      if(node.className == 'MenuItem' && node.style.display != 'none')
        break;
    }
    return currentIndex;
  }
  
  function SetArrowStyle(iconList, newIndex)
  {
    if(newIndex == 1)
    {
      iconList.firstChild.firstChild.className = 'InactiveArrow';
      iconList.lastChild.firstChild.className = 'IconListArrow';
    }
    else
    {
      iconList.firstChild.firstChild.className = 'IconListArrow';
      iconList.lastChild.firstChild.className = 'InactiveArrow';
    }
  }
      
  function StartCarousel()
  {
  
    var carousel = document.getElementById('Carousel');    
    for(var i=0;i< carousel.childNodes.length;i++)
    {
      carousel.childNodes[i].style.display = 'none';
    }
    
    carousel.childNodes[ Math.floor((Math.random() * carousel.childNodes.length) - 0.000000001)].style.display = 'block';
    
    var e = window.setTimeout(StartCarousel, 1000 * 20);
  }
  
  function LoadBreadCrumbTitle()
  {
    var breadCrumbTitle = document.getElementById('BreadCrumbTitle');
    var infostanderPageTitle = document.getElementById('InfostanderPageTitle');
   
    if(breadCrumbTitle && infostanderPageTitle) 
      breadCrumbTitle.innerHTML = infostanderPageTitle.innerHTML;
  }
