I don't quite understand the resize function.

I have a popup window with 2 frames. When the popup loads, I would like it to be dynamically resized.

However, I can't seem to understand the syntax & google searches have provided pages of info, but not enough examples for me to understand.

popup window looks like this:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">

    <meta name="generator" content="HTML Tidy, see www.w3.org">
    <title>Ghouls'n Ghosts</title>

  <frameset rows="36, *" onload="_top.resizeto($popup_x,$popup_y)";>
    <frame name="zoom" src="123.htm" marginwidth="0" marginheight="0" scrolling="no" noresize frameborder="0" framespacing="0">

    <frame name="ssf" frameborder="0" framespacing="0" no resize src=<?php echo("\"ss_200.php?ssurl=$ssurl&pic_sizex=$pic_sizex&pic_sizey=$pic_sizey\"");?> marginwidth="0" marginheight="0" scrolling="yes" frameborder="0" framespacing="0">
As you can see, I've put the onload code into the top frame. However, it gves me an error & then sizes the whole window in the top frame.