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);
  }
  
   // drop down menu
function gotosite(site) {            
        if (site != "") {                    
                self.location=site; 
        }
}     
// write media player javascript
document.write('<script src="/mediaplayer/player.js" language="JavaScript"></script>');

PBSVideoWindow_X=580;
PBSVideoWindow_Y=370;

// iframe scroller
var iF_timer=null;
function stopScroll(){
clearTimeout(iF_timer)}
function Lvl_iFrameScroller(f,i,t,d,a){ //v1.0 4LevelWebs
 var r="frames['"+i+"']",ie=document.all,y,c=(f&&!i)?f:(f&&i)?r:i;
 var b=(!f)?r:f+"."+r,o=(eval("opener&&opener.parent."+b))?"opener.":'';
 var v=(f&&i)?y=o+"parent."+f+"."+c:y=o+"parent."+r;
 var e=(a==1)?'scrollLeft':'scrollTop',n =(a==1)?'pageXOffset':'pageYOffset';
 var x=(a==1)?'p,0':(a==2)?'10000,0':(a==3)?'0,10000':'0,p',s=(d==0)?(ie)?t:t+.9:(ie)?-t:-(t-.9);
 var p=(document.all)?eval(y+".document.body."+e+"")+s:eval(y+"."+n+"")+s;
 var m =eval(y+".window.scrollTo("+x+")");
  iF_timer=setTimeout("Lvl_iFrameScroller('"+f+"','"+i+"',"+t+","+d+","+a+")",1)
}



// dhtml for collapsing

document.WM = new Object();
document.WM.menu = new Object();
document.WM.menu.dropdown = new Array();

function WM_initializeToolbar(){
    var i;
    if (document.all){
	for(i = 0; i < document.all('container').all.length; i++){
	    if ((document.all('container').all[i].className == 'header') ||
(document.all('container').all[i].className == 'links')){
		document.WM.menu.dropdown[document.WM.menu.dropdown.length]
= document.all('container').all[i];
	    }
	}
    } else if (document.getElementsByTagName && document.getElementById){
	var contained =
document.getElementById('container').getElementsByTagName('div');
	for(i = 0; i < contained.length; i++){
	    if ((contained[i].getAttribute('class') == 'header') ||
(contained[i].getAttribute('class') == 'links')){
		document.WM.menu.dropdown[document.WM.menu.dropdown.length]
= contained[i];
	    }
	}
    }
}

function WM_collapse(item){
    if(document.WM.menu.dropdown.length){
	if (document.WM.menu.dropdown[item + 1].style.display == 'none'){
	    document.WM.menu.dropdown[item + 1].style.display = '';} 
	else { document.WM.menu.dropdown[item + 1].style.display = 'none';}
    }
}


//dhtml for displaying layers
function HideContent(d) {
document.getElementById(d).style.display = "none";
}
function ShowContent(d) {
document.getElementById(d).style.display = "block";
}
function ReverseContentDisplay(d) {
if(document.getElementById(d).style.display == "none") { document.getElementById(d).style.display = "block"; }
else { document.getElementById(d).style.display = "none"; }
}

//functions for the dhtml nav descriptions
function link1on() {HideContent('blank'); ShowContent('link1');}
function link1off() {HideContent('link1'); ShowContent('blank');}
function link2on() {HideContent('blank'); ShowContent('link2');}
function link2off() {HideContent('link2'); ShowContent('blank');}
function link3on() {HideContent('blank'); ShowContent('link3');}
function link3off() {HideContent('link3'); ShowContent('blank');}
function link4on() {HideContent('blank'); ShowContent('link4');}
function link4off() {HideContent('link4'); ShowContent('blank');}
function link5on() {HideContent('blank'); ShowContent('link5');}
function link5off() {HideContent('link5'); ShowContent('blank');}
function link6on() {HideContent('blank'); ShowContent('link6');}
function link6off() {HideContent('link6'); ShowContent('blank');}
function link7on() {HideContent('blank'); ShowContent('link7');}
function link7off() {HideContent('link7'); ShowContent('blank');}
function link8on() {HideContent('blank'); ShowContent('link8');}
function link8off() {HideContent('link8'); ShowContent('blank');}
function link9on() {HideContent('blank'); ShowContent('link9');}
function link9off() {HideContent('link9'); ShowContent('blank');}


//functions for the dhtml video descriptions
function vid1() {ShowContent('vid1'); HideContent('vid2'); HideContent('vid3'); HideContent('vid4'); HideContent('vid5');}

function vid2() {HideContent('vid1'); ShowContent('vid2'); HideContent('vid3'); HideContent('vid4'); HideContent('vid5');}

function vid3() {HideContent('vid1'); HideContent('vid2'); ShowContent('vid3'); HideContent('vid4'); HideContent('vid5');}

function vid4() {HideContent('vid1'); HideContent('vid2'); HideContent('vid3'); ShowContent('vid4'); HideContent('vid5');}

function vid5() {HideContent('vid1'); HideContent('vid2'); HideContent('vid3'); HideContent('vid4'); ShowContent('vid5');}