what i want to do is control a second browser window from the first by loading a new page in it every 10 seconds. which page to load will be figured out by php from my database.

my javascript sucks..can someone help me make this "pseudo code" work?
Code:
function start() {
  //get name for page we want to show
  var _page = <?php echo(get_page()); ?>;
  //open new page if first run, or use existing if allready done that
  if(!_window)
    var _window=window.open('_page , '', 'width=200,height=200');
  setTimeout(function(){show(_page,_window); }, 10000);

}

funtion show(_page,_window) {
  //set  the page displayed in the second window
  _window.location=_page;
  //start over
  start();
}

the above code will run in from my page. Idea is you click a button. It then open a new browser window, and load a certain page in there (window.location). Then wait 10 seconds, get the name of the next page and reuse the same browser window to display that one.