Merged the pagebeforeshow events