var notify = function(title, format)
{
    if (! notify.msg_ct)
    {
        notify.msg_ct = Ext.DomHelper.insertFirst(document.body, {id:'notify-div'}, true);
    }
    
    notify.msg_ct.alignTo(document, 't-t');
    notify.msg_ct.alignTo(document, 't-t');     // repeat: bugfix for IE
    
    var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1));
    var m = Ext.DomHelper.append(notify.msg_ct, {html: notify.create_box(title, s)}, true);
    
    m.slideIn('t').pause(2).ghost("t", {remove: true});
};


notify.create_box = function(t, s)
{
    return ['<div class="notify">',
            '<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>',
            '<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t, '</h3>', s, '</div></div></div>',
            '<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>',
            '</div>'].join('');
};
