Adding ajax pagination

I hope you are using some code to set startlimit since this is number of pages, and they start from 1, and limitstart starts from 0