with (mainDiv){ divs[0] = new ScrDiv('mainDivContent', '350', '50', 'page.winW() - 400', 'page.winH() - 100', 2); // SCROLLBAR: Positioned towards the right edge of the window, we've set its X position. divs[1] = new ScrDiv('mainDivBar', 'page.winW() - 45', '65', '9', 'page.winH() - 130', 2); // DRAGGABLE THUMB: Don't pass 'Y' or 'Height' settings, these are set automatically. // Visibility=1, so this will hide when scroller content is smaller than the scroller area. divs[2] = new ScrDiv('mainDivThumb', 'page.winW() - 44', '', '8', '', 1); // And after that, you can put in the IDs of any other divs you want to position/size. // These are the up and down arrow divs, positioned on resize accordingly... divs[3] = new ScrDiv('mainDivUpArrows', 'page.winW() - 51', '29', '', '', 2); divs[4] = new ScrDiv('mainDivDownArrows', 'page.winW() - 51', 'page.winH() - 65', '', '', 2); stick = 0.5;  // Other useful optional properties: manual thumb height control. Defaults are: minThmHeight = 20; maxThmHeight = 9999;  // The page object mentioned above can have minimum sizes set. By default, the winW() and winH() // functions just return the window area, but you can set minima like so: page.minW = 400; page.minH = 300; // Try setting 'loadHack' to force pages to load in buggy browsers (like Safari as at time // of writing). loadHack = navigator.userAgent.indexOf('Safari')>-1 ? 1 : 0;  onload = new Function('getSty("loadMessage").visibility = "hidden"');}// *** SCROLLING BY MOUSEWHEEL HANDLER document.onmousewheel = function(evt){ evt=evt?evt:window.event; // You have to manually specify a scroller name in here at the moment. if (evt.wheelDelta) mainDiv.scrollBy(evt.wheelDelta / -3); return false;}// *** SCROLLING BY KEYPRESS HANDLER // This will capture keypresses and scroll up/down depending on the key code.// You must manually specify a scroller name here, as only one can respond to keys.function scrKeyDown(evt) { with (mainDiv){ if (!loaded) return; var evt = evt?evt:window.event; var key = evt.keyCode?evt.keyCode:(evt.charCode?evt.charCode:evt.which); if (key==84 || key==116 || key==36) scrollTo(0);         // 'T', 't' or 'Home' if (key==83 || key==115 || key==33) scrollBy(0-cHeight); // 'S', 's' or 'PgUp' if (key==65 || key==97  || key==38) scrollBy(-10);       // 'A', 'a' or 'Up' if (key==90 || key==122 || key==40) scrollBy(10);        // 'Z', 'z' or 'Down' if (key==88 || key==120 || key==34) scrollBy(cHeight);   // 'X', 'x' or 'PgDn' if (key==66 || key==98  || key==35) scrollTo(divHeight); // 'B', 'b' or 'End'}}// Capture key presses.if (isIE) document.onkeydown = scrKeyDown;else{ if (isNS4) document.captureEvents(Event.KEYPRESS); document.onkeypress = scrKeyDown;}
