public/javascripts/yui/treeview/treeview.js
function(el) {

        var p=el, m, re=/ygtv([^\d]*)(.*)/;

        do {

            if (p && p.id) {
                m = p.id.match(re);
                if (m && m[2]) {
                    return this.getNodeByIndex(m[2]);
                }
            }

            p = p.parentNode;

            if (!p || !p.tagName) {
                break;
            }

        } 
        while (p.id !== this.id && p.tagName.toLowerCase() !== "body");

        return null;
    }
function(el) {

        var p=el, m, re=/ygtv([^\d]*)(.*)/;

        do {

            if (p && p.id) {
                m = p.id.match(re);
                if (m && m[2]) {
                    return this.getNodeByIndex(m[2]);
                }
            }

            p = p.parentNode;

            if (!p || !p.tagName) {
                break;
            }

        } 
        while (p.id !== this.id && p.tagName.toLowerCase() !== "body");

        return null;
    }
function ( el ) { var p = el , m , re = / ygtv([^\d]*)(.*) / ; do { if ( p && p . id ) { m = p . id . match ( re ) ; if ( m && m [ 2 ] ) { return this . getNodeByIndex ( m [ 2 ] ) ; } } p = p . parentNode ; if ( ! p || ! p . tagName ) { break ; } } while ( p . id !== this . id && p . tagName . toLowerCase ( ) !== "body" ) ; return null ; }
Returns the treeview node reference for an ancestor element
of the node, or null if it is not contained within any node
in this tree.
@method getNodeByElement
@param el {HTMLElement} the element to test
@return {YAHOO.widget.Node} a node reference or null
Returns the treeview node reference for an ancestor element of the node or null if it is not contained within any node in this tree .