A lot depends on what you are trying to do with the p=2 parameter. Are you trying to open it to the second page?
If you just want to hide the URL a bit, you can open the frameset with your url. I don’t think you have to use ?OpenFrameset. Then grab the parameter from the querystring and open the document by calculating that in your frame.