There are several ways to do this, depending on how you've set things up. The simplest is:
Let's say your original window has just opened a secondary window using 'window.open()'. From the secondary window, you can call a function in the primary window with 'window.opener.thefunctionname()'
If you want to run a command from the primary page to run a function on the window that was just opened, you need to use the name given to the window upon opening (one of the window.open() arguments). 'windowname.thefunctionname()' will do it in this case.
If your needs are more complex than this, I believe all current windows are available for scripting based on an array (window[0],window[1], or something like that) which will need a bit more research to implement. [sig][/sig]