(function(){var u=navigator.userAgent.toLowerCase(),a=/webkit/.test(u),y=document,i=y.documentElement,g=a?y.body:i,k=y.compatMode=="CSS1Compat",m=y.documentElement.clientHeight,o=y.images,s,v,x=0,d,p=0,l=null,w=null,j,n;r();function b(D){var C,z,B=document.getElementById(D),E=document.getElementsByTagName("link");for(var A=0,t=E.length;A<t;A++){C=E[A];z=C.id;if(z&&z!=D){C.disabled=true}}if(B){B.disabled=false}r()}window.toggleStyleSheet=b;window.onscroll=function(){if(l){clearTimeout(l);l=null}l=setTimeout(h,300)};window.onresize=function(){m=i.clientHeight};function c(z){var A=z.offsetTop,t=z.offsetParent;if(t){A+=c(t)}return A}function r(){s=[];v=[];for(var A=0,t=o.length;A<t;A++){var z=o[A];if(z.getAttribute("initSrc")){if((n=c(z))===v[v.length-1]){j.push(z)}else{s.push([z]);v.push(n);j=s[s.length-1]}x++}}e(0)}function h(){if(!x){l=window.onresize=window.onscroll=null;return}e(g.scrollTop)}function e(B){var C=q(v,B),t=q(v,B+m),A;while(t>=C){if((A=s[t--])&&A.length){for(var z=0;z<A.length;z++){f(A[z])}}else{f(A)}}}function f(t){if(t&&!t.src){t.src=t.getAttribute("initSrc");t.removeAttribute("initSrc");x--}}function q(t,B){var D=0,C=t.length-1,A=false,z=Math.floor((D+C)>>1);if(B<t[0]){return -1}while(!A&&t[z]!=B){if(t[z]<B){if(z+1>C){A=true;D=z}else{D=z+1;if(t[D]>B){C=z;A=true}}}else{if(z-1<D){A=true;C=z}else{C=z-1;if(t[C]<B){D=z;A=true}}}z=Math.floor((D+C)>>1)}return z}})();
