ok - I'm a complete n00b at this - so bear with me.

i need to make an autosizing popup window. Here's the current javascript i'm using just to do the popup window:
HTML Code:
    <script language="Javascript">
   function PopupPic(sPicURL) {

     window.open(sPicURL, "TEST",  
     "resizable=1,status=0,HEIGHT=200,WIDTH=200");
   }
   </script>
As you can see - all I have is the path to the image. I've seen ways of doing window.open("popup.htm?" + sPicURL ..... and then parsing it in the actual popup.htm page and getting the dimensions that way, but I can't actually access a new page like that - for reasons that are too tedious to mention.

So i was wondering if there was a way of calculating the image width and height on this page and then passing those dimensions as i create the popup window?