function $(i){return document.getElementById(i);}
function nwin(page,x,y){sx=screen.availWidth;sy=screen.availHeight;px=(sx/2)-(x/2);py=(sy/2)-(y/2);var nwi=window.open(page,'nwi','dependent=yes,scrollbars=no,top='+py+',left='+px+',width='+x+',height='+y+',status=yes',true);nwi.focus();}
onload=function(){for(var i=0;i<document.links.length;i++){if(document.links[i].rel=='external'){document.links[i].target='_blank';}}}
function chk_koment(){var ret=true;if($('koment').value.length<3){ret=false;alert('Komentarz powininen zawierać treść !');}return ret;}
function kontakt(id){sx=screen.availWidth;sy=screen.availHeight;px=(sx/2)-200;py=(sy/2)-150;var kw=window.open('an_kontakty.php?id='+id,'kw','dependent=yes,scrollbars=no,top='+py+',left='+px+',width=400,height=320,status=yes',true);kw.focus();}
var emailReplaceArray=[['0','@'],[',','.']];(function(elm,evnt,func){if(elm.addEventListener){elm.addEventListener(evnt,func,false);}
else if(elm.attachEvent){elm.attachEvent('on'+evnt,function(){func.call(elm,event);});}})(window,'load',function(e){var replTab=emailReplaceArray;for(var i=0;i<replTab.length;i++){var s=escape(replTab[i][0].replace(/\s/g,''));
replTab[i][0]=s.replace(/%u/g, '\\u').replace(/%/g, '\\x');}var getEmail=function(s){s=s.replace(/\s/g,'');for(var i=0;i<replTab.length;i++){s=s.replace(new RegExp(replTab[i][0],'ig'),replTab[i][1]);}return s;};
var as=document.getElementsByTagName('a');var html=document.getElementsByTagName('html')[0];var text=html.textContent!=undefined?'textContent':'innerText';
for(var i=0;i<as.length;i++){if(!as[i].className.match(/(^|\s)email_address($|\s)/))continue;var email=getEmail(as[i][text]);as[i].setAttribute('href','mailto:'+email);
as[i][text]=as[i].getAttribute('rel');as[i].style.visibility='visible';}emailReplaceArray=undefined;});
var sc=0;var iv=0;var gd=0;var list=1500;var okno=700;
function an(){invis=list-okno;if(gd<1){if(sc>-(invis+1))sc-=10;if(sc<-(invis+1))sc=-(invis+1)}else{if(sc<0)sc+=10;if(sc>0)sc=0;}$('stronyref').style.marginTop=sc+'px';}
function scr(w){gd=w;if(iv!=0)clearInterval(iv);list=$('stronyref').offsetHeight;okno=$('gwnd').offsetHeight;iv=setInterval(an,80);}
function scd(){clearInterval(iv);iv=0;}
function rol(w){if(w<1)$('gwnd').style.height='';else{$('gwnd').style.height=$('stronyref').offsetHeight+'px';sc=0;$('stronyref').style.marginTop=sc+'px';}}