function imgall(){var a=0;var b=document.getElementsByTagName('a');for(var i=0;i<b.length;i++){var c=b[i];var d=String(c.getAttribute('rel'));if(c.getAttribute('href')&&(d.toLowerCase().match('adekpic'))){a++}}return a};function wczytaj_fotke(a){if(obrazcel.complete){document.getElementById("fotopreloaader").style.marginTop=0;document.getElementById("fotopreloaader").src=obrazcel.src}};function HidePicDivHtml(){document.getElementById('picturediv').style.visibility='hidden';document.getElementById('overlay').style.display='none'};function prevPic(a){var b=parseFloat(a)-1;if(b==0){b=imgall()};var c='href'+b;document.getElementById('picturediv').style.visibility='hidden';document.getElementById(c).onclick()}function nextPic(a){var b=parseFloat(a)+1;if(b>imgall()){b=1};var c='href'+b;document.getElementById('picturediv').style.visibility='hidden';document.getElementById(c).onclick()}function preloadpic(a,b,c,d,e){if(d==undefined){d=''};var f;var g;var h=15;var i=document.getElementById("picturediv");var j=document.getElementById("overlay");f=parseInt(c)+0;g=Math.floor((parseInt(c)/2));szerpol=Math.floor((parseInt(b)/2));var k=document.documentElement.offsetHeight;var l=document.documentElement.scrollHeight;var m=document.body.scrollHeight;if(!isOpera){var n=document.documentElement.clientHeight}else{var n=document.body.clientHeight}if(isSafari){var o=document.body.scrollTop}else{var o=document.documentElement.scrollTop}if((c+15+14)>=n){var p=Math.floor(c+15+14-n+20)/2}else{var p=0};if(isGecko){i.style.top=Math.round((document.documentElement.clientHeight/2)-(g)-15+o-p)+'px';if(k>=l){j.style.height=document.body.scrollHeight+10+'px'}else{j.style.height=document.documentElement.clientHeight+document.documentElement.scrollTop+10+'px'}};if(isIE){i.style.top=Math.round((document.documentElement.clientHeight/2)-(g)-15+document.documentElement.scrollTop-p)+'px';if(k<l){j.style.height=document.body.scrollHeight+'px'}else if(k>l){j.style.height=document.documentElement.clientHeight+document.documentElement.scrollTop+'px'}};if(isIE6){i.style.left=Math.round((document.documentElement.clientWidth/2)-(szerpol)-15)+'px';j.style.display='none'}if(isOpera){i.style.top=Math.round((document.body.clientHeight/2)-(g)+document.body.scrollTop)-15-p+'px';j.style.height=document.body.scrollHeight+'px'};if(parseInt(i.style.top)<0){i.style.top='5px'};if(d==undefined||d==''){i.innerHTML="	<div style=\"width:"+b+"px;height:"+f+"px\"><a href=\"javascript:;\" onclick=\"HidePicDivHtml();\"><img id=\"fotopreloaader\" style=\"margin-top:"+g+"px\" src=\"/files/Image/loading_transp.gif\" alt=\"Kliknij, aby zamknÄ?Ä? zdjÄ?cie\" title=\"Kliknij, aby zamknÄ?Ä? zdjÄ?cie\"/></a></div><div style=\"padding-top:0;width:"+b+"px; height:"+h+"px; text-align:right\"><a href=\"javascript:;\" onclick=\"HidePicDivHtml();\">Zamknij</a></div>"}else if(d!=''&&d!='undefined'){i.innerHTML="	<div style=\"width:"+b+"px;height:"+f+"px\"><a href=\"javascript:;\" onclick=\"HidePicDivHtml();\"><img id=\"fotopreloaader\" style=\"margin-top:"+g+"px\" src=\"/files/Image/loading_transp.gif\" alt=\"Kliknij, aby zamknÄ?Ä? zdjÄ?cie\" title=\"Kliknij, aby zamknÄ?Ä? zdjÄ?cie\"/></a></div><div style=\"padding-top:0;width:"+b+"px; height:"+h+"px; text-align:right\"><span style=\"float:left;text-align:left;width:100px\">ZdjÄ?cie nr "+d+" / "+e+"</span><span><a href=\"javascript:prevPic('"+d+"');\">&laquo; Poprzednie</a></span> <span><a href=\"javascript:nextPic('"+d+"');\">NastÄ?pne &raquo;</a></span>&nbsp; <a href=\"javascript:;\" onclick=\"HidePicDivHtml();\">Zamknij X</a></div>"}document.getElementById("overlay").style.display="block";i.style.visibility="visible";obrazcel=new Image();if(a.indexOf('http://',0)==-1){obrazcel.src='/'+a}else{obrazcel.src=a};czas2=setInterval("wczytaj_fotke('plik')",1000)}
