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);
  }
  
  
// write media player javascript
document.write('<script src="/mediaplayer/player.js" language="JavaScript"></script>');

PBSAudioWindow_X=354;
PBSAudioWindow_Y=128;

PBSVideoWindow_X=550;
PBSVideoWindow_Y=385;


// email this page
var fileName = document.URL;
escapedFileName = escape(fileName);
function openemail()
{
var popurl="email_friend/email.html?"+escapedFileName;
winpops=window.open(popurl,"","width=400,height=365,status,");
}

// pop printable page
var fileName = location.pathname.substring(location.pathname.lastIndexOf('/')+1)
function popprint() {openWindow('print/p_'+ fileName +'','printpop', 575, 430, 'resizable', 'toolbar', 'status', 'scrollbars', 'menubar');}

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