n mdl-button--icon" '..(pageIndex>0 and 'href=\"recinfo.html?page=0"' or 'disabled')..'><i class="material-icons">first_page</i></a>\n'
  pg=pg..'<a class="mdl-button mdl-js-button mdl-button--icon" '..(pageIndex>0 and 'href=\"recinfo.html?page='..(pageIndex-1)..'"' or 'disabled')..'><i class="material-icons">chevron_left</i></a>\n'

  n=pageIndex>(#a/PAGE_COUNT-2) and math.floor(#a/PAGE_COUNT)-4 or math.max(0,pageIndex-2)
  for i=n, n+4 do
    pg=pg..(i>=0 and i<#a/PAGE_COUNT and '<a class="mdl-button