// JavaScript Document

startList = function()
{
	if (document.getElementById)
	{
		navRoot = document.getElementById("menu_main");
		if (navRoot)
		{
			for (i = 0 ; i < navRoot.childNodes.length ; i++)
			{
		        node = navRoot.childNodes[i];
        		if (node.nodeName == "LI")
				{
					node.onmouseover = function() { this.className="over"; }
					node.onmouseout = function() { this.className=""; }
				}
			}
		}
	}
}

// Zmieniaj zawartosc elementu POLECAMY
changeRecommend = function(number)
{
  MAX_ELEMENTS = 3; // Ilosc elementow do pokazania
  NUM_CHANGETIME = 6000; // Co ile ms zmieniac elementy
  
  if (document.getElementById("recommend_" + number.toString()))
    document.getElementById("recommend_" + number.toString()).style.display = "none"; 
  
  number++;
  if (number > MAX_ELEMENTS) number = 1;

  document.getElementById("recommend_" + number.toString()).style.display = "block"; 
  setTimeout("changeRecommend(" + number + ")", NUM_CHANGETIME);
}

// Szukaj
search = function()
{
}

execOnLoad = function()
{
 startList();
 changeRecommend(0);
}

window.onload = execOnLoad;

// wykrywanie flasha tu: http://www.quirksmode.org/js/flash.html