page number javascript function group