var idNum = 0;

function rotative(max)
{
  if( idNum < max )
  {
    id = 'rotative_'+idNum;
    document.getElementById(id).style.display = 'none';
  }
  idNum++;
  if( idNum < max )
  {
    id = 'rotative_'+idNum;
    document.getElementById(id).style.display = 'block';
  }
  else
  {
    document.getElementById('rotative_0').style.display = 'block';
    idNum = 0;
  }

  pauseRotative(max);
}

function pauseRotative(max)
{
  string = "rotative("+max+")";
  setTimeout(string, 3000);
}