function insertAfter( parentNode, newNode, refNode ){ refNode = refNode && refNode.nextSibling; parentNode.insertBefore( newNode, refNode ); }