anchor.diff:              if (!isFetchingLines && isDownScroll && (panel[0].scrollTopMax - 20) <= currentScroll){
                   debug('downward scroll, near bottom - so loading next lines.');
                   isFetchingLines = true;
  -                var url = '<aksess:geturl url="/admin/tools/logreader/logfiles/"/>' + filename + '.action?startline=' + (currentLine + numberOfLinesToFetch);
  -                debug(url);
  -                $.getJSON(url, function(data){
  +                var downurl = '<aksess:geturl url="/admin/tools/logreader/logfiles/"/>' + filename + '.action?startline=' + (currentLine + numberOfLinesToFetch);
  +                debug(downurl);
  +                $.getJSON(downurl, function(data){
                       isFetchingLines = false;
                       currentLine = data.lineNumber;
                       debug('Results from server: currentLine: ' + currentLine + ' numberOfLinesInFile: ' + data.numberOfLinesInFile + ' numberOfLinesReturned:' + data.numberOfLinesReturned);
  
positive.code:                     + logfile + '.action" class="downloadlogfile"></a></li>')
          }
          $('#logfiles').tabs({
              ajaxOptions: {
                  cache : false,
                  dataType : 'html',
                  dataFilter: function(result){
                      var data = $.parseJSON(result);
                      startLine = parseInt(data.lineNumber) - parseInt(data.numberOfLinesReturned);
                      currentLine = data.lineNumber;
                      return data.lines;
                  }
              }
          });
          registerScrollHandler();
      });
  
      var updateContent = function () {
          var selected = $('.ui-tabs-selected').index();
          var panel = $($('.ui-tabs-panel')[selected - 1]);
          numberOfLinesToFetch = parseInt(numberOfLinesInput.val());
          startLine = parseInt(startLineInput.val());
          $.getJSON(getUrlForFile(filesByIndex[selected], startLine, numberOfLinesToFetch), function (data) {
              currentLine = data.lineNumber;
              panel.html(data.lines);
          });
          return false;
      };
  
      var registerScrollHandler = function(){
          var lastScrollTop = 0;
  
negative.code:             lastScrollTop = currentScroll;
          });
      };
  
      $('#controlls').submit(function () {
          var selected = $('.ui-tabs-selected').index();
          var panel = $($('.ui-tabs-panel')[selected - 1]);
          numberOfLinesToFetch = parseInt(numberOfLinesInput.val());
          startLine = parseInt(startLineInput.val());
          $.getJSON(getUrlForFile(filesByIndex[selected], startLine, numberOfLinesToFetch), function (data) {
              currentLine = data.lineNumber;
              panel.html(data.lines);
          });
          return false;
      });
  
  </script>
  </body>
  </html>
  