// Make sure to include divscroll.js before this file

// *** SCROLLER OBJECT SETUP AND LOADING CONTENT ***

// First, you have to create one or more scroller objects corresponding to divs in your page.
// Pass it the name of a file to load (or an empty string to scroll HTML already in the page).
//  var objectName = new DHTMLScroller('objectName', 'firstFileToLoad.html');     // Loads file.
//  var objectName = new DHTMLScroller('objectName', '');       // Scrolls pre-existing content.

var content = new DHTMLScroller('content', '');

// *** SCROLLER LAYOUT AND CUSTOMISATION ***

var contentx = 375;
var contenty = 110;
var contentw = 400;
var contenth = 443;
var scrollx = contentx+contentw;
var scrollw = 14;
var arrh = 14;
with (content)
{
 // The first three divs you add are special! The first is the scroller area itself into which
 // files are loaded. The second is the scrollbar area, and he third is the scrollbar thumb (the
 // draggable bit). Anything after that is positioned and sized by the scroller engine on window
 // resize but does not have any special properties.

 // CONTENT: This div has an ID of 'contentOuter', is positioned at (x=50, y=50), and is
 // most of the window wide and high. If you want to centre the div, try something like:
 //divs[0] = new ScrDiv('contentOuter', 'page.winW()/2 - 300', 'page.winH()/2 - 200', '600', '400');
 divs[0] = new ScrDiv('contentOuter', contentx, contenty, contentw, contenth, 2);

 // SCROLLBAR: Positioned near the right edge of the window by setting its 'Left' position.
 divs[1] = new ScrDiv('contentBar', scrollx, contenty+arrh, scrollw-2, contenth-(arrh*2), 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('contentThumb', scrollx, '', scrollw-2, '', 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('contentUpArrows', scrollx, contenty, scrollw, arrh, 2);
 divs[4] = new ScrDiv('contentDownArrows', scrollx, contenty+contenth-arrh, scrollw, arrh, 2);


 // OPTIONAL SETTINGS: Uncomment these to further customise the script if you want.
 // They're all properties of this scroller object, except the 'page' object which is global.
 //
 // Other useful optional properties: manual thumb height control. Defaults are:
 //minThmHeight = 20;
 //maxThmHeight = 9999;
 // These might be useful if you want to use a fixed-size image as your scrollbar thumb.
 //
 // 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;
 // I highly recommend doing this otherwise interesting crashes can result when the window sizes
 // too small and objects start to overlap and get negative heights etc.
}
