function MLoadingControl(A){A=A?A:{};
this.parent=A.container?A.container:null;
this.background=A.background?A.background:"#EEEEEE";
this.foreground=A.foreground?A.foreground:"#000000";
this.position=A.position?A.position:new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(8,30));
this.visible=A.visible?A.visible:false
}MLoadingControl.prototype=new GControl();
MLoadingControl.prototype.initialize=function(B){this.map=B;
this.loading=0;
this.container=document.createElement("div");
var D=document.createElement("table");
D.setAttribute("cellSpacing","0");
D.style.border="1px solid black";
D.style.width="200px";
this.container.appendChild(D);
var C=document.createElement("tr");
D.appendChild(C);
var A=document.createElement("td");
A.innerHTML="Loading ...";
this.setStyle2(A);
C.appendChild(A);
if(this.parent){this.parent.appendChild(container)
}else{this.map.getContainer().appendChild(this.container)
}if(!this.visible){this.container.style.display="none"
}this.container.innerHTML+="&nbsp;";
return this.container
};
MLoadingControl.prototype.getDefaultPosition=function(){return this.position
};
MLoadingControl.prototype.show=function(){this.loading++;
this.container.style.display=""
};
MLoadingControl.prototype.hide=function(){this.loading--;
if(this.loading<=0){this.container.style.display="none";
this.loading=0
}};
MLoadingControl.prototype.isVisible=function(){return this.mapClick
};
MLoadingControl.prototype.setStyle2=function(A){A.style.padding="2px";
A.style.textAlign="center";
A.style.color=this.foreground;
A.style.backgroundColor=this.background;
A.style.font="bold 16px Verdana"
};
