function delNextElement(e){ if(e){ var next = e.nextSibling; var parent = e.parentNode; if(parent){ parent.removeChild(e); } delNextElement(next); } }