MDL-30316 - Libraries - improving pagination output to allow a shifting start page for displays of less than 18 pages -- original code provided by Martha (martha dot morelos at gmail dot com)