public/javascripts/yui/treeview/treeview.js
function(parentNode) {
        if (parentNode && parentNode.children) {
            for (var i=0, len=parentNode.children.length; i<len ; ++i) {
                if (parentNode.children[i] === this) {
                    return i;
                }
            }
        }

        return -1;
    }
function(parentNode) {
        if (parentNode && parentNode.children) {
            for (var i=0, len=parentNode.children.length; i<len ; ++i) {
                if (parentNode.children[i] === this) {
                    return i;
                }
            }
        }

        return -1;
    }
function ( parentNode ) { if ( parentNode && parentNode . children ) { for ( var i = 0 , len = parentNode . children . length ; i < len ; ++ i ) { if ( parentNode . children [ i ] === this ) { return i ; } } } return - 1 ; }
Returns true if the Node is a child of supplied Node
@method isChildOf
@param parentNode {Node} the Node to check
@return {boolean} The node index if this Node is a child of
supplied Node, else -1.
@private
Returns true if the Node is a child of supplied Node