The switch statements are for the buttons to go to the first/last page. If you are on the first, second or third page then the first page will be in view anyway, so there is no need to display the first page button. The same goes for the other page numbers in the case, because on those pages you will see the first page via milestone page numbering anyway, so there is no need for the first page button.
The switch is quite static but that is because the first page is always the first page, it's not going to change, the first page won't become the tenth page. Whereas for the last page button, the switch I used evaluates some maths.
g2g, hope you understand now.