$A(element.childNodes).each(function(node) { element.removeChild(node) }); depth.times(function() { div = div.firstChild }); $A(div.childNodes).each(function(node) { element.appendChild(node) }); 
$A(element.childNodes).each(function(node){ element.removeChild(node) }); depth.times(function(){ div = div.firstChild });  $A(div.childNodes).each( function(node){ element.appendChild(node) }); 
  Element.Methods.update = function(element, html) {    element = $(element);    html = typeof html == 'undefined' ? '' : html.toString();    var tagName = element.tagName.toUpperCase();    if (['THEAD','TBODY','TR','TD'].include(tagName)) {      var div = document.createElement('div');      switch (tagName) {        case 'THEAD':        case 'TBODY':          div.innerHTML = '<table><tbody>' +  html.stripScripts() + '</tbody></table>';          depth = 2;          break;        case 'TR':          div.innerHTML = '<table><tbody><tr>' +  html.stripScripts() + '</tr></tbody></table>';          depth = 3;          break;        case 'TD':          div.innerHTML = '<table><tbody><tr><td>' +  html.stripScripts() + '</td></tr></tbody></table>';          depth = 4;      }      $A(element.childNodes).each(function(node) { element.removeChild(node) });      depth.times(function() { div = div.firstChild });      $A(div.childNodes).each(function(node) { element.appendChild(node) });    } else {      element.innerHTML = html.stripScripts();    }    setTimeout(function() { html.evalScripts() }, 10);    return element;  }
4053	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/4053/99db091466168b09f46c79ff71f0e07c7fd4a8db/prototype.js/clean/lib/prototype.js