Fix pagination incompatibility 

Javascript function paginateButton does not work with "p" GET parameter in first position, regex only takes &p and not ?p.