But still I want to try the first one, what do you mean by the TOP Page??
did you mean something else ?
Without actually seeing your pages, I'm assuming that you have one or more pages (these we will represent as the 'top' page(s)) that can bring in the code from your post via the ajaxpage function. The code from your post then in turn brings in yet another page via the ajaxpage function based upon the get or post value of p.
If I have that right, now you know where the top page is.
That may mean that I didn't get it all. Without seeing the live site I can only guess at some of the things I was saying. I tried to indicate that some it was just guessing. If that didn't come across, let me be clearer - I was just guessing at some of it.
As to your menu idea, perhaps. I really cannot be sure because I'm really not sure what you are proposing, though something like that can work if it is done correctly.