/**
Mask information control
Usage:
1. Reference mask.css
2. Reference mask.js
3. Call method
var obj=new MaskControl();
//Show mask prompt information
obj.show("Displayed prompt information");
//Hide mask prompt information
obj.hide();
//Show prompt information , and automatically close after timeOut (1000 represents 1 second)
obj.autoDelayHide=function(html, timeOut)
*/
function MaskControl(){
this .show=function(html){
var loader=$("#div_maskContainer");
if(loader.length==0){
loader=$("
");
$("body") .append(loader);
}
self.loader=loader;
var w=$(window).width();
var h=$(window).height();
var divMask=$("#div_Mask");
divMask.css("top",0).css("left",0).css("width",w).css("height" ,h);
var tipDiv=$("#div_loading");
if(html==undefined)
html="";
tipDiv.html(html);
loader .show();
var x=(w-tipDiv.width())/2;
var y=(h-tipDiv.height())/2;
tipDiv.css("left ",x);
tipDiv.css("top",y);
},
this.hide=function(){
var loader=$("#div_maskContainer");
if(loader.length==0) return ;
loader.remove();
},
this.autoDelayHide=function(html,timeOut){
var loader=$(" #div_maskContainer");
if(loader.length==0) {
this.show(html);
}
else{
var tipDiv=$("#div_loading") ;
tipDiv.html(html);
}
if(timeOut==undefined) timeOut=3000;
window.setTimeout(this.hide,timeOut);
}
}