/**
 * Frontend for Slideshow for UnicOne Web
 *  
 */
  
gSlideshow = null;

function transitionComplete() {
    
  var x = document.getElementById('shownums');
  var actual = gSlideshow.slide;

  
  if(x == null)
    return;
  
  var i = 0;
  var node = x.firstChild;
  
  while(node) {      
    if(node.tagName == "A") {
      if(i == actual) {
        node.style.backgroundColor = '#d92926';
      }
      else {
        node.style.backgroundColor = '#616161';
      }
      i++;
    }        
    node = node.nextSibling;
  }
}

function changeShow(num) {
  gSlideshow.go(num);
  transitionComplete();
}


function aBoxMouseOver(x, n) {
  x.style.backgroundColor = '#d92926';
} 

function aBoxMouseOut(x, n) {
  var actual = gSlideshow.slide;
  
  if(n != actual){
    x.style.backgroundColor = '#616161';
  }
} 



