// JavaScript Document
function MapAreaMarkerShowControl(i) {
}
MapAreaMarkerShowControl.prototype = new GControl();
MapAreaMarkerShowControl.prototype.initialize = function(map) {
  var container = document.createElement("div");

  var showArea = document.createElement("span");
  this.setButtonStyle_(showArea);
  container.appendChild(showArea);
  showArea.appendChild(document.createTextNode("show Info in map"));

  GEvent.addDomListener(showArea, "click", function() {
	Element.show('info_container');
    $('map_container').style.width = "64%";
	G_addSpan.style.display = 'inline';
	G_cancelSpan.style.display = 'none';
	$('mapItemList').innerHTML='Loading...';
	//Element.show('largeSpan');
	//Element.hide('mediumSpan');
	WM.getAreaMarks();
  });

  map.getContainer().appendChild(container);
  return container;
}

MapAreaMarkerShowControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(10, 10));
}

MapAreaMarkerShowControl.prototype.setButtonStyle_ = function(button) {
  button.style.textDecoration = "none";
  button.style.color = "#ffffff";
  button.style.backgroundColor = "#eb8c2f";
  button.style.font = "12px Arial";
  button.style.fontWeight="600";
  button.style.border = "1px solid white";
  button.style.padding = "2px";
  button.style.marginBottom = "3px";
  button.style.textAlign = "center";
  button.style.width = "6em";
  button.style.cursor = "pointer";
}
