
	// 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'; }


	// tracking for delayed menu close actions
	close_timer = null;
	open_topID = null;


	// 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)
	{
		// clear out any existing menus to be closed
		if (close_timer)
		{
			clearTimeout(close_timer);
			close_timer = null;
			if (open_topID != topID) { hideTopartMenu_do(open_topID); }
		}

		// mark this menu as open
		open_topID = topID;

		// switch OPEN the on/off divs
		getByID('topartmenu_'+topID+'_on').style.display = 'block';
		getByID('topartmenu_'+topID+'_off').style.display = 'none';
	}

	// closes a rollover drop down menu - WITH DELAY!
	//  the delay looks nice and adapts for an IE "feature"
	//  of closing the top menu when returning from a sidemenu
	function hideTopartMenu(evnt,base,topID)
	{
		if (isInMenu(evnt,base)) { return; }
		close_timer = setTimeout('hideTopartMenu_do('+topID+')', 500);
	}
	function hideTopartMenu_do(topID)
	{
		// switch CLOSED the on/off divs
		getByID('topartmenu_'+topID+'_off').style.display = 'block';
		getByID('topartmenu_'+topID+'_on').style.display = 'none';

		// mark this menu as no longer open
		open_topID = null;
		close_timer = null;
	}



	// open the product drop down menu
	function showProductMenu(evnt,base)
	{
		getByID('productmenu_on').style.display = 'block';
		getByID('productmenu_off').style.display = 'none';
	}

	// close the product drop down menu
	function hideProductMenu(evnt,base)
	{
		if (isInMenu(evnt,base)) { return; }

		getByID('productmenu_off').style.display = 'block';
		getByID('productmenu_on').style.display = 'none';
	}

