    //<![CDATA[

	function levels() {
	}
	levels.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.
	levels.prototype.initialize = function(map) {
	  var container = document.createElement("div");

	  var streetDiv = document.createElement("div");
	  this.setButtonStyle_(streetDiv);
	  container.appendChild(streetDiv);
	  streetDiv.appendChild(document.createTextNode("Street"));
	  GEvent.addDomListener(streetDiv, "click", function() {
        map.setCenter(new GLatLng(53.957109,-1.082726), 16);
		map.closeInfoWindow();
	  });
//sll=53.957702,-1.082285&sspn=0.092922,0.32135&ie=UTF8&ll=53.957449,-1.082411&spn=0.011615,0.040169&z=15&iwloc=addr&om=1
	  var localDiv = document.createElement("div");
	  this.setButtonStyle_(localDiv);
	  container.appendChild(localDiv);
	  localDiv.appendChild(document.createTextNode("Local"));
	  GEvent.addDomListener(localDiv, "click", function() {
        map.setCenter(new GLatLng(53.957109,-1.082726), 15);
		map.closeInfoWindow();
	  });

	  var cityDiv = document.createElement("div");
	  this.setButtonStyle_(cityDiv);
	  container.appendChild(cityDiv);
	  cityDiv.appendChild(document.createTextNode("City"));
	  GEvent.addDomListener(cityDiv, "click", function() {
        map.setCenter(new GLatLng(53.957109,-1.082726), 12);
		map.closeInfoWindow();
	  });

	  var regionDiv = document.createElement("div");
	  this.setButtonStyle_(regionDiv);
	  container.appendChild(regionDiv);
	  regionDiv.appendChild(document.createTextNode("Region"));
	  GEvent.addDomListener(regionDiv, "click", function() {
        map.setCenter(new GLatLng(53.957109,-1.082726), 8);
		map.closeInfoWindow();
	  });

	  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.
	levels.prototype.getDefaultPosition = function() {
	  return new GControlPosition(G_ANCHOR_TOP_RIGHT, new GSize(12, 12));
	}

	// Sets the proper CSS for the given button element.
	levels.prototype.setButtonStyle_ = function(button) {
	  button.style.textDecoration = "underline";
	  button.style.color = "#002674";
	  button.style.backgroundColor = "white";
	  button.style.font = "1em Arial";
	  button.style.border = "1px solid black";
	  button.style.padding = "2px";
	  button.style.marginBottom = "3px";
	  button.style.textAlign = "center";
	  button.style.width = "6em";
	  button.style.cursor = "pointer";
	}


    function load(mapID) {
      if (GBrowserIsCompatible()) {
		var mapObj = document.getElementById(mapID);
        var map = new GMap2(mapObj);
		  map.addControl(new GSmallMapControl());
        map.setCenter(new GLatLng(53.95684,-1.080394), 15);

/*

		GMap2.prototype.wheelZoom = function(event)
		{ if(event.cancelable) event.preventDefault(); map.closeInfoWindow(); 
		if((event.detail || -event.wheelDelta) < 0) {map.zoomIn();} else {map.zoomOut();} return false; }
		GEvent.addDomListener(mapObj, "DOMMouseScroll", map.wheelZoom);
		GEvent.addDomListener(mapObj, "mousewheel", map.wheelZoom);

*/
		// Create our "tiny" marker icon
		var locationicon = new GIcon();
		locationicon.image = "http://"+window.location.hostname+"/_lib/_images/_structure/mapmarker.png";
		locationicon.iconSize = new GSize(162, 65);
		locationicon.iconAnchor = new GPoint(138, 0);
		locationicon.infoWindowAnchor = new GPoint(138, 0);
//http://maps.google.co.uk/maps?hl=en&q=YO1+9WP&ie=UTF8&ll=53.957109,-1.082726&spn=0.003087,0.010042&z=17&om=1
		var theloc = new GMarker(new GLatLng(53.95684,-1.080394),locationicon);
		GEvent.addListener(theloc, "click", function() {
			theloc.openInfoWindowHtml("<div style=\"width: 210px; background: #ffffff;\"><h2 style=\"font-size: 1.3em; font-weight: bold;\">Get Directions</h2><p>Simply enter your postcode...</p><form style=\"margin: 0 0 0px 0;padding: 0;\" method=\"POST\" target=\"_blank\" onsubmit=\"this.action = 'http://maps.google.co.uk/maps?f=d&hl=en&saddr='+this.postcode.value+'&daddr=53.956479,-1.080053&om=1';return true;\"><p style=\"margin: 0;\"><input type=\"text\" name=\"postcode\"> <input type=\"submit\" value=\"Go\"></p></form></div>");
		});
		GEvent.addListener(theloc, "infowindowclose", function(){
		  map.panTo(new GLatLng(53.955109,-1.080126));
		})
		map.addOverlay(theloc);
		map.addControl(new levels());
	  }
	}

    //]]>
