Justin,
You probably need to turn to JavaScript to do this. I haven't seen any window handling routines in PHP.
I would guess that an if(window_name) would do it, but the Window object might have a method to declare its precense. You need to check some JS docs to find this out.
Integrating JS and PHP is then the next course on the menu. As PHP is serverside and JS is clientside, you need to pass the info from the JS script to a PHP script through a page load. Using document.reload can do this elegantly.
Something like this pseudo code
JavaScript function:
function check_window()
{
if (!menu_window)
document.reload('my_page.php?no_menu=1');
}
BODY tag:
<... onload="check_windwow()">
PHP:
if ($no_menu)
open_menu();
...
document.reload is a great function BTW. It relaods immediately and leaves no traces in the browser history - contrary to the refresh meta tag.
Hope this helps
Martin