function initTogglers()
{
	// uses protoType javaScript library
	var togglers = document.getElementsByClassName("containerToggler"); //div that toggles
	var toggles = document.getElementsByClassName("hdrToggle"); //headers where I click on

	var openedClass=" opened";
	var closedClass=" closed";
	var anchorTitleOpen = "click to open";
	var anchorTitleClose = "click to close";
	
	if(toggles.length && togglers.length && (toggles.length == togglers.length))
	{
		// close all but the first (position 0)
		for(var i = 0; i < toggles.length; i++)
		{
			toggles[i].className += closedClass;
			togglers[i].className += closedClass;
			togglers[i].isOpen = 0;
			toggles[i].firstChild.setAttribute("title", anchorTitleOpen);
		}
		
		for(var i = 0; i < toggles.length; i++)
		{
			toggles[i].firstChild.NodeNum = i;
			
			toggles[i].firstChild.onclick=function()
			{
							
				if(togglers[this.NodeNum].isOpen)
				{
					togglers[this.NodeNum].className=togglers[this.NodeNum].className.replace(openedClass, closedClass);
					toggles[this.NodeNum].className=toggles[this.NodeNum].className.replace(openedClass, closedClass);
					this.setAttribute("title", anchorTitleOpen);
				}
				
				else
				{
					togglers[this.NodeNum].className=togglers[this.NodeNum].className.replace(closedClass, openedClass);
					toggles[this.NodeNum].className=toggles[this.NodeNum].className.replace(closedClass, openedClass);
					this.setAttribute("title", anchorTitleClose);
				}
				
				// if thinks open, close, otherwise open again.
				togglers[this.NodeNum].isOpen = (togglers[this.NodeNum].isOpen + 1) % 2;
				return false;
  			}
		}
	}
}
addLoadEvent(initTogglers);