if ( dw_scrollObj.isSupported() ) {
    //dw_writeStyleSheet('css/scroll.css');
    dw_Event.add( window, 'load', init_dw_Scroll);
}
function init_dw_Scroll() {
    // Initialize scroll area
    // arguments: id of outer div, id of content div
    var wndo = new dw_scrollObj('divContainerThumbs', 'divContentThumbs');
    
    // Initialize scrollbar
    // id of dragbar, id of track, 
    // axis ('v' for vertical scrolling, 'h' for horizontal)
    // horizontal offset of dragbar in track, vertical offset
    // size dragBar according to amount of content? (boolean)
    //wndo.setUpScrollbar('dragBar', 'track', 'v', 1, 1, true);
    
    // Initialize scroll links
    // id of element within which to locate scroll controls
    wndo.setUpScrollControls('scrollup');
    wndo.setUpScrollControls('scrolldown');
    
    var imm_value = getQuerystring('imm');
    dw_scrollObj.scrollToId('divContainerThumbs', 'imm'+imm_value, 'divContentThumbs', 100);    
}

function getQuerystring(key, default_) {
  if (default_==null) default_=""; 
  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
  var qs = regex.exec(window.location.href);
  if(qs == null)
    return default_;
  else
    return qs[1];
}
