function TextualZoomControl() { }

TextualZoomControl.prototype = new GControl();

TextualZoomControl.prototype.initialize = function(map) 
{
  var container = document.createElement("div");
  
  var zoomInDiv = document.createElement("div");
  this.setButtonStyle_(zoomInDiv);
  container.appendChild(zoomInDiv);
  var butt = document.createElement('button');
  butt.style.width = "100px";
  butt.style.height = "30px";
  var buttext = document.createTextNode('Zoom In');
  butt.appendChild(buttext);
  zoomInDiv.appendChild(butt);
  GEvent.addDomListener(zoomInDiv, "click", function() {
    map.zoomIn();
  });
  
  
  var zoomOutDiv = document.createElement("div");
  this.setButtonStyle_(zoomOutDiv);
  container.appendChild(zoomOutDiv);
  var butt = document.createElement('button');
  butt.style.width = "100px";
  butt.style.height = "30px";
  var buttext = document.createTextNode('Zoom Out');
  butt.appendChild(buttext);
  zoomOutDiv.appendChild(butt);
  GEvent.addDomListener(zoomOutDiv, "click", function() {
    map.zoomOut();
  });
  

  map.getContainer().appendChild(container);
  return container;
}

TextualZoomControl.prototype.getDefaultPosition = function() {
  return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));
}

TextualZoomControl.prototype.setButtonStyle_ = function(button) {
  button.style.font = "small Arial";
  button.style.padding = "1px";
  button.style.marginTop = "10px";
  button.style.marginBottom = "3px";
  button.style.textAlign = "center";
  button.style.cursor = "pointer";
  button.style.width = "120px";
}


// Create a base icon for all of our markers 
var baseIcon = new GIcon();
baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
baseIcon.iconSize = new GSize(20, 34);
baseIcon.shadowSize = new GSize(37, 34);
baseIcon.iconAnchor = new GPoint(9, 34);
baseIcon.infoWindowAnchor = new GPoint(9, 2);
baseIcon.infoShadowAnchor = new GPoint(18, 25);


function openMapWindow(marker, htmlText) 
{
    marker.openInfoWindowHtml(htmlText);    
}

function createMarker(point, icon, htmlText, markerTitle) 
{
    var marker = new GMarker(point, {icon:icon, title:markerTitle});
    
    GEvent.addListener(marker, "click", function() {
        marker.openInfoWindowHtml(htmlText);
    });
    
    return marker;
}

function numberedMarker(point, docRoot, number, markerTitle) 
{
    var icon = new GIcon(baseIcon);
    icon.image = docRoot + "numbered/" + number + ".png";
    var marker = new GMarker(point, {icon:icon, title:markerTitle});
    return marker;
}

function addTipsMessage() 
{
    var pos = new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(15, 15));
    pos.apply(document.getElementById("tips"));
    document.getElementById("map").appendChild(document.getElementById("tips")); 
}