Mistři v programování na #hovnokod

JavaScript #690

function scroll_toolbar() { 
  _E("toolbar_block").style.top = ( currentScrollOffset() >=120 ? currentScrollOffset() -60 : 60)+"px";
  if(jQuery("body iframe") && navigator.userAgent.indexOf("MSIE") < 0){
    jQuery("body iframe").css("top", (currentScrollOffset() >=200 ? currentScrollOffset() + 50 : 170) + "px !important");
  }
}

function currentScrollOffset() {
  var canvas = navigator.userAgent.indexOf("WebKit") < 0 ? 
  document.getElementsByTagName((document.compatMode && document.compatMode == "CSS1Compat") ? 
  "HTML" : "BODY")[0] : document.body;
   return canvas.scrollTop;
}
window.onscroll = scroll_toolbar;

HovnoKod,