Okay, maybe i can help.
I'm not at home right now ,so i can't do any testing ,but the function you want to create has to work like this:
1. extract the number from the Button pressed.
if you specify the "id" for the button ,then you can easily get it by:
local id = this:GetID();
(do a DEFAULT_CHAT_FRAME:AddMessage("ID:" .. id) for dump out the value for testing)
2. the "Hidding" part.
if you wrapped all your elements (buttons, fontstrings) inside one <frame> element ,it's easy.
For example your Frame with all the content for Page 1 is called "FramePage1", then you do something like this:
if (id == 1) then
FramePage1:Show()
FramePage2:Hide()
FramePage3:Hide()
end
if (id == 2) then
FramePage1:Hide()
FramePage2:Show()
FramePage3:Hide()
end
If you need to know how you can nest the elements inside a Frame, you can check this:
http://fara.webeddie.com/ui/