rem: Element.Methods.insert = function(element, insertions) { element = $(element);  if (Object.isString(insertions) || Object.isNumber(insertions) || Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML))) insertions = { bottom: insertions };  var t = Element._insertionTranslations, content, position, pos, tagName;  for (position in insertions) { content  = insertions[position]; position = position.toLowerCase(); pos      = t[position];  if (content && content.toElement) content = content.toElement(); if (Object.isElement(content)) { pos.insert(element, content); continue; }  content = Object.toHTML(content); tagName = ((position == 'before' || position == 'after') ? element.parentNode : element).tagName.toUpperCase();  if (t.tags[tagName]) { var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts()); if (position == 'top' || position == 'after') fragments.reverse(); fragments.each(pos.insert.curry(element)); } else element.insertAdjacentHTML(pos.adjacency, content.stripScripts());  content.evalScripts.bind(content).defer(); }  return element; }; 
add: insert: function(element, node) { element.insertBefore(node, element.firstChild); }, 
context:   Element.Methods.insert = function(element, insertions) {    element = $(element);    if (Object.isString(insertions) || Object.isNumber(insertions) ||        Object.isElement(insertions) || (insertions && (insertions.toElement || insertions.toHTML)))          insertions = { bottom: insertions };        var t = Element._insertionTranslations, content, position, pos, tagName;        for (position in insertions) {      content  = insertions[position];      position = position.toLowerCase();      pos      = t[position];      if (content && content.toElement) content = content.toElement();      if (Object.isElement(content)) {        pos.insert(element, content);        continue;      }           content = Object.toHTML(content);      tagName = ((position == 'before' || position == 'after')        ? element.parentNode : element).tagName.toUpperCase();           if (t.tags[tagName]) {        var fragments = Element._getContentFromAnonymousElement(tagName, content.stripScripts());        if (position == 'top' || position == 'after') fragments.reverse();        fragments.each(pos.insert.curry(element));      }      else element.insertAdjacentHTML(pos.adjacency, content.stripScripts());            content.evalScripts.bind(content).defer();    }        return element;  };
meta: 3332	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3332/5f76c255a1142feb4deee06d19994fc63210567f/dom.js/clean/src/dom.js