var defPopMsgCss = { 
        padding:        0, 
        margin:         0, 
        width:          '50%', 
        top:            '40%', 
        left:           '25%', 
        textAlign:      'center', 
        color:          '#000', 
        border:         'none', 
        backgroundColor:'#fff', 
        cursor:         'wait' 
    };

var defPopMsgOverlayCss = { 
        backgroundColor: '#000', 
        opacity:         0.6 
    };
    
var popMsgCss;
var popMsgOverlayCss;
var popMsgView = '<div class="popMsgUI"><h2 id="msg"></h2></div>';

function uiShowBlockMsg(msg, styles, timeout) {
	var msgView = $(popMsgView);
	msgView.find("#msg").text(msg);
	var arg = {message : msgView,
		overlayCSS:  ((popMsgOverlayCss == undefined)? defPopMsgOverlayCss : popMsgOverlayCss)
		};
	if(styles != undefined && styles != null) {
		arg.css = styles;
	} else {
		arg.css = ((popMsgCss == undefined)? defPopMsgCss : popMsgCss);
}
	if(timeout != undefined && timeout != null) {
		arg.timeout = timeout;
	}
	$.blockUI(arg);
}

function uiDismissBlockMsg() {
	$.unblockUI();
}
