// A set of JavaScripts for site-wide use. Last update 20070814


// Top-of-page  Applied to item jumps to top of page
//  For use in either or both side margins of a page



// Script from  http://code.google.com/apis/maps/documentation/controls.html




// A TextualZoomControl is a GControl that displays textual "Zoom In"
// and "Zoom Out" buttons (as opposed to the iconic buttons used in
// Google Maps).

// We define the function first
function TextualZoomControl() 
{
}

// To "subclass" the GControl, we set the prototype object to
// an instance of the GControl object

TextualZoomControl.prototype = new GControl();

// Creates a one DIV for each of the buttons and places them in a container
// DIV which is returned as our control element. We add the control to
// to the map container and return the element for the map class to
// position properly.

TextualZoomControl.prototype.initialize = function(map) 
{
Ê var container = document.createElement("div");

Ê var zoomInDiv = document.createElement("div");
Ê this.setButtonStyle_(zoomInDiv);
Ê container.appendChild(zoomInDiv);
Ê zoomInDiv.appendChild(document.createTextNode("Zoom In"));
Ê GEvent.addDomListener(zoomInDiv, "click", function()
	{
Ê Ê map.zoomIn();
	}
	);

Ê var zoomOutDiv = document.createElement("div");
Ê this.setButtonStyle_(zoomOutDiv);
Ê container.appendChild(zoomOutDiv);
Ê zoomOutDiv.appendChild(document.createTextNode("Zoom Out"));
Ê GEvent.addDomListener(zoomOutDiv, "click", function() 
	{
Ê Ê map.zoomOut();
Ê 	}
	);

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


// By default, the control will appear in the top left corner of the
// map with 7 pixels of padding.
TextualZoomControl.prototype.getDefaultPosition = function() 
{
Ê return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));
}

// Sets the proper CSS for the given button element.
TextualZoomControl.prototype.setButtonStyle_ = function(button)
{
Ê button.style.textDecoration = "underline";
Ê button.style.color = "#663300";
Ê button.style.backgroundColor = "#ffdd66";
Ê button.style.font = "small Arial";
Ê button.style.border = "1px solid #663300";
Ê button.style.padding = "2px";
Ê button.style.marginBottom = "3px";
Ê button.style.textAlign = "center";
Ê button.style.width = "6em";
Ê button.style.cursor = "pointer";
}

   function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(37.441944, -122.141944), 13);
        map.addControl(new TextualZoomControl());
      }
    }

// var map = new GMap2(document.getElementById("map"));
// map.addControl(new TextualZoomControl());
// map.setCenter(new GLatLng(37.441944, -122.141944), 13);




// end of G-maps scripts


// map.addControl(new GSmallZoomControl());
// map.addControl(new GSmallMapControl())


