
function body_unload() {
    if (window.GUnload) GUnload();
}


/* open/close handlers */

function open_elements(list) {
    $each($splat(list), function(i) {
        i = $(i);
        i.setStyle('display','block');
        i.fade('show');
    });
}
function close_elements(list) {
    $each($splat(list), function(i) {
        i = $(i);
        i.fade('hide');
        i.setStyle('display','none');
    });
}

// stuff generally missing from mootools
function make(e) {
    return document.createElement(e);
}

function tnode(t) {
    return document.createTextNode(t);
}

Element.implement({
    emptyAfter: function(){
        var node = this.nextSibling;
        while(node) {
            var next = node.nextSibling;
            Element.destroy(node);
            node = next;
        }
        return this;
    },
});
