__getElementsByTagNameRecursive__ = function (elem, tagname, nodeList) {

    if (elem.nodeType == Node.ELEMENT_NODE || elem.nodeType == Node.DOCUMENT_NODE) {

        if(elem.nodeType !== Node.DOCUMENT_NODE &&
            ((elem.nodeName.toUpperCase() == tagname.toUpperCase()) ||
                (tagname == "*")) ){
            // add matching node to nodeList
            __appendChild__(nodeList, elem);
        }

        // recurse childNodes
        for(var i = 0; i < elem.childNodes.length; i++) {
            nodeList = __getElementsByTagNameRecursive__(elem.childNodes.item(i), tagname, nodeList);
        }
    }

    return nodeList;
}
@method __getElementsByTagNameRecursive__ - implements getElementsByTagName()
@param  elem     : Element  - The element which are checking and then recursing into
@param  tagname  : string      - The name of the tag to match on. The special value "*" matches all tags
@param  nodeList : NodeList - The accumulating list of matching nodes

@return : NodeList