if (typeof LookCorp == 'undefined') var LookCorp = {}; // Make sure the base namespace exists.

LookCorp.ModalUpdateProgress = {

    showPopup : function() {
    
        // Setup blockUI
        $.extend($.blockUI.defaults.css, {
            top: '60%', left:'50%', width:'20em',
            'margin-left':'-15em'
        });
        $.blockUI.defaults.overlayCSS.opacity = '0.1';
        
        try {
            $.blockUI({message : 
            '<div class="loadingModal"><img alt="(Loading Icon)" src="images/workingBar.gif"/><br />&nbsp;&nbsp;Searching, please wait...</div>'   // $id('modalUpdateProgress')
            });
        } catch (e) {
            // IE sometimes errors when blockUI tries to focus on an element that is hidden
            // eg. after the search has already been saved
            // Note: this try/catch doesn't seem to save it. Not sure it is catchable at all.
        }
    },
    
    cancel : function() {
        $.unblockUI(); // hides popup
    }
};

