forgot to remove self
[wolnelektury.git] / wolnelektury / static / infobar / infobar.js
1 /*Based on No IE Information Bar 0.2.9 by Martin Ng <http://minghong.webhop.org>, Ching Yonghan, modified by Kornel Lesinski. Under license: http://creativecommons.org/licenses/by-nc/2.0/legalcode*/
2 (function(){if (!infobar||!viewplot)return;if(Math.random()*10>(infobar.s||10) || document.cookie.indexOf('browsehappyinfobar=0')>=0){infobar.style.display='none';return}infobar.innerHTML='<b onclick="infobar.style.display=\'none\';viewplot.height=\'100%\';document.cookie=\'browsehappyinfobar=0; path=/\'">r</b>'+infobar.innerHTML;infobar.onclick=function(){infobar.all.tags("a")[0].innerHTML='Trwa otwieranie strony informacyjnej...'};if (!infobar.offsetHeight) return;var I=infobar.runtimeStyle,V=viewplot.runtimeStyle;I.top=infobar.offsetHeight*-1;I.left=V.top=V.left=0;V.position=I.position="absolute";var T=setInterval(function(){var N=parseInt(infobar.currentStyle.top),M=-N;if(M>0){M=M>5?5:M;I.top=N+M;V.top=parseInt(V.top)+M}else{clearInterval(T);I.position=V.position="";V.top='0'}},40)})()