﻿function BeforeClickHandler(node)
{
    if (node.Expanded == false) {
        node.Expand();
    }
    else
    {
        node.Collapse();
    }
}