/* ShowHide.js     ver 1.6   [Oct 2005]
 * Copyright (c) 2002,2005 by Micha³ Nazarewicz (mina86/AT/tlen.pl)
 */
var theDoc = document,
    theAll = theDoc.all ? theDoc.all : null,
    isDOM = theDoc.getElementById ? true : false,
    pos = navigator.userAgent.toLowerCase().indexOf("opera"),
    isElektra = pos!=-1 && parseFloat(navigator.userAgent.substring(pos+6))<7,
    isntShowHideOK = !isDOM && theAll==null;

var HiddenLayers = new Array();
function InitShowHide() {
	for (var i=0; i<HiddenLayers.length; i++) {
		ShowHideLayer(HiddenLayers[i], false);
	}
}

function ShowHideLayer(name, state) {
	if (isntShowHideOK) return null;
	var obj = isDOM ? theDoc.getElementById(name) : theAll[name];
	if (arguments.length<2) {
		state = obj.style.display=="none";
	}
	obj.style.display = state ? "block" : "none";
	return state;
}

function ShowHideClick(name, desc1, desc2, islink) {
	desc1 = unescape(desc1); desc2 = unescape(desc2);
	var state = ShowHideLayer(name);
	if (desc1==desc2) return;

	if (!islink) {
		var but = document.forms[name + '__form'].elements[name+'__button'];
		but.value = (state) ? desc1 : desc2;
	} else if (!isElektra) {
		var link = isDOM
			? theDoc.getElementById(name + '__link')
			: theAll[name+'__link'];
		link.innerHTML=(state)?desc1:desc2;
	}
}

function addShowHideButton(name, desc1) {
		theDoc.write('<a href="#" onclick="ShowHideClick(\'' + name +
			'\', \'' + escape(desc1) + '\', \'' + escape(desc1) +
			'\', true); return false;" id="' + name + '__link">' +
			desc1 + '</a>');
}


function Dzial() {

	var dzial = document.getElementById('dzial').value;
	
	if(dzial)
	{
		window.location.href = "wykaz,"+dzial+".html";
	}

}