// JavaScript Document

function RotateNews(Idx)
{
   MoveNews(Idx, 0);
}

function MoveNews(Idx, Pos)
{
    /*document.getElementById('tcomnovinka').style.marginTop = Pos + "px";
    if (Pos == -25)
    {
        Pos = 25;  
        document.getElementById('tcomnovinka').innerHTML = document.getElementById('tcomflashnews_' + Idx).innerHTML;
    }
    Pos -= 1;
    if (Pos != 0)
        setTimeout("MoveNews("+Idx+", "+Pos+")", 20);
    else
    {
       Idx += 1;
       if (Idx > NovinkyCnt)
           Idx = 1;  
       setTimeout("RotateNews("+Idx+");", 3000);
    }  */
    
    document.getElementById('tcomnovinka').innerHTML = document.getElementById('tcomflashnews_' + Idx).innerHTML;
    Idx += 1;
    if (Idx > NovinkyCnt)
        Idx = 1;  
    setTimeout("RotateNews("+Idx+");", 3000);
    
}
