﻿  function MessageOverlayControl() {}
    MessageOverlayControl.prototype = new GControl();

    MessageOverlayControl.prototype.initialize = function(map) {
      var container = document.createElement("div");

      var msgDiv = document.createElement("div");
      this.setBoxStyle_(msgDiv);
      container.appendChild(msgDiv);
      msgDiv.appendChild(document.createTextNode("Loading..."));
      map.getContainer().appendChild(container);
      return container;
    }

    MessageOverlayControl.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));
    }

    // Sets the proper CSS for the given button element.
    MessageOverlayControl.prototype.setBoxStyle_ = function(msgBox) {
  		msgBox.id = "mapMsgBox";
		  msgBox.style.marginTop = "250px";
		  msgBox.style.marginLeft = "140px";
		  msgBox.style.width = "200px";
		  msgBox.style.border = "2px solid black";
		  msgBox.style.color = "Black";
		  msgBox.style.backgroundColor = "White";
		  msgBox.style.fontFamily = "Arial";
		  msgBox.style.fontSize = "10pt";
		  msgBox.style.textAlign = "center";
  		msgBox.style.display = "none";
    }
