function MLoadingControl(B){B=B?B:{};
this.parent=B.container?B.container:null;
this.background=B.background?B.background:"#EEEEEE";
this.foreground=B.foreground?B.foreground:"#000000";
this.position=B.position?B.position:new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(8,30));
this.visible=B.visible?B.visible:false
}MLoadingControl.prototype=new GControl();
MLoadingControl.prototype.initialize=function(H){this.map=H;
this.loading=0;
this.container=document.createElement("div");
var F=document.createElement("table");
F.setAttribute("cellSpacing","0");
F.style.border="1px solid black";
F.style.width="200px";
this.container.appendChild(F);
var G=document.createElement("tr");
F.appendChild(G);
var E=document.createElement("td");
E.innerHTML="Loading ...";
this.setStyle2(E);
G.appendChild(E);
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(B){B.style.padding="2px";
B.style.textAlign="center";
B.style.color=this.foreground;
B.style.backgroundColor=this.background;
B.style.font="bold 16px Verdana"
};