code: function getMaxY1InRow(pages, row) {
          if (!row || row.length === 0) {
              return Infinity;
          }
          var y1s = util.map(row, function (pageIndex) {
              return pages[pageIndex].y1;
          });
          return Math.max.apply(Math, y1s);
      }
docs: Get the maximum y1 value for pages in the current row
  (or Infinity if there are no pages in the current row yet)
  @param {Array} pages Array of pages to search
  @param {Array} row   Array of page indexes (i.e., the row)
  @returns {number} The max y1 value
  @private