//var delay=50;
//var currentChar=1;
//var destination="newscontent";
var news = new Array(
	"Zespol developerow FreeBSD wydal nowa, stabilna wersje systemu FreeBSD oznaczona numerem 8.1",
  	"Theo de Raadt wraz z zespolem developerow przygotowali nowa wersje najbezpieczniejszego systemu operacyjnego OpenBSD 4.7",
	"Twórca DragonFlyBSD i byly commiter FreeBSD Michael Neumann proponuje wprowadzenie mechanizmow programowania obiektowego na poziomie jadra",
	"Virtualbox 3.2.6 juz dostepny!"
	);
var actual = 0;

function type()
{
  if (document.getElementById)
  {
    var dest=document.getElementById(destination);
	var text = news[actual];
    if (dest)
    {
      dest.innerHTML=text.substr(0, currentChar);
      currentChar++
      if (currentChar>text.length)
      {
        currentChar=1;
		if (++actual > news.length-1) 
			actual = 0;
        setTimeout("type()", 5000);
      }
      else
      {
        setTimeout("type()", delay);
      }
    }
  }
}

function startTyping()
{
  delay=50;
  currentChar=1;
  destination="newscontent";
  type();
}


