﻿function runTicker()
{    
    if(counter==rssItems-1){
        counter=0;
    }else{
        counter++;
    }
    for(z=0;z<rssItems;z++){
        document.getElementById("newsitem"+z).style.display = 'none';
    }
    document.getElementById("newsitem"+counter).style.display = '';
    TimeoutID = setTimeout("runTicker()",5000);       
}   
function MoveUp()
{
    counter--;
    if(counter<0)counter=rssItems-1;
    for(z=0;z<rssItems;z++){
        document.getElementById("newsitem"+z).style.display = 'none';
    } 
    document.getElementById("newsitem"+counter).style.display = '';
    clearTimeout(TimeoutID);
    TimeoutID = setTimeout("runTicker()",5000);     
}
function MoveDown()
{
    counter++;
    if(counter>rssItems-1)counter=0;
    for(z=0;z<rssItems;z++){
        document.getElementById("newsitem"+z).style.display = 'none';
    }  
    document.getElementById("newsitem"+counter).style.display = '';
    
    clearTimeout(TimeoutID);
    TimeoutID = setTimeout("runTicker()",5000);        
}