      integer function nextmo (mym, incr)

      nextmo = mym + incr
      if (abs(incr) .ne. 1) call abort ('nextmo: wrong increment')
      if (mod(nextmo,100) .eq. 13) nextmo = nextmo + 88
      if (mod(nextmo,100) .eq.  0) nextmo = nextmo - 88
      return
      end

