function initScrollLayers(Height) {
    var NewHeight = Height || 0;
    if(NewHeight != 0) {
    var theScrollObj = document.getElementById("scrollbar");
    theScrollObj.style.height = NewHeight + 'px';
    var theTrackObj = document.getElementById("track");
    NewHeight = NewHeight - 24;
    theTrackObj.style.height = NewHeight + 'px';
    }
    var wndo = new dw_scrollObj('wn1', 'lyr1');
    wndo.setUpScrollbar("dragBar", "track", "v", 2, 1);
    wndo.setUpScrollControls('scrollbar');
}

// if necessary objects exists link in the style sheet and call the init function onload
if ( document.getElementById && document.getElementsByTagName ) {
    dw_writeStyleSheet('css/scrollbar_demo.css')
    addLoadEvent(initScrollLayers);
}


function initFunctions() {
    adjustContent(); 
    initScrollLayers(); 
}
