/*
 * @category Java Script Module Pattern
 * @version $Rev$
 * @author Joel Bair <joelb@baseltd.biz>
 *
 */

// reference local blank image
Ext.BLANK_IMAGE_URL = '../extjs/resources/images/default/s.gif';

// create namespace
Ext.namespace('utils');

// create application
utils = function() {
    // do NOT access DOM from here; elements don't exist yet

    // private variables


    // private functions

    // public space
    return {
        // public properties, e.g. strings to translate
        // methods and varibles defined in here always preface w/ "this."

        // myvar: "true",

        // public methods
        init: function() {
            return;
        },

        flashMessage: function(title,text) {

            var msgTxt = '<div style="position:absolute;top:25%;text-align:center;font-weight:bold;">';
            msgTxt+=text;
            msgTxt+='</div>';

            var myMsg = new Ext.Window({
                title: 'Complete...',
                id: 'popup-msg',
                layout: 'fit',
                shadow: false,
                width: 200,
                height: 100,
                closable: false,
                resizable: false,
                plain: true,
                hidden: true,
                html: msgTxt
            });
            myMsg.show();
            var pel = Ext.get('popup-msg');
            pel.fadeIn({duration: 1});
            pel.pause(1).ghost('t', {duration: 1, remove:true});
        }
    };

}();
