rem: if (toBeInserted.nodeType == 11) selnode = selnode.lastChild; 
context: HTMLArea.prototype.insertNodeAtSelection = function(toBeInserted) {	this.focusEditor();	var sel = this._getSelection(),		range = this._createRange(sel),		node = range.startContainer,		pos = range.startOffset,		selnode = toBeInserted;	this.emptySelection(sel);	range.deleteContents();	switch (node.nodeType) {	    case 3: // Node.TEXT_NODE: we have to split it at the caret position.		if(toBeInserted.nodeType == 3) {			node.insertData(pos,toBeInserted.data);			range = this._createRange();			range.setEnd(node, pos + toBeInserted.length);			range.setStart(node, pos + toBeInserted.length);			this.addRangeToSelection(sel, range);		} else {			node = node.splitText(pos);			if (toBeInserted.nodeType == 11) selnode = selnode.lastChild;			node = node.parentNode.insertBefore(toBeInserted, node);			this.selectNode(selnode, false);			this.updateToolbar();		}		break;	    case 1:		if (toBeInserted.nodeType == 11) selnode = selnode.lastChild;		node = node.insertBefore(toBeInserted, node.childNodes[pos]);		this.selectNode(selnode, false);		this.updateToolbar();		break;	}};
meta: 9100	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/9100/4bcff78764dcdcc39dcb903f0af84e382c4f87a7/htmlarea-gecko.js/buggy/typo3/sysext/rtehtmlarea/htmlarea/htmlarea-gecko.js