%globalDTD; ]> document.getAnonymousElementByAttribute(this, "anonid", "scrollbox"); document.getAnonymousElementByAttribute(this, "anonid", "scrollbutton-up"); document.getAnonymousElementByAttribute(this, "anonid", "scrollbutton-down"); null null null null document.defaultView.getComputedStyle(this._scrollbox, "").direction == "ltr"; 0) { for (var i = Math.round(off / FRAME_LENGTH); i > 0; i--) distance += scrollAmounts.shift() || 0; } self.scrollByPixels(distance); if (!scrollAmounts.length) self._stopSmoothScroll(); } // amountToScroll: total distance to scroll // scrollAmount: distance to move during the particular effect frame (60ms) var scrollAmount, scrollAmounts = []; if (amountToScroll > 2 || amountToScroll < -2) { scrollAmount = round(amountToScroll * 0.2); scrollAmounts.push(scrollAmount, scrollAmount, scrollAmount); amountToScroll -= 3 * scrollAmount; } while (this._isScrolling < 0 && amountToScroll < 0 || this._isScrolling > 0 && amountToScroll > 0) { amountToScroll -= (scrollAmount = round(amountToScroll * 0.5)); scrollAmounts.push(scrollAmount); } this._smoothScrollTimer = setInterval(processFrame, FRAME_LENGTH, this, scrollAmounts); processFrame(this, scrollAmounts, 0); ]]> 0 ? rect.bottom + 1 : rect.top - 1; } else { x = index > 0 ? rect.right + 1 : rect.left - 1; if (!this._isLTRScrollbox) index *= -1; } var nextElement = this._elementFromPoint(x); if (!nextElement) return; var targetElement; while (index < 0 && nextElement) { targetElement = nextElement; nextElement = nextElement.previousSibling; index++; } while (index > 0 && nextElement) { targetElement = nextElement; nextElement = nextElement.nextSibling; index--; } this.ensureElementIsVisible(targetElement); ]]> aX) high = mid - 1; else if (rect[end] < aX) low = mid + 1; else return element; } return null; ]]> 0 0 0 150 3) return; var scrollLeft = (aEvent.originalTarget == this._scrollButtonUp); if (!this._isLTRScrollbox) scrollLeft = !scrollLeft; var targetElement; if (aEvent.detail == 2) { // scroll by the width of the scrollbox; make sure that the next // partly-hidden element will become fully visible. let rect = this.scrollClientRect; let x; if (scrollLeft) x = rect.left - rect.width; else x = rect.right + rect.width; targetElement = this._elementFromPoint(x); if (targetElement) targetElement = scrollLeft ? targetElement.nextSibling : targetElement.previousSibling; } if (!targetElement) { // scroll to the first resp. last element var elements = this._getScrollableElements(); targetElement = (this._isLTRScrollbox ? scrollLeft : !scrollLeft) ? elements.item(0) : elements.item(elements.length-1); } this.ensureElementIsVisible(targetElement); ]]>