You have 5 buttons. You only want one of those buttons available at any time. On the last page you don't want any buttons to show. Since you only have one button available on any page, the movement is sequential, so you only need to hide the previous button and show the current button. I'm guessing that the order of the pages is: page2, page3, page3b, page3a and page3a1. If that's the case then the code should "probably" look like this: