﻿function TreeViewToggleNode(node) { 
	var children = node;
	while (children.nodeName.toUpperCase() != "TABLE") 	
		{children = children.parentNode;}
	while (children.nodeName.toUpperCase() != "DIV")   	
		{children = children.nextSibling;}
	try {
	var img = node.childNodes[0];
	while ((typeof(img) != "undefined") && (img != null) && (img.nodeName.toUpperCase() != "IMG"))
		{img = img.nextSibling;}
	} catch(e) {};
	
    try {
        if (children.style.display == "none") {
            //children.style.display = "block";
            $(children).slideDown('fast');
            if ((typeof(img) != "undefined") && (img != null)) {
            	img.src = "images/ArrowDown.gif";
            }
        }
        else {
            //children.style.display = "none";
            $(children).slideUp('fast');
            if ((typeof(img) != "undefined") && (img != null)) {
            	img.src = "images/ArrowRight.gif";
            }
        }
    }
	catch(e) {}
}
