		function getWindowHeight() {
			var windowHeight = 0;
			if (typeof(window.innerHeight) == 'number') {
				windowHeight = window.innerHeight;
			}
			else {
				if (document.documentElement && document.documentElement.clientHeight) {
					windowHeight = document.documentElement.clientHeight;
				}
				else {
					if (document.body && document.body.clientHeight) {
						windowHeight = document.body.clientHeight;
					}
				}
			}
			return windowHeight;
		}
		/*function setFooter() {
			if (document.getElementById) {
				var windowHeight = getWindowHeight();
				if (windowHeight > 0) {
					var contentHeight = document.getElementById('content').offsetHeight;
					var footerElement = document.getElementById('footer');
					var footerHeight = footerElement.offsetHeight;
					if (windowHeight - (contentHeight + footerHeight) >= 0) {
						footerElement.style.position = 'absolute';
						footerElement.style.top = (windowHeight - footerHeight) + 'px';
					}
					else {
						footerElement.style.position = 'static';
					}
				}
			}
		}
		window.onload = function() {
			setFooter();
		}
		window.onresize = function() {
			setFooter();
		}*/
function goAndOpen(h,id) {
	showhide(id);
	document.location.href="#"+h;
}

function showhide(id){
	if (document.getElementById){
		obj = document.getElementById(id);
		if (obj.style.display == "none"){
			obj.style.display = "";
		} else {
			obj.style.display = "none";
		}
	}
	setFooter();
}


function pokaz(v_i) {
 var v_ii;
 v_ii = tlumacz(v_i);
 v_ii = mail(v_ii);
 return v_ii;
}

function pokazA(v_i) {
 var v_ii;
 v_ii = tlumacz(v_i);
 v_ii = mail(v_ii);

 location.href = 'mailto:'+v_ii;
 return true;
}

function tlumacz(v_tekst) {
 var aLitery  = new Array("¹","ê","æ","³","ó","œ","¿","Ÿ","ñ","±","¶");
 var aLiteryS = new Array("a","e","c","l","o","s","z","z","n","a","s"); //spolszczone

 v_tekst = v_tekst.toLowerCase();

 for (i=0; i<aLitery.length; i++)
 {
  v_tekst = zamien(v_tekst, aLitery[i], aLiteryS[i]);
 }
 return v_tekst
}

function zamien(v_tekst,litera, literaS) {
 while ( v_tekst.indexOf(litera)!= -1 ) {
   v_tekst = v_tekst.replace(litera,literaS);
 }
 return v_tekst
}

function mail(v_poczatek) {
 var aKoniec = new Array("bpsc.","com.","pl");
 var e = v_poczatek;
 var e1;
 var e2;
 var ps = v_poczatek.indexOf(' ');

 e1 = v_poczatek.substring(0,1);
 e2 = v_poczatek.substring(ps+1);
 e = e1+e2+'@';
 for (i=0; i<aKoniec.length; i++)
 { e = e+aKoniec[i];
 }
 return e;
}

function otworz(adres) {
noweOkno = window.open(adres, 'okienko', 'menubar=no, toolbar=no, location=no, scrollbars=no, resizable=no, status=no, width=425, height=300, left=30, top=30')
noweOkno.focus()
} 