// JavaScript Document
function TloRow(wiersz, akcja, color)
{
  if(akcja == 'on') wiersz.bgColor = '#00aeef';
  else              wiersz.bgColor = '#f5f5f5';
  return true;
}
function ukryjReklame()
{
	document.getElementById('apDiv1').style.display='none';
}

function KolorMenu(wiersz, akcja, ikona)
{
  if(akcja == 'on')
  {
    wiersz.bgColor = '#F6F6F6';
    wiersz.style.color = '#B82601';
    //document.images[ikona].src = 'Image/menu_on.gif';
  }
  else
  {
    wiersz.bgColor = '#FFFFFF';
    wiersz.style.color = '#2A2A2A';
    //document.images[ikona].src = 'Image/menu_off.gif';
  }
  return true;
}

function KolorMenu2(wiersz, akcja, ikona)
{
  if(akcja == 'on')
  {
    wiersz.bgColor = '#88d102';
    wiersz.style.color = '#FFFFFF';
    document.images[ikona].src = 'Image/menu_on2.gif';
  }
  else
  {
    wiersz.bgColor = '#f5f5f5';
    wiersz.style.color = '#000000';
    document.images[ikona].src = 'Image/menu_off2.gif';
  }
  return true;
}

function ZmienTekst(wiersz, akcja, kolor)
{
  //alert(wiersz.cells.length);

  if(akcja == 'on') wiersz.cells[3].style.color = kolor;
  else              wiersz.cells[3].style.color = kolor;

  return true;
}

// Detekcja przegl±darki


function View(name, akcja)
{
  //document.getElementById(name).style.visibility = 'visible';

  if(ns4)        podmenu = document.layers[name];
	if(ie4)        podmenu = document.all[name].style;
  if(ie5||ns6)   podmenu = document.getElementById(name).style;

  if(podmenu.visibility)
  {
    if(akcja == 1) podmenu.visibility = "visible";
    else           podmenu.visibility = "hidden";
  }
}


function pokaz(co,max)
{
for (i=1;i<max;i++)
{
document.getElementById(i).style.visibility = "hidden";
document.getElementById(i).style.position = "absolute";
}

podmenu = document.getElementById(co).style.visibility;


document.getElementById(co).style.visibility = "visible";
document.getElementById(co).style.position = "relative";



}



  function tlo(co)
  {
  document.getElementById(co).style.borderColor = "#013368";
  document.getElementById(co).style.backgroundColor = "#E7EDF4";
  document.getElementById(co).style.color = "#8399b1";


  document.getElementById('rozwiniecie'+co).style.visibility = "visible";
  document.getElementById('rozwiniecie'+co).style.position = "absolute";

  x = document.getElementById(co);

   document.getElementById('rozwiniecie'+co).style.width=x.offsetWidth-10+'px';

  }
function tlo_stare(co)
  {
  document.getElementById(co).style.borderColor = "#ABD1FE";
  document.getElementById(co).style.backgroundColor = "#EDEFF6";
  document.getElementById('rozwiniecie'+co).style.visibility = "hidden";
  document.getElementById(co).style.color = "#00336c";
  }

    function tlo_podmenu(glowna,pod)
  {
  document.getElementById('rozwiniecie'+glowna+pod).style.backgroundColor = "#ffffff";



  }
function tlo_stare_podmenu(glowna,pod)
  {
  document.getElementById('rozwiniecie'+glowna+pod).style.backgroundColor = "#E7EDF4";

  }

  function Chmurka(T,t){
 T.title=''
 T.parentNode.lastChild.style.display=t?'block':'none'
}


function typ(co)
  {

document.getElementById('typ'+co).style.visibility = "visible";
  document.getElementById('typ'+co).style.position = "absolute";

  }

  function typ2(co)
  {

document.getElementById('typ'+co).style.visibility = "hidden";
  document.getElementById('typ'+co).style.position = "absolute";

  }

  function czas()

    {

      var data = new Date();

      g = data.getHours();

      m = data.getMinutes();

      s = data.getSeconds();



      if(g <= 9) g = '0' + g;

      if(m <= 9) m = '0' + m;

      if(s <= 9) s = '0' + s;



      document.getElementById("zegar").innerHTML = g + ':' + m + ':' + s;



      setTimeout("czas()",1000);

    }


function ankieta_podswietl(obj, prefix, ocena){
	var i;

	for(i = 0; i <= 10; i++)
		document.getElementById(prefix + '_' + i).className = 'ankieta_normalne';

	if(ocena > 0)
		for(i = 1; i <= ocena; i++)
			document.getElementById(prefix + '_' + i).className = 'ankieta_podswietlone';
	else
		document.getElementById(prefix + '_' + ocena).className = 'ankieta_podswietlone';

	document.getElementById(prefix).value = ocena;
}

function ankieta_mousemove(obj, prefix, ocena){
	for(i = 1; i <= ocena; i++)
		if(document.getElementById(prefix + '_' + i).className != 'ankieta_podswietlone' &&  document.getElementById(prefix + '_' + i).className != 'ankieta_podswietlone2')
			document.getElementById(prefix + '_' + i).className = 'ankieta_podswietlone2';
}

function ankieta_mouseout(obj, prefix, ocena){
	for(i = 1; i <= 10; i++)
		if(document.getElementById(prefix + '_' + i).className == 'ankieta_podswietlone2')
			document.getElementById(prefix + '_' + i).className = 'ankieta_normalne';
}
