The problem is I get a new session ID when I press F5 (page refresh) why??
Dunno, check how you call your sessions.
If the PHPSESSID (you may want to change the name) is set in the URL, then there really is no reason why it should be changing.
As far as this....
var html1 = "<a href=\"Javascript: showPopup2()\" class=\"news\">";
According to the constantly forgotten PHP Manual (hey... who needs a manual when you have forums?) PHP will rewrite all your relative links if you have trans-sid=enabled.
What do you do about this hideous feature that is rewritting all your hrefs?
Well, it doesn't rewrite absolute links or placeholders, so rewrite it like so...
var html1 = '<a href="#" onClick="Javascript: showPopup2()" class="news">';
...Note the '#'... you should always use that to keep your onClicks from causing the page to just around and with the javascript call safely out of the HREF field, you will no longer have PHP rewritting that link.