function findIndex(name, element) {
				var count = 0;

				Tools.each(dom.select(name), function(node) {
					if (node.getAttribute('data-mce-bogus') === 'all') {
						return;
					}

					if (node == element) {
						return false;
					}

					count++;
				});

				return count;
			}
Returns a bookmark location for the current selection. This bookmark object
can then be used to restore the selection after some content modification to the document.

@method getBookmark
@param {Number} type Optional state if the bookmark should be simple or not. Default is complex.
@param {Boolean} normalized Optional state that enables you to get a position that it would be after normalization.
@return {Object} Bookmark object, use moveToBookmark with this object to restore the selection.
@example
// Stores a bookmark of the current selection
var bm = tinymce.activeEditor.selection.getBookmark();

tinymce.activeEditor.setContent(tinymce.activeEditor.getContent() + 'Some new content');

// Restore the selection bookmark
tinymce.activeEditor.selection.moveToBookmark(bm);