__insertBefore__ = function(nodelist, newChild, refChildIndex) {
    if ((refChildIndex >= 0) && (refChildIndex <= nodelist.length)) {
        // bounds check
        if (newChild.nodeType == Node.DOCUMENT_FRAGMENT_NODE) {
            // node is a DocumentFragment
            // append the children of DocumentFragment
            Array.prototype.splice.apply(nodelist,
                [refChildIndex, 0].concat(newChild.childNodes.toArray()));
        }
        else {
            // append the newChild
            Array.prototype.splice.apply(nodelist,[refChildIndex, 0, newChild]);
        }
    }
}
@method __insertBefore__
     insert the specified Node into the NodeList before the specified index
     Used by Node.insertBefore(). Note: Node.insertBefore() is responsible
     for Node Pointer surgery __insertBefore__ simply modifies the internal
     data structure (Array).
@param  newChild      : Node - the Node to be inserted
@param  refChildIndex : int     - the array index to insert the Node before