// javascript functions
// http://www.pbs.org/nova/
// copyright (c) 2009 NOVA/WGBH Educational Foundation

// last modified 090203

/*  
USE: open_pop accepts 4 arguments, the last 3 of which are optional and will be given default values if not provided. 

typical video example, omits optional arguments (from hobbit):
onclick="open_pop('http://www.pbs.org/wgbh/nova/programs/ht/tm/3515.html?site=38&pl=qt&rate=hi&ch=1');

typical interactive example, provides all arguments (from hobbit):
onclick="open_pop('tree-flash.html', 'tree_window', 750, 760);
*/ 

function open_pop(which_url, which_window, win_width, win_height) {
  if (which_window === undefined) { which_window = 'vide_window'; }
  if (win_width === undefined) { win_width = '860'; }
  if (win_height === undefined) { win_height = '680'; }

	
  var win_spec = 'toolbar=0,location=0, directories=0, scrollbars=1, status=0, menubar=0, resizable=1, width=' + win_width + ', height=' + win_height;

  newwin = window.open(which_url, which_window, win_spec);
  window.self.name = "cfl_parent";
  newwin.focus();
}
