selectionEnd: function() {
            if (window.getSelection)
                return window.getSelection().getRangeAt(0).endContainer;
            else if (document.selection)
                return document.selection.createRange().endContainer;