<!--
 function getElementsByClass(name) {  
  var found = 0;  
  var elems = new Array();  
  var alltags = document.getElementsByTagName("*");  
  if (alltags) {  
   for (i=0; i < alltags.length; i++) {  
    if (alltags[i].className==name) {  
     elems[found++]=alltags[i];  
    }  
   }  
  }  
  return(elems);  
 }
 function getImportantArticles() {
  var mainDiv = document.getElementById("news-box");
  var importantArticles = new Array();
  var counter = 0;
  if (mainDiv) {
   for (i=0; i < mainDiv.childNodes.length; i++) {
    if (mainDiv.childNodes[i].className=="news-box-content") {
     importantArticles[counter] = mainDiv.childNodes[i];
     counter++;
    }
   }
  }
  return(importantArticles);
 }
 
 function getPager() {
  var pagerDiv = document.getElementById("news-box-turn");
  var pagerLinks = new Array();
  var pagerNumberedLinks = new Array();
  var counter = 0;
  if (pagerDiv) {
   pagerLinks = pagerDiv.getElementsByTagName("a");
   }
  for (var x=0; x < pagerLinks.length; x++) {
   if(pagerLinks[x].id) {
    pagerNumberedLinks[counter] = pagerLinks[x];
    counter++;
   }
  }
  return (pagerNumberedLinks);
 }
 
 function nextImportantArticle() {
  importantArticles = getImportantArticles();
  pagerNumberedLinks = getPager();
  for (i=0; i < importantArticles.length; i++) {
   if (importantArticles[i].style.display != 'none') {
    var activeIndex = i;
    importantArticles[i].style.display = 'none';
    pagerNumberedLinks[i].className='';
   }
  }
  if (importantArticles[++activeIndex]) {
   importantArticles[activeIndex].style.display = 'block';
   pagerNumberedLinks[activeIndex].className='active';
  }else{
   importantArticles[0].style.display = 'block';
   pagerNumberedLinks[0].className='active';
  }
 }

   
 function prevImportantArticle() {
  importantArticles = getImportantArticles();
  pagerNumberedLinks = getPager();
  for (i=0; i < importantArticles.length; i++) {
   if (importantArticles[i].style.display != 'none') {
    var activeIndex = i;
    importantArticles[i].style.display = 'none';
    pagerNumberedLinks[i].className='';
   }
  }
  if (importantArticles[--activeIndex]) {
   importantArticles[activeIndex].style.display = 'block';
   pagerNumberedLinks[activeIndex].className='active';
  }else{
   importantArticles[importantArticles.length-1].style.display = 'block';
   pagerNumberedLinks[importantArticles.length-1].className='active';
  }
 }
 
 function jumpToImportantArticle(id) {
  importantArticles = getImportantArticles();
  pagerNumberedLinks = getPager();
  for (i=0; i < importantArticles.length; i++) {
   if (importantArticles[i].style.display != 'none') {
    importantArticles[i].style.display = 'none'; 
    pagerNumberedLinks[i].className='';  
   }
   if (importantArticles[i].id == id) {
    importantArticles[i].style.display = 'block';
    pagerNumberedLinks[i].className='active';
   } 
  }
 }

 function autoScrollImportantArticle(action) {
  if (action == 'stop') {
   try {
    clearTimeout(articleTimer);
   }
   catch(e) {return false;}
  }
  else if (action == 'play') {
   nextImportantArticle();
   articleTimer = setTimeout("autoScrollImportantArticle('"+action+"')",5000);
  }else{
   action = 'play';
   articleTimer = setTimeout("autoScrollImportantArticle('"+action+"')",5000);
  }
 }
//-->