<!--

// modified javascripts from VIMS - use MM_openBrWindow instead of location & add 2nd menu
function mmLoadMenus() {
  if (window.mm_menu_0307110959_0) return;
  window.mm_menu_0307110959_0 = new Menu("root",180,14,"Geneva, Arial, Helvetica, sans-serif",11,"#0066cc","#003399","#EAEBE6","#C8EBEE","left","middle",3,0,1000,-5,7,true,true,true,0,false,false);
  //mm_menu_0307110959_0.addMenuItem("Educators&nbsp;Contact&nbsp;List&nbsp;(pdf)","location='docs/contactlist.pdf'");
  //mm_menu_0307110959_0.addMenuItem("National&nbsp;Sea&nbsp;Grant&nbsp;Education","MM_openBrWindow('http://www.seagrant.noaa.gov/roe/education.html','_blank','');");
  mm_menu_0307110959_0.addMenuItem("National&nbsp;Sea&nbsp;Grant&nbsp;Program","MM_openBrWindow('http://www.seagrant.noaa.gov/','_blank','');");

 
  mm_menu_0307110959_0.addMenuItem("Sea Grant Programs &darr;","MM_showMenu(window.mm_menu_0307113016_0,170,10,null,'about')"); 
 // mm_menu_0307110959_0.addMenuItem("Sea Grant Programs &darr;<img name='programs' src='images/spacer.gif' width='2' height='1' border='2'>","MM_showMenu(window.mm_menu_0307113016_0,170,10,null,'programs')"); 
  mm_menu_0307110959_0.hideOnMouseOut=true;
  mm_menu_0307110959_0.bgColor='#999999';
  mm_menu_0307110959_0.menuBorder=0;
  mm_menu_0307110959_0.menuLiteBgColor='#999999';
  mm_menu_0307110959_0.menuBorderBgColor='#EAEBE6';
  window.mm_menu_0307113016_0 = new Menu("root",180,14,"Geneva, Arial, Helvetica, sans-serif",11,"#0066cc","#003399","#EAEBE6","#C8EBEE","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  
  //mm_menu_0307113016_0.addMenuItem("Select a Program:","");
  mm_menu_0307113016_0.addMenuItem("Alaska&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://seagrant.uaf.edu/marine-ed/curriculum/','_blank','');");
  mm_menu_0307113016_0.addMenuItem("California&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www-csgc.ucsd.edu/EDUCATION/EducationIndx.html','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Connecticut&nbsp;Sea&nbsp;Grant&nbsp;","MM_openBrWindow('http://web2.uconn.edu/seagrant/whatwedo/marineed/index.php','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Delaware&nbsp;Sea&nbsp;Grant&nbsp;","MM_openBrWindow('http://www.deseagrant.org/education','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Florida&nbsp;Sea&nbsp;Grant&nbsp;","MM_openBrWindow('http://www.flseagrant.org/program_areas/marine_ed/index.htm','_blank','');");
  //mm_menu_0307113016_0.addMenuItem("Georgia&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.marsci.uga.edu/gaseagrant/education.html','_blank','');");
  //mm_menu_0307113016_0.addMenuItem("University&nbsp;of&nbsp;Georgia's&nbsp;Marine&nbsp;Education&nbsp;Center&nbsp;and&nbsp;Aquarium","MM_openBrWindow('http://www.uga.edu/aquarium/','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Georgia&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.marex.uga.edu/aquarium/','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Hawaii&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.soest.hawaii.edu/SEAGRANT/education/education.php','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Illinois-&nbsp;Indiana&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.iisgcp.org/education/topics_education.html','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Lake&nbsp;Champlain&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.uvm.edu/~seagrant/education/default.html','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Louisiana&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.lamer.lsu.edu/','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Maine&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.seagrant.umaine.edu/education','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Maryland&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.mdsg.umd.edu/programs/education','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Michigan&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.miseagrant.umich.edu/education','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Minnesota&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.seagrant.umn.edu/educators/','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Mississippi-Alabama&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.masgc.org/page.asp?id=18','_blank','');");
  mm_menu_0307113016_0.addMenuItem("MIT&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://seagrant.mit.edu/education/index.php','_blank','');");
  mm_menu_0307113016_0.addMenuItem("New&nbsp;Hampshire&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.seagrant.unh.edu/extension.html','_blank','');");
  mm_menu_0307113016_0.addMenuItem("New&nbsp;Jersey&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.njmsc.org/gofish.html','_blank','');");
  mm_menu_0307113016_0.addMenuItem("New&nbsp;York&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.seagrant.sunysb.edu/article.asp?ArticleID=50','_blank','');");
  mm_menu_0307113016_0.addMenuItem("North&nbsp;Carolina&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.ncseagrant.org/home/resource-library/marine-education','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Ohio&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://ohioseagrant.osu.edu/education/','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Oregon&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://seagrant.oregonstate.edu/extension/education.html','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Pennsylvania&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.pserie.psu.edu/seagrant/education/education.htm','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Puerto&nbsp;Rico&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.seagrantpr.org/education/index.html','_blank','');"); 
  mm_menu_0307113016_0.addMenuItem("Rhode&nbsp;Island&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://seagrant.gso.uri.edu/index.html','_blank','');"); 
  mm_menu_0307113016_0.addMenuItem("South&nbsp;Carolina&nbsp;Sea&nbsp;Grant&nbsp;","MM_openBrWindow('http://www.scseagrant.org/education','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Southern&nbsp;California&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.usc.edu/org/seagrant/Education/K-12.html','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Texas&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://texas-sea-grant.tamu.edu/education.html'") 
  mm_menu_0307113016_0.addMenuItem("Virginia&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.vims.edu/adv/ed/','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Washington&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.wsg.washington.edu/education/index.html','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Wisconsin&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.seagrant.wisc.edu/education/','_blank','');");
  mm_menu_0307113016_0.addMenuItem("Woods&nbsp;Hole&nbsp;Sea&nbsp;Grant","MM_openBrWindow('http://www.whoi.edu/seagrant/education/educator.html','_blank','');");
   mm_menu_0307113016_0.hideOnMouseOut=true;
   mm_menu_0307113016_0.bgColor='#999999';
   mm_menu_0307113016_0.menuBorder=0;
   mm_menu_0307113016_0.menuLiteBgColor='#999999';
   mm_menu_0307113016_0.menuBorderBgColor='#EAEBE6';
  window.mm_menu_0307114902_0 = new Menu("root",180,14,"Geneva, Arial, Helvetica, sans-serif",11,"#0066cc","#003399","#EAEBE6","#C8EBEE","left","middle",3,0,1000,-5,7,true,true,true,0,false,true);
  mm_menu_0307114902_0.addMenuItem("Bridge Resource Center","MM_openBrWindow('http://www.vims.edu/bridge','_blank','');");
  //mm_menu_0307114902_0.addMenuItem("Marine&nbsp;Careers&nbsp;Net","MM_openBrWindow('http://www.whoi.edu/science/marinecareers/index.php','_blank','');");
  mm_menu_0307114902_0.addMenuItem("Marine Careers","MM_openBrWindow('http://www.marinecareers.net/','_blank','');");
  
  mm_menu_0307114902_0.addMenuItem("NOAA Education Resources","MM_openBrWindow('http://www.vims.edu/bridge/noaa','_blank','');");

  mm_menu_0307114902_0.addMenuItem("Ocean Literacy Principles","MM_openBrWindow('http://www.coexploration.org/oceanliteracy/','_blank','');");

   mm_menu_0307114902_0.hideOnMouseOut=true;
   mm_menu_0307114902_0.bgColor='#999999';
   mm_menu_0307114902_0.menuBorder=0;
   mm_menu_0307114902_0.menuLiteBgColor='#999999';
   mm_menu_0307114902_0.menuBorderBgColor='#EAEBE6';

mm_menu_0307114902_0.writeMenus();
} // mmLoadMenus()

function doClock() { // By Paul Davis - www.kaosweaver.com
  var t=new Date(),a=doClock.arguments,str="",i,a1,lang="1";
  var month=new Array('January','Jan', 'February','Feb', 'March','Mar', 'April','Apr', 'May','May', 'June','Jun', 'July','Jul', 'August','Aug', 'September','Sep', 'October','Oct', 'November','Nov', 'December','Dec');
  var tday= new Array('Sunday','Sun','Monday','Mon', 'Tuesday','Tue', 'Wednesday','Wed','Thursday','Thr','Friday','Fri','Saturday','Sat');
  for(i=0;i<a.length;i++) {a1=a[i].charAt(1);switch (a[i].charAt(0)) {
  case "M":if  ((Number(a1)==3) && ((t.getMonth()+1)<10)) str+="0";
  str+=(Number(a1)>1)?t.getMonth()+1:month[t.getMonth()*2+Number(a1)];break;
  case "D": if ((Number(a1)==1) && (t.getDate()<10)) str+="0";str+=t.getDate();break;
  case "Y": str+=(a1=='0')?t.getFullYear():t.getFullYear().toString().substring(2);break;
  case "W":str+=tday[t.getDay()*2+Number(a1)];break; default: str+=unescape(a[i]);}}return str;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

// dj added items

W3C = (document.getElementById) ? 1 : 0; 
IE4 = (document.all) ? 1 : 0; 
NS4 = (document.layers) ? 1 : 0; 

function dhtml_check() { // browser specific items
  if (W3C) { // netscape 6 (gecko) or greater - DOM specific object variables
    layerRef = "document.getElementById('";
    layerEnd = "')";
    layerStyle = "').style";
    layerText = "').innerHTML";
    visible = '.visibility = "visible"';
    hidden = '.visibility = "hidden"';
    zlevel = '.zindex';
    pxunits = 'px';
    okMenu = true;
  }
  else if (NS4) { // netscape 4 - DOM specific object variables
    window.onResize = reloadIt;// patch for netscape window resizing problem
    layerRef = "document.layers['";
    layerEnd = "']";
    layerStyle = "']";
    visible = '.visibility = "show"';
    hidden = '.visibility = "hide"';
    zlevel = '.zIndex';
    pxunits = 'px';
    okMenu = true;
  }
  else if (IE4) { // msie 4 or greater - DOM specific object variables
    layerRef = "document.all['";
    layerEnd = "']";
    layerStyle = "'].style";
    //layerText = "'].innerHTML";
    layerText = "').innerText";
    visible = '.visibility = "visible"';
    hidden = '.visibility = "hidden"';
    zlevel = '.zindex';
    pxunits = 'px';
    okMenu = true;
  }
  else { okMenu = false; }
}
dhtml_check();

function ChangeText(txt_tag,this_txt,id) {
  // txt_tag - id of div and ilayer (layer name is txt_tag + _a) 
  // this_txt - what is to be displayed or array name
  // id - array id if this_txt is array name
  if (id) { this_txt =  eval(this_txt)[id]; }
  if (W3C) { eval(layerRef + txt_tag + "')").innerHTML  = this_txt; }
  else if (IE4) { eval(layerRef + txt_tag + "']").innerText  = this_txt; }
  else if (NS4) { 
    var txt_tag2 = txt_tag + '_a';  
    document.eval(txt_tag).document.eval(txt_tag2).document.open();
    document.eval(txt_tag).document.eval(txt_tag2).document.write(this_txt); 
    document.eval(txt_tag).document.eval(txt_tag2).document.close();
  }
  else { alert("Don't recognize this browser"); }
}

//img_dir = 'http://www.mdsg.umd.edu/~sgen/images/';
img_dir = 'http://www.seagranted.net/images/';
imgs = new Array ('', 'reu_stream_sampling.jpg', 'reu_kayaks.jpg', 'reu_rinsing_sample2.jpg', 'reu_rinsing_sample1.jpg', 'reu_cruise_tom_jones.jpg', 'blue_crab_in_hand.jpg', 'oyster_planting.jpg', 'student_microscope.jpg', 'reu_students_cruise.jpg', 'reu_cruise_jackie_takacs.jpg');
img_txts = new Array('', 'REU Cruise - Tom Jones', 'blue crab in hand', 'oyster planting', 'Student using a dissecting microscope', 'REU students on cruise','Jackie Takacs teaching REU students' );

function showPic(pic_id) { 
  var flag = false;
  while (!flag) { 
    var random_num  = Math.ceil(imgs.length * Math.random()); 
    if (random_num < imgs.length) { flag = true; }
  }
  document.images[pic_id].src = img_dir + imgs[random_num];
}

// mm_menu.js addition
function MM_openBrWindow(theURL,winName,features) { // used with mmLoadMenus
	window.open(theURL,winName,features);
}

function forceDownload(form,file) {  
  // force download file instead of displaying in the browser
  // input file is submitted to php script (reu_apply_manage.php) used to force download the file
  eval('document.' + form + '.download').value = file; 
  eval('document.' + form).submit();  
}

function save_text(form,new_text,item) {
  var ii, str;
  ii = eval('document.' + form + '.' + new_text).selectedIndex;
  if (ii == 0) { str = ''; }
  else { 
    str = eval('document.'+form+'.'+new_text+'.options['+ii+']').text;
  }
  eval('document.' + form + '.' + item).value = str;
  //eval('document.' + form + '.' + new_text).selectedIndex = 0;
} 

//-->
