// ---------------------------------------------
// --- Name:    Easy DHTML Treeview           --
// --- Author:  D.D. de Kerf                  --
// --- Version: 0.1           Date: 6-6-2001  --
// ---------------------------------------------
function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}


function Toggle(node)
{
	// Unfold the branch if it isn't visible
        var c = node.children ? node.children : node;
	if (node.nextSibling.style.display == 'none')
	{
		// Change the image (if there is an image)
		if (c.length > 0)
		{
			if (c.item(0).tagName == "IMG")
			{
				c.item(0).src = "../images/minus.gif";

			}
		}

		node.nextSibling.style.display = '';
	}
	// Collapse the branch if it IS visible
	else
	{
		// Change the image (if there is an image)
		if (c.length > 0)
		{
			if (c.item(0).tagName == "IMG")
			{
				c.item(0).src = "../images/plus.gif";
			}
		}

		node.nextSibling.style.display = 'none';
	}

}
