<!-- -------------Controls mouseOver image swapping for Navigation-->
function newImage(arg) {
  if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
  }
}

function changeImages() {
  if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
      document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
    }
  }
}

var empty_out = "../../../shared/images/emptynav.gif";
var search_out = "../../../shared/images/search.gif";
var lessonmap_out = "../../../shared/images/lessonmap.gif";
var conversions_out = "../../../shared/images/conversions.gif";
var sns_out = "../../../shared/images/sns.gif";
var glossary_out = "../../../shared/images/glossary.gif";
var top_out = "../../../shared/images/top.gif";
var previous_out = "../../../shared/images/previous.gif";
var next_out = "../../../shared/images/next.gif";
var textline_out = "../../../shared/images/textline.gif";
var preloadFlag = false;
if (document.images) {
  search_over = newImage("../../../shared/images/search_over.gif");
  search_over_textline = newImage("../../../shared/images/search_over-textline.gif");
  lessonmap_over = newImage("../../../shared/images/lessonmap_over.gif");
  lessonmap_over_textline = newImage("../../../shared/images/lessonmap_over-textline.gif");
  conversions_over = newImage("../../../shared/images/conversions_over.gif");
  conversions_over_textline = newImage("../../../shared/images/conversions_over-textline.gif");
  sns_over = newImage("../../../shared/images/sns_over.gif");
  sns_over_glossary = newImage("../../../shared/images/sns_over-glossary.gif");
  sns_over_textline = newImage("../../../shared/images/sns_over-textline.gif");
  glossary_over = newImage("../../../shared/images/glossary_over.gif");
  glossary_over_textline = newImage("../../../shared/images/glossary_over-textline.gif");
  top_over = newImage("../../../shared/images/top_over.gif");
  top_over_textline = newImage("../../../shared/images/top_over-textline.gif");
  previous_over = newImage("../../../shared/images/previous_over.gif");
  previous_over_textline = newImage("../../../shared/images/previous_over-textline.gif");
  next_over = newImage("../../../shared/images/next_over.gif");
  next_over_textline = newImage("../../../shared/images/next_over-textline.gif");
  preloadFlag = true;
}
<!-- -------------Controls mouseOver image swapping for Navigation-->
<!-- -------------Pastes in Navigation bar on each page-->
navStrBegin = '' +
  '<br><table width="410" border="0" cellpadding="0" cellspacing="0">' +
  '<tr>';
navStrTools = '' +
    '<td>' +
      '<img src="' + empty_out + '" width="98" height="32"></td>' +
    '<td>' +
      '<img name="lessonmap" src="' + lessonmap_out + '" width="39" height="32" border="0" usemap="#lessonmap_Map"></td>' +
    '<td>' +
      '<img name="search" src="' + search_out + '" width="57" height="32" border="0" usemap="#search_Map"></td>' +
    '<td>' +
      '<img name="conversions" src="' + conversions_out + '" width="50" height="32" border="0" usemap="#conversions_Map"></td>' +
    '<td>' +
      '<img name="glossary" src="' + glossary_out + '" width="30" height="32" border="0" usemap="#glossary_Map"></td>' +
    '<td>' +
      '<img name="sns" src="' + sns_out + '" width="49" height="32" border="0" usemap="#sns_Map"></td>';
navStrNoTools = '' +
    '<td>' +
      '<img src="' + empty_out + '" width="323" height="32"></td>';
navStrArrows = '' +
    '<td>' +
      '<img name="top" src="' + top_out + '" width="24" height="32" border="0" usemap="#top_Map"></td>' +
    '<td>' +
      '<img name="previous" src="' + previous_out + '" width="31" height="32" border="0" usemap="#previous_Map"></td>' +
    '<td>' +
      '<img name="next" src="' + next_out + '" width="32" height="32" border="0" usemap="#next_Map"></td>' +
  '</tr>';
navStrEnd1 = '' +
  '<tr>' +
    '<td colspan="9">' +
      '<img name="textline" src="' + textline_out + '" width="410" height="14"></td>' +
  '</tr>' +
'</table>' +
'<map name="lessonmap_Map">' +
'<area shape="rect" alt="" coords="8,6,34,28" href="javascript:openmap()" ' +
  'onmouseover="changeImages(\'lessonmap\', lessonmap_over.src, \'textline\', lessonmap_over_textline.src); mapOver(); return true;" ' +
  'onmouseout="changeImages(\'lessonmap\', lessonmap_out, \'textline\', textline_out); statusOut(); return true;">' +
'</map>' +
'<map name="search_Map">' +
'<area shape="rect" alt="" coords="9,3,38,30" href="../search/search.html" ' +
  'onmouseover="changeImages(\'search\', search_over.src, \'textline\', search_over_textline.src); searchOver(); return true;" ' +
  'onmouseout="changeImages(\'search\', search_out, \'textline\', textline_out); statusOut(); return true;">' +
'</map>' +
'<map name="conversions_Map">' +
'<area shape="rect" alt="" coords="6,6,42,30" href="javascript:openconv()" ' +
  'onmouseover="changeImages(\'conversions\', conversions_over.src, \'textline\', conversions_over_textline.src); convOver(); return true;" ' +
  'onmouseout="changeImages(\'conversions\', conversions_out, \'textline\', textline_out); statusOut(); return true;">' +
'</map>' +
'<map name="glossary_Map">' +
'<area shape="rect" alt="" coords="4,1,24,29" href="javascript:openglossnav()" ' +
  'onmouseover="changeImages(\'glossary\', glossary_over.src, \'textline\', glossary_over_textline.src); glossaryOver(); return true;" ' +
  'onmouseout="changeImages(\'glossary\', glossary_out, \'textline\', textline_out); statusOut(); return true;">' +
'</map>' +
'<map name="sns_Map">' +
'<area shape="rect" alt="" coords="7,6,43,29" href="javascript:opensns()" ' +
  'onmouseover="changeImages(\'glossary\', sns_over_glossary.src, \'sns\', sns_over.src, \'textline\', sns_over_textline.src); snsOver(); return true;" ' +
  'onmouseout="changeImages(\'glossary\', glossary_out, \'sns\', sns_out, \'textline\', textline_out); statusOut(); return true;">' +
'</map>' +
'<map name="top_Map">' +
'<area shape="rect" alt="" coords="6,5,22,28" href="#topOfPage" ' +
  'onmouseover="changeImages(\'top\', top_over.src, \'textline\', top_over_textline.src); topOver(); return true;" ' +
  'onmouseout="changeImages(\'top\', top_out, \'textline\', textline_out); statusOut(); return true;">' +
'</map>' +
'<map name="previous_Map">' +
'<area shape="rect" alt="" coords="10,5,26,28" href="javascript:history.back()" ' +
  'onmouseover="changeImages(\'previous\', previous_over.src, \'textline\', previous_over_textline.src); backOver(); return true;" ' +
  'onmouseout="changeImages(\'previous\', previous_out, \'textline\', textline_out); statusOut(); return true;">' +
'</map>' +
'<map name="next_Map">' +
'<area shape="rect" alt="" coords="4,5,20,28" href="';
navStrEnd2 = '' +
  '" onmouseover="changeImages(\'next\', next_over.src, \'textline\', next_over_textline.src); return true;" ' +
  'onmouseout="changeImages(\'next\', next_out, \'textline\', textline_out); return true;">' +
'</map>';
function writeNav(nextpage)
{
document.write(navStrBegin + navStrTools + navStrArrows + navStrEnd1 + nextpage + navStrEnd2);
}
function writeNavArrows(nextpage)
{
document.write(navStrBegin + navStrNoTools + navStrArrows + navStrEnd1 + nextpage + navStrEnd2);
}
<!-- -------------Pastes in Navigation bar on each page-->
<!-- -------------Opens new Assignment-->
var newassign = null;
function openassign(url)
	{
var winl = (screen.availWidth - 600) / 2;
var wint = ((screen.availHeight - 400) - 80) / 2;
  if (newassign != null && newassign.open) newassign.close();
  newassign = window.open(url,"assign","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=400,top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Assignment-->
<!-- -------------Opens new Redirect-------->
var newredirect = null;
function openredirect(url)
	{
var winl = (screen.availWidth - 700) / 2;
var wint = ((screen.availHeight - 450) - 80) / 2;
  if (newredirect != null && newredirect.open) newredirect.close();
  newredirect = window.open("","cto","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=700,height=450,top=" + wint + ",left=" + winl);

     	newredirect.document.write('<html><head><title>Loading</title>' +
	'<link rel="stylesheet" href="' + glbpath + 'shared/cssGlobal.css" type="text/css">' +
	'<link rel="stylesheet" href="' + glbpath + 'shared/cssCourse.css" type="text/css"></head>')

if(lesson=="IN")

{	newredirect.document.write('<script>function redirect(){window.location="http://masters.agron.iastate.edu/redirect/' + course + '/intro/' + url + '"}</script>');

}

else
{
	newredirect.document.write('<script>function redirect(){window.location="http://masters.agron.iastate.edu/redirect/' + course + '/' + maincat + lesson + '/' + url + '"}</script>');

//alert(lesson);
}

	newredirect.document.write('<body class="white" onLoad="redirect();">' +
	'<p class="mainHdg3">LOADING...' +
	'<p>You are being redirected to a website on the Internet, however, you must be online to access this site. If you are not redirected within 5 seconds, please click <a>here</a>.<p>' +
	clswin +
	'</body></html>');


     	newredirect.document.close();
	}
<!-- -------------Opens new Redirect--------->
<!-- -------------Opens new Conversion Page-->
var newconv = null;
function openconv()
	{
var winl = (screen.availWidth - 610) / 2;
var wint = ((screen.availHeight - 410) - 80) / 2;
  if (newconv != null && newconv.open) newconv.close();
  newconv = window.open("../../../tools/conversions/conversions.html","convert","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=610,height=410,top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Conversion Page-->
<!-- -------------Opens new In Detail-->
var newdetail = null;
function opendetail(url,name,w,h)
	{
var neww = (adjWidth - (-w));
var newh = (adjHeight - (-h));
var winl = (screen.availWidth - neww) / 2;
var wint = ((screen.availHeight - newh) - 80) / 2;
  if (newdetail != null && newdetail.open) newdetail.close();
  newdetail = window.open(url,name ,"toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=" + neww + ",height=" + newh + ",top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new In Detail-->
<!-- -------------Opens new Discussion Topic-->
var newdiscuss = null;
function opendiscuss(url)
	{
var winl = (screen.availWidth - 600) / 2;
var wint = ((screen.availHeight - 400) - 80) / 2;
  if (newdiscuss != null && newdiscuss.open) newdiscuss.close();
  newdiscuss = window.open(url,"discuss","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=400,top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Discussion Topic-->
<!-- -------------Opens new FYI-->
var newfyi = null;
function openfyi(url,name,w,h)
	{
var neww = (adjWidth - (-w));
var newh = (adjHeight - (-h));
var winl = (screen.availWidth - neww) / 2;
var wint = ((screen.availHeight - newh) - 80) / 2;
  if (newfyi != null && newfyi.open) newfyi.close();
  newfyi = window.open(url,name ,"toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=" + neww + ",height=" + newh + ",top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new FYI-->
<!-- -------------Opens new Glossary Term or Glossary Index from Navigation-->
var newglossterm = null;
function openglossterm(url)
	{
var winl = (screen.availWidth - 500) / 2;
var wint = ((screen.availHeight - 100) - 80) / 2;
  if (newglossterm != null && newglossterm.open) newglossterm.close();
  newglossterm = window.open(url,"glossary","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=500,height=100,top=" + wint + ",left=" + winl);
	}
var newglossnav = null;
function openglossnav()
	{
var winl = (screen.availWidth - 600) / 2;
var wint = ((screen.availHeight - 350) - 80) / 2;
  newglossnav = window.open("../../../glossary/index.html","glossarynav","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=350,top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Glossary Term or Glossary Index from Navigation-->
<!-- -------------Opens new Lesson Map-->
var newmap = null;
function openmap()
	{
var winl = (screen.availWidth - 300) / 2;
var wint = ((screen.availHeight - 400) - 80) / 2;
  newmap = window.open("map.html","map","toolbar=no,location=no,directories=no,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=550,height=450,top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Lesson Map-->
<!-- -------------Opens new Media-->
var newmedia = null;
function openmedia(url,name,w,h)
	{
var neww = (adjWidth - (-w));
var newh = (adjHeight - (-h));
var winl = (screen.availWidth - neww) / 2;
var wint = ((screen.availHeight - newh) - 80) / 2;
  if (newmedia != null && newmedia.open) newmedia.close();
  newmedia = window.open(url,name ,"toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=" + neww + ",height=" + newh + ",top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Media-->
<!-- -------------Opens new Review-->
var newreview = null;
function openreviewcd(url)
	{
var winl = (screen.availWidth - 760) / 2;
var wint = ((screen.availHeight - 450) - 80) / 2;
  if (newreview != null && newreview.open) newreview.close();
  newreview = window.open(url,"review","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=760,height=450,top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Review-->
<!-- -------------Opens new Review from the web-->
var newreview = null;
function openreviewweb(url)
	{
var winl = (screen.availWidth - 760) / 2;
var wint = ((screen.availHeight - 450) - 80) / 2;
  if (newreview != null && newreview.open) newreview.close();
  newreview = window.open("","review","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=760,height=450,top=" + wint + ",left=" + winl);

reviewStr = '<HTML><HEAD><TITLE>Review: Loading</TITLE>' +
	'<link rel="stylesheet" href="' + glbpath + 'shared/cssGlobal.css" type="text/css">' +
	'<link rel="stylesheet" href="' + glbpath + 'shared/cssCourse.css" type="text/css"></HEAD>' +
	'<script>function redirect(){window.location="' + url + '"}</script>' +
	'<BODY class="white" onLoad="redirect();">' +
	'<P class="mainHdg3">LOADING...' +
	'<P>You are being redirected to a website on the Internet, however, you must be online to access this site. If you are not redirected within 5 seconds, please click <a>here</a>.<p>' +
	clswin +
	'</BODY></HTML>';
     	newreview.document.write(reviewStr);
     	newreview.document.close();
	}
<!-- -------------Opens new Review from the web-->
<!-- -------------Opens new Search Page-->
var newsearch = null;
function opensearch()
	{
var winl = (screen.availWidth - 740) / 2;
var wint = ((screen.availHeight - 450) - 80) / 2;
  if (newsearch != null && newsearch.open) newsearch.close();
  newsearch = window.open("../search/search.html","search","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=740,height=450,top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Search Page-->
<!-- -------------Opens new Student Notebook System from Navigation-->
var newsns = null;
function opensns()
	{
var winl = (screen.availWidth - 600) / 2;
var wint = ((screen.availHeight - 400) - 80) / 2;
  if (newsns != null && newsns.open) newsns.close();
  newsns = window.open("../sns.html","sns","toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=400,top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Student Notebook System from Navigation-->
<!-- -------------Opens new Study Question window-->
var newstudy = null;
function openstudy(url,name,w,h)
	{
var neww = (adjWidth - (-w));
var newh = (adjHeight - (-h));
var winl = (screen.availWidth - neww) / 2;
var wint = ((screen.availHeight - newh) - 80) / 2;
  if (newstudy != null && newstudy.open) newstudy.close();
  newstudy = window.open(url,name ,"toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=" + neww + ",height=" + newh + ",top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Study Question window-->
<!-- -------------Opens new Try This-->
var newtry = null;
function opentry(url,name,w,h)
	{
var neww = (adjWidth - (-w));
var newh = (adjHeight - (-h));
var winl = (screen.availWidth - neww) / 2;
var wint = ((screen.availHeight - newh) - 80) / 2;
  if (newtry != null && newtry.open) newtry.close();
  newtry = window.open(url,name ,"toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=" + neww + ",height=" + newh + ",top=" + wint + ",left=" + winl);
	}
<!-- -------------Opens new Try This-->
<!-- -------------Opens new Image for In Detail, FYI, Review, or Other-->
var newimage = null;
function openimage(url,name,w,h,title,caption)
	{
var neww = (adjWidth - (-w));
var newh = (adjHeight - (-h));
var winl = (screen.availWidth - neww) / 2;
var wint = ((screen.availHeight - newh) - 80) / 2;
  if (newimage != null && newimage.open) newimage.close();
  newimage = window.open("",name ,"toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=" + neww + ",height=" + newh + ",top=" + wint + ",left=" + winl);

imageStr = '<HTML>' +
	'<HEAD>' +
	'<TITLE>' + title + '</TITLE>' +
	'<SCRIPT src="' + glbpath + 'shared/jsGlobal.js"></SCRIPT>' +
	'<SCRIPT src="' + glbpath + 'shared/jsCourse.js"></SCRIPT>' +
	'<LINK rel="stylesheet" href="' + glbpath + 'shared/cssGlobal.css" type="text/css">' +
	'<LINK rel="stylesheet" href="' + glbpath + 'shared/cssCourse.css" type="text/css">' +
	'</HEAD><BODY class="white">' +
	'<br><p class="center"><img src="' + url + '">' +
	'<p class="imageCaption">' + caption + '</p>' +
	clswin +
	'<p></BODY></HTML>';
     	newimage.document.write(imageStr);
     	newimage.document.close();
	}
<!-- -------------Opens new Image for In Detail, FYI, Review, or Other-->
<!-- -------------Opens a new Video window on the fly-->
var newVideo = null;
function openVideo(url,w,h,name,title)
{
	var neww = (adjWidth - (-w - 75));
	var newh = (adjHeight - (-h - 130));
	var winl = ((screen.availWidth - neww))/ 2;
	var wint = ((screen.availHeight - newh) - 80) / 2;
	if (newVideo != null && newVideo.open) newVideo.close();
	newVideo = window.open("",name,"toolbar=no,location=no,directories=no,status=no,menubar=yes,scrollbars=yes,resizable=yes,width=" + neww + ",height=" + newh + ",top=" + wint + ",left=" + winl);

	VideoStr = '<HTML>' +
		'<HEAD>' +
		'<TITLE>' + title + '</TITLE>' +
		'<SCRIPT src="' + glbpath + 'shared/jsGlobal.js"></SCRIPT>' +
		'<SCRIPT src="' + glbpath + 'shared/jsCourse.js"></SCRIPT>' +
		'<LINK rel="stylesheet" href="' + glbpath + 'shared/cssGlobal.css" type="text/css">' +
		'<LINK rel="stylesheet" href="' + glbpath + 'shared/cssCourse.css" type="text/css">' +
		'</HEAD>' +
		'<body onUnload="autoclose()">' +
		'<br>' +
		'<p class="center"> ' +
  		'<OBJECT CLASSID="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA"' +
		  'STANDBY="Loading Real Movie..."' +
		  'WIDTH="' + w + '"' +
		  'HEIGHT="' + h + '"' +
		  'ID="msagronRealMov">' +
 		 '<PARAM NAME="src" VALUE="' + url + '">' +
 		 '<PARAM NAME="console" VALUE="Clip1">' +
 		 '<PARAM NAME="controls" VALUE="ImageWindow">' +
 		 '<PARAM NAME="autostart" VALUE="true">' +
 		 '<!-- Plugin Code For Netscape -->' +
 		 '<EMBED WIDTH="' + w + '"' +
       		  'HEIGHT="' + h + '"' +
       		  'NAME="msagronRealMov"' +
       		  'SRC="' + url + '"' +
      		  'CONSOLE="Clip1"' +
       		  'CONTROLS="ImageWindow"' +
     		  'AUTOSTART="true">' +
  		'</EMBED>' +
  		'</OBJECT>' +
  		'<BR>' +
  		'<OBJECT CLASSID="CLSID:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA"' +
	 	 'WIDTH="' + w + '"' +
	 	 'HEIGHT="60"' +
	 	 'ID="msagronRealControls">' +
  		'<PARAM NAME="console" VALUE="Clip1">' +
  		'<PARAM NAME="controls" VALUE="All">' +
  		'<!-- Plugin Code For Netscape -->' +
  		'<EMBED WIDTH="' + w + '"' +
         	'HEIGHT="' + h + '"' +
         	'NAME="msagronRealControls"' +
         	'CONSOLE="Clip1"' +
         	'CONTROLS="All"' +
  		'</EMBED>' +
  		'</OBJECT>' +
		'<p>' +
		clswin +
		'<center>' +
		'</BODY>' +
		'</HTML>';
	newVideo.document.write(VideoStr);
}
<!-- -------------Opens a new Video window on the fly-->
<!-- -------------Controls mouseOvers for all links-->
function assignOver() { window.status = 'Click here for Assignment'; }
function ctoOver() { window.status = 'Click here for Check This Out!'; }
function detailOver() { window.status = 'Click here for In Detail'; }
function discussOver() { window.status = 'Click here for Discussion Topic'; }
function fyiOver() { window.status = 'Click here for FYI'; }
function glossaryOver() { window.status = 'Click here for Glossary'; }
function mapOver() { window.status = 'Click here for Map'; }
function mediaOver() { window.status = 'Click here for Media'; }
function redirectOver() { window.status = 'Click here for Internet Website'; }
function reflectOver() { window.status = 'Click here for Lesson Reflection'; }
function reviewOver() { window.status = 'Click here for Review'; }
function convOver() { window.status = 'Click here for Conversions Page'; }
function searchOver() { window.status = 'Click here for Search Page'; }
function snsOver() { window.status = 'Click here for Student Notebook System'; }
function studyOver() { window.status = 'Click here for Study Question'; }
function tryOver() { window.status = 'Click here for Try This!'; }
function backOver() { window.status = 'Go back to previous page'; }
function topOver() { window.status = 'Go to top of page'; }
<!-- -------------Controls mouseOvers for all links-->

<!-- -------------Closes popup windows after mainpage changes-->
function autoclose()
	{
  if (newframes != null && newframes.open) newframes.close();
  if (newdetail != null && newdetail.open) newdetail.close();
  if (newfyi != null && newfyi.open) newfyi.close();
  if (newgeneric != null && newgeneric.open) newgeneric.close();
  if (newglossterm != null && newglossterm.open) newglossterm.close();
  if (newglossnav != null && newglossnav.open) newglossnav.close();
  if (newimage != null && newimage.open) newimage.close();
  if (newmedia != null && newmedia.open) newmedia.close();
  if (newredirect != null && newredirect.open) newredirect.close();
  if (newreview != null && newreview.open) newreview.close();
  if (newstudy != null && newstudy.open) newstudy.close();
  if (newtry != null && newtry.open) newtry.close();
  if (newVideo != null && newVideo.open) newVideo.close();
  else {return null};
	}
<!-- -------------Closes popup windows after mainpage changes-->

<!-- -------------Writes speaker icon with attached sound-->
function attSound(Path)
{
    document.write(
	'&nbsp;<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" ' +
	'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="14" height="14" ' +'id="test2" align="middle">' +
	'<param name="allowScriptAccess" value="sameDomain" />' +
	'<param name="movie" value="glossAudio.swf?audioPath=' + Path + '" />' +
	'<param name="quality" value="high" />' +
	'<param name="bgcolor" value="#ffffff" />' +
	'<embed src="glossAudio.swf?audioPath=' + Path + '" quality="high" bgcolor="#ffffff" width="14" height="14" name="glossAudio" ' +
	'align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" ' +
	'pluginspage="http://www.macromedia.com/go/getflashplayer" />' +
	'</object>&nbsp;');
}
<!-- -------------Writes speaker icon with attached sound-->
