function toggleSubmenu(targetElement)
{
	var intCounter = 0;
	var intMaxMunuItems = 50;

	while (1>0)
	{
		intCounter += 1
		var objElement = document.getElementById(targetElement+"_"+intCounter)		
		
		if (objElement)
		{
			if (objElement.style.display == 'block')
			{
				objElement.style.display = 'none';
			}else{
				objElement.style.display = 'block';	
			}
		}else{
			if(intCounter == intMaxMunuItems)
				break;
		}
	}
}

/**
* A common library of functions used in various javascript libraries that I've
* written.
*
* @author Toby Miller <tmiller@tobymiller.com>
* @copyright Copyright (C) 2005, Toby Miller
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
*/

/*
* DO NOT EDIT BELOW THIS LINE
*/

/**
* add an event to an element
*
* @param object dom element to add event to
* @param string w3c-standard event name being handled
* @param object w3c-standard event object or simulated function
* @param boolean [optional] whether to truly process the onload event or not (default = false)
* @return void
*/
function addEvent(element, eventName, eventObject)
{
    if (element.addEventListener)
    {
        // this is a w3c-compliant browser, just wrap existing functions
        element.addEventListener(eventName, eventObject, false);
    }
    else if (element.attachEvent)
    {
        // collect optional parameters
        var processOnload = (arguments.length == 4) ? arguments[3] : false;

        if ((element == window) && (eventName == 'load') && (!processOnload))
        {
            // store this event, we'll do it in order with the other onloads
            addEvent._onloads.push(eventObject);
        }
        else
        {
            // add the new event
            element.attachEvent('on' + eventName, eventObject);
        }
    }
    return(true);
}
addEvent._onloads = [];
addEvent(window, 'load', function(){for(var i = 0; i < addEvent._onloads.length; i++){addEvent._onloads[i]();}}, true);
