public/javascripts/yui/dragdrop/dragdrop-debug.js
function(n1, n2) {
            if (n1.swapNode) {
                n1.swapNode(n2);
            } else {
                var p = n2.parentNode;
                var s = n2.nextSibling;

                if (s == n1) {
                    p.insertBefore(n1, n2);
                } else if (n2 == n1.nextSibling) {
                    p.insertBefore(n2, n1);
                } else {
                    n1.parentNode.replaceChild(n2, n1);
                    p.insertBefore(n1, s);
                }
            }
        }
function(n1, n2) {
            if (n1.swapNode) {
                n1.swapNode(n2);
            } else {
                var p = n2.parentNode;
                var s = n2.nextSibling;

                if (s == n1) {
                    p.insertBefore(n1, n2);
                } else if (n2 == n1.nextSibling) {
                    p.insertBefore(n2, n1);
                } else {
                    n1.parentNode.replaceChild(n2, n1);
                    p.insertBefore(n1, s);
                }
            }
        }
function ( n1 , n2 ) { if ( n1 . swapNode ) { n1 . swapNode ( n2 ) ; } else { var p = n2 . parentNode ; var s = n2 . nextSibling ; if ( s == n1 ) { p . insertBefore ( n1 , n2 ) ; } else if ( n2 == n1 . nextSibling ) { p . insertBefore ( n2 , n1 ) ; } else { n1 . parentNode . replaceChild ( n2 , n1 ) ; p . insertBefore ( n1 , s ) ; } } }
Swap two nodes.  In IE, we use the native method, for others we
emulate the IE behavior
@method swapNode
@param n1 the first node to swap
@param n2 the other node to swap
@static
Swap two nodes . In IE we use the native method for others we emulate the IE behavior