
	// track what major features we have access to (equiv to browser testing)
	var ie4 = (document.all ? true : false);
	var ns4 = (document.layers ? true : false);
	var w3c = (document.getElementById ? true : false);

	// shortcut function to get object using appropriate browser feature
	function getByID(id)
	{
		if (w3c) { return document.getElementById(id); }
		else if (ie4) { return document.all[id]; }
		else if (ns4) { return document.layers[id]; }
		return null;
	}

	// basic image rollover functions
	function imgOn(name) { document[name].src = 'pictures/'+name+'2.gif'; }
	function imgOff(name) { document[name].src = 'pictures/'+name+'.gif'; }


	// positions sidemenus == sub-topic menus
	//  these are recursive with sub-sub-topics and articles, etc
	// have to do this with every mouseover (would prefer just once)
	//  because the parent ul must be _open_ to get the right offsetWidth
	//  so it would be REALLY ugly to get and save that width any other way
	function placeSideMenu(topID,tID)
	{
		obj = getByID("topartmenu_"+topID+"_"+tID);
		obj2 = getByID("topartmenu_"+topID+"_list");

		obj.style.left=obj2.offsetWidth-2;
		obj.style.top=0-1;
	}


	// checks to see if we have actually left a menu for onMouseOut
	//  got inspiration from:
	// http://www.quirksmode.org/js/events_mouse.html#mouseover
	function isInMenu(e,b)
	{
		p = e.relatedTarget;
		if (!p) { p = e.toElement; }

		while (p)
		{
			if (p == b) { return true; }
			p = p.parentNode;
		}

		return false;
	}


	// opens a rollover drop down menu
	function showTopartMenu(evnt,base,topID)
	{
		getByID('topartmenu_'+topID+'_on').style.display = 'block';
		getByID('topartmenu_'+topID+'_off').style.display = 'none';
	}

	// closes a rollover drop down menu
	//  NOTE: IE triggers this when moving BACK from
	//  sidemenus and the dropmenu (it'll open new ones
	//  but closes them when moving into parents)
	//  I believe this can be fixed but that it would be ugly
	//  so for now...  I'll leave it alone.
	// This only means that in IE you have to reopen
	//  the dropmenu in order to ENTER other sidemenus
	//  (you can open and close the sidemenus all you want
	//  while in the dropmenu -- but if you go into one,
	//  coming back will close everything)
	function hideTopartMenu(evnt,base,topID)
	{
		if (isInMenu(evnt,base)) { return; }

		getByID('topartmenu_'+topID+'_off').style.display = 'block';
		getByID('topartmenu_'+topID+'_on').style.display = 'none';
	}
