Javascript pop-up window AND detection

I am currently working on a flash website which has an automatic redirect. If they have flash it goes to the flash site if not, then it goes to an alternate html page. My problem is that I’d also like for the flash site to pop-up in it’s own window sized to the flash movie.

I have the code for how to do these 2 things individually, but it becomes a problem when I want to do both at the same time because of the way the auto redirect is set-up. Is there an easy way to adjust the existing redirect coding to do a pop-up also?

The following is the basis for my index(redirecting) page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <title>Jeffrey Heyel Esq.</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <script type="text/javascript" src="swfobject.js"></script>
        <script type="text/javascript">
        swfobject.registerObject("myId", "8.0.0", "expressInstall.swf");
        </script>
        <style type="text/css">
<!--
body {margin:0; padding:0; font: 1em verdana, arial, sans-serif; }
div#container {position:relative; min-width:1000px; max-width:1000px;}
div#header {height:143px; text-align:center;}
div#content {margin:0 156px 0 150px;}
div#contact {font:.8em verdana, arial, sans-serif;text-align:center; padding:10px 0 10px 0;}
-->
</style>
    </head>
    <body>
        <div>
          <object id="myId" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="773" height="581">
            <param name="movie" value="jheyel_final.swf" />
            <!--[if !IE]>-->
            <object type="application/x-shockwave-flash" data="jheyel_final.swf" width="773" height="581"></div>
              <!--<![endif]-->
              <div>
<div id="container">
<div id="content">
  <p>content for html page</p>
</div><!--end of content div-->
</div>
              </div>
              <!--[if !IE]>-->
            </object>
            <!--<![endif]-->
          </object>
        </div>
    </body>
</html>

Thanx in advance!