This code is used in an Educational Portal product but can be tweaked to fit your need.
This code adds a small icon next to the title of a 'portlet' that resides on the page. By clicking the portlet title, the portlet usually maximizes within the constraint of the portal template - but the extra icon allows for the portlet to be opened in it's own window.
This simulates an MDI interface.
(REQUIRES PopItUp snippet)