if(document.getElementById){var D=document,W=window;onload=function(){W.onload=function(){};var d=function(h){return D.getElementById(h)},f=function(){var h;try{h=new XMLHttpRequest()}catch(i){try{h=new ActiveXObject("Msxml2.XMLHTTP")}catch(i){try{h=new ActiveXObject("Microsoft.XMLHTTP")}catch(i){return null}}}return h},b=D.links,c=b.length,a,e,g={markLoad:"Trwa wczytywanie pomocy.",scrError:"Wystąpił błąd w trakcie automatycznego pobierania wpisów.  Jeśli pragniesz zobaczyć poprzednie wpisy spróbuj ręcznie kliknąć link.",scrLoad:"Trwa wczytywanie kolejnych wpisów, proszę o chwilę cierpliwości.",moreClick:"załaduj",moreLoad:"trwa wczytywanie",moreComment:"Komentuj…"};c=function(){var i=D.body,k=d("Main"),j=d("Sidebar"),l=d("Categories"),h=d("Archive");if(!i||!k|!j||!l||!h){return}i.getWidth=function(){var m=k.offsetWidth/36;return(this.clientWidth?this.clientWidth:this.offsetWidth)/m};i.setVeryWide=function(){var m=D.createElement("div");m.className="Sidebar";j.parentNode.insertBefore(m,j);h.parentNode.removeChild(h);m.appendChild(h);i.className="www mina86 com Wide VeryWide";this.mina86Width="very"};i.unsetVeryWide=function(){var m=h.parentNode;m.removeChild(h);m.parentNode.removeChild(m);j.insertBefore(h,l.nextSibling);i.className="www mina86 com Wide NormWide";this.mina86Width="wide"};i.setSlim=function(){i.className="www mina86 com Slim";this.mina86Width="slim"};i.unsetSlim=function(){i.className="www mina86 com Wide NormWide";this.mina86Width="wide"};W.onresize=function(){var m=i.getWidth(),n=i.mina86Width;if(m<64&&n=="very"){i.unsetVeryWide()}if(m<52&&n=="wide"){i.setSlim()}if(m>54&&n=="slim"){i.unsetSlim()}if(m>66&&n=="wide"){i.setVeryWide()}};k.parentNode.removeChild(k);j.parentNode.insertBefore(k,j.nextSibling);i.mina86Width="wide";W.onresize()};c();c=function(){var h=d("commbody");if(!h){return}h.onkeydown=function(m){var l=this.cols,j=this.value.split("\n"),k=j.length,o=1;while(k){o+=Math.floor((j[--k].length+l)/l)}if(o<6){o=6}else{if(o>60){o=60}}if(o!=this.rows){this.rows=o}return true}};c();c=function(){var i=d("MarkdownLink"),h=d("CommentForm");if(!i||!h){return}i.markdown_commentForm=h;h=null;i.onclick=function(){var j=f();if(!j){return true}var k=D.createTextNode(g.markLoad);this.parentNode.replaceChild(k,this);j.markdown_node=k;j.markdown_href=this.href;j.markdown_commentForm=this.markdown_commentForm;j.onreadystatechange=function(){if(this.readyState!=4&&(this.readyState<2||this.status==200)){return}var o=this.markdown_node.parentNode;o.parentNode.removeChild(o);this.markdown_node=null;this.onreadystatechange=function(){};if(this.status!=200){this.abort();W.location=this.markdown_href;return}o=this.responseXML.documentElement;var m=o.getElementsByTagName("div"),n=0,l=m.length;while(n<l&&m[n].className!="Content"){++n}if(n==l){W.location=this.markdown_href;return}o=m[n];o.id="";o.removeAttribute("id");o.parentNode.removeChild(o);o.className="Text noprint";this.markdown_commentForm.parentNode.insertBefore(o,this.markdown_commentForm.nextSibling)};j.open("GET",this.href,true);j.overrideMimeType("text/xml");j.send(null);return false}};c();W.more_link_handler=function(j){var i=f();if(!i){return true}var k=D.createElement("span"),h=j.href.substring(0,j.href.length-5);k.className="load_more";k.innerHTML=g.moreLoad;j.parentNode.replaceChild(k,j);i.onreadystatechange=function(){if(this.readyState!=4){return}else{if(this.status&&this.status!=200){W.location=h;return}}var n=this.responseXML.documentElement;if(!n){W.location=h;return}var m=n.getElementsByTagName("div"),o=0,l=m.length;while(o<l&&m[o].id!="more"){++o}if(o==l){W.location=h;return}var p=this.info_node.parentNode;this.info_node.previousSibling.innerHTML=g.moreComment;p.removeChild(this.info_node);m[o].id="";m[o].removeAttribute("id");p.parentNode.insertBefore(m[o],p)};i.info_node=k;i.open("GET",h,true);i.overrideMimeType("text/xml");i.send(null);return false};more_links_prepare=function(h){for(var k=h.length;k>0;){var l=h[--k],j=l.href;if(j.substring(j.length-5)!="#more"){continue}var m=D.createElement("a");m.href=l.href;m.className="load_more";m.innerHTML=g.moreClick;m.setAttribute("onclick","return window.more_link_handler(this);");l.parentNode.insertBefore(m,l.nextSibling)}};more_links_prepare(D.getElementsByTagName("a"));c=function(){var l=d("scroller_link"),j=d("scroller_next"),i=d("scroller_message"),h=d("scroller_content");if(!l||!i||!h||j){return}j=null;var k=function(){if(!l&&!i&&!h){return}var m=D.body.scrollHeight,o=D.body.offsetHeight,p=m>o?m:o;if(self.innerHeight){p-=self.innerHeight}else{if(D.documentElement&&D.documentElement.clientHeight){p-=D.documentElement.clientHeight}else{if(D.body&&document.body.clientHeight){p-=D.body.clientHeight}else{return}}}if(self.pageYOffset!="undefined"){p-=self.pageYOffset}else{if(D.documentElement&&D.documentElement.scrollTop!="undefinde"){p-=D.documentElement.scrollTop}else{if(D.body&&D.body.scrollTop!="undefined"){p-=D.body.scrollTop}else{return}}}if(p>=750){W.setTimeout(k,p>1500?1000:500);return}var n=f();if(!n){i.innerHTML=g.scrError;return}n.onreadystatechange=function(){if(this.readyState==2){i.innerHTML=g.scrLoad;return}else{if(this.readyState!=4){return}else{if(this.status&&this.status!=200){i.innerHTML=g.scrError;return}}}i.innerHTML="";var s=this.responseXML.documentElement;if(!s){i.innerHTML=g.scrError;return}var r=s.getElementsByTagName("div"),t=0,q=r.length;while(t<q&&r[t].id!="scroller_content"){++t}if(t==q){i.innerHTML=g.scrError;return}more_links_prepare(r[t].getElementsByTagName("a"));var u=r[t];while(u.firstChild!=null){var v=u.firstChild;h.appendChild(u.removeChild(v))}r=s.getElementsByTagName("a");t=0;q=r.length;while(t<q&&r[t].id!="scroller_link"){++t}if(t==q){l.parentNode.removeChild(l);i.parentNode.removeChild(i);l=i=null}else{l.href=r[t].href;W.setTimeout(k,500)}};n.open("GET",l.href,true);n.overrideMimeType("text/xml");n.send(null)};k()};c()};if(D.addEventListener){D.addEventListener("DOMContentLoaded",W.onload,false)}};
