
if (!document.getElementById)
    document.getElementById = function() { return null; }


function iamhere() {

	var id_list = new Array("introduction", "shoot_structure1","vascular_ground_tissues", "plants_extreme", "shoot_structure2", "primary_roots", "secondary_growth", "anatomy_project", "requirements", "browser_install", "quicktime_install", "flash_install", "acrobat_install", "faq");

  	var url= String(window.location);	
  	for(var i=0; i < id_list.length; i++)
  	{
    	var id = id_list[i];	
		var search_url = url.match(id);	
	if ((search_url == id))
    		{
				var getNode = document.getElementById(search_url);
					getNode.parentNode.className = "current";			
			}
	
	}

}


function initializeMenu(menuId, actuatorId) {
    var menu = document.getElementById(menuId);
    var actuator = document.getElementById(actuatorId);

    if (menu == null || actuator == null) return;

    actuator.onclick = function() {
        var display = menu.style.display;
        menu.style.display = (display == "none") ? "block" : "none";

        return false;
    }
}

<!-- BEGIN SCRIPT THAT OPENS A NEW WINDOW //-->
//http://www.htmlcodetutorial.com/linking/linking_famsupp_71.html
//This script takes the href from the link in the html page and opens a new window of fixed size.
function keyWin(mylink)
{
windowname="Key";
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
preview1=window.open(href, windowname, 'width=300,height=200,scrollbars=yes,resizable=yes,status=yes,screenX=10,screenY=10');
preview1.focus();
return false;
// Return false is necessary so that the link only opens in the new window and not the main page.
/* The format for calling this function in the html page is:
<a href="http://www.sample/sample.html" onclick="return GlossaryWin(this)">link text or image here</a>
'this' in the onClick event references the href. */
}
//-->


window.onload=function(){	
	initializeMenu("instruct_text", "switch_onoff");
	iamhere();

	// add other functions here.
}
