function getFurthestAncestor(node) {
        var root = node;
        while (root.parentNode != null) {
            root = root.parentNode;
        }
        return root;
    }
Returns the furthest ancestor of a Node as defined by DOM Range.