When posting PHP code, please use the board's [PHP][/PHP] bbcode tags - they make the code much, much easier to read (as well as aiding the diagnosis of syntax errors). You should edit your post now and add these bbcode tags to help others in reading/analyzing your code.
Though this doesn't directly relate to your problem, I want to point out your use if include/require() along with a URL. Not only should you never use include/require with a URL, but you a) probably don't have PHP code in the files, so there's no need to use include/require on static HTML - instead use [man]readfile/man, and b) should not be using a URL at all (assuming these files are on your webserver). For more information on why a URL is different than using the local filepath, see this post I made in a different thread.
As to your issue, are you saying you simply want to change a part of your page but leave the rest the same? If so, you might look into using frames (e.g. an iframe). Otherwise, you could go for the more complicated approach and use AJAX to make a request to your server, get the HTML output, and then replace document.getElementById('contentwrapper').innerHTML with this data.