Plain Javascript pagination plugin