function openWindow(url, name) {
  var l = openWindow.arguments.length;
  var w = "";
  var h = "";
  var features = "";

  for (i=2; i<l; i++) {
    var param = openWindow.arguments[i];
    if ( (parseInt(param) == 0) ||
      (isNaN(parseInt(param))) ) {
      features += param + ',';
    } else {
      (w == "") ? w = "width=" + param + "," :
       h = "height=" + param;
    }
  }

  features += w + h;
  var code = "popupWin = window.open(url, name";
  if (l > 2) code += ", '" + features;
  code += "')";
  eval(code);
  }
  
  
 // email this page
var fileName = document.URL;
escapedFileName = escape(fileName);
function openemail()
{
var popurl="email_friend/email.html?"+escapedFileName;
winpops=window.open(popurl,"","width=387,height=380,status,");
} 

function openemailsub()
{
var popurl="../email_friend/email.html?"+escapedFileName;
winpops=window.open(popurl,"","width=387,height=380,status,");
} 

// write media player javascript
document.write('<script src="/mediaplayer/player.js" language="JavaScript"></script>');

PBSAudioWindow_X=380;
PBSAudioWindow_Y=129;


// drop down menu
function gotosite(site) {            
        if (site != "") {                    
                self.location=site; 
        }
} 

function parseNavigation(ob) {
toBeBrokenDown = ob.options[ob.selectedIndex].value.split("|");
targetWindow = toBeBrokenDown[0];
targetURL    = toBeBrokenDown[1];
    if (targetWindow!=='') {
   window.open(targetURL,targetWindow,'toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=1,resizable=1,width=536,height=360');
    // if we open a new window, then we have to re-set
    // the select box to the first option
    // which should have no value
    ob.selectedIndex = 0;
        } else {
    // or else it will open in the current window        
    window.open(targetURL,'_top')
    }
}




