function drawCircle(map,lat,lon,radius) { 
      var cColor = "#FF0000";
      var cWidth = 4;
      var r2d = 180/Math.PI; 
      var Clat = (radius/68.703);   
      var Clon = radius/(69.172 * Math.cos(lat * (Math.PI / 180)))
   //   alert("lat: "+ Clat +" lon: "+ Clon);
	  var cPoints = []; 
	  for (var i=0; i < 105; i++) { 
		     var theta = Math.PI * (i/50); 
			 Cx = lat + (Clat * Math.cos(theta)); 
			 Cy = lon + (Clon * Math.sin(theta)); 
			 var P = new GLatLng(Cx,Cy);
			 cPoints.push(P); 
	  }; 
    map.addOverlay(new GPolyline(cPoints,cColor,cWidth));
	}
		
GMap2.prototype.boxMap = function(center, span) {
	var spec = this.spec;
	var zoom = spec.getLowestZoomLevel(center, span, this.viewSize);
	this.setCenter(new GLatLng(center.x, center.y), zoom);
}

GMap2.prototype.zoomToMarkers = function(minX, maxX, minY, maxY, slopPercentage, heightOffsetPct) {
		var center = new GLatLng((minX + maxX) / 2, (minY + maxY) / 2)
		span = new GSize(Math.abs(maxX - minX), Math.abs(maxY - minY));
		slopWid = 0;
		slopHgt = 0;
		
		slopPercentage = 10;
		
		if (typeof slopPercentage != "undefined")
		{
			slopWid = span.width * slopPercentage / 200;
			slopHgt = span.height * slopPercentage / 200;
			span.width  *= 1 + slopPercentage / 100;
			span.height *= 1 + slopPercentage / 100;
		}
		deltaHgt = 0;
		if (typeof heightOffsetPct != "undefined")
		{
			deltaHgt = span.height * heightOffsetPct / 100;
			center = new GLatLng(center.lat() + deltaHgt, center.lng());
		}
		// needs slop
		var bounds = new GLatLngBounds(new GLatLng(minX-slopHgt, minY-slopWid), new GLatLng(maxX+slopHgt, maxY+slopWid)); // sw, ne
		var zoom = this.getBoundsZoomLevel(bounds, span);
		//var center = bounds.getCenter();
		//alert(minX-slopHgt+","+ minX);
		this.setCenter(center, zoom);
		//alert("TEST");
}
	
function createMarkerWithInfo(point, html) {
  var marker = new GMarker(point);
  var html = html;
  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(html);
  });

  return marker;
}


/*
GMap.prototype.boxMap = function(center, span) {
	var spec = this.spec;
	var zoom = spec.getLowestZoomLevel(center, span, this.viewSize);
	this.centerAndZoom(new GPoint(center.x, center.y), zoom);
}

GMap.prototype.zoomToMarkers = function(minX, maxX, minY, maxY, slopPercentage) {
		thePoint = new GPoint((minX + maxX) / 2, (minY + maxY) / 2);
		span = new GSize(Math.abs(maxX - minX), Math.abs(maxY - minY));
		if (typeof slopPercentage != "undefined")
		{
			span.width  *= 1 + slopPercentage / 100;
			span.height *= 1 + slopPercentage / 100;
		}
		this.boxMap(thePoint, span);
}

function createMarkerWithInfo(point, html) {
  var marker = new GMarker(point);

  // Show this marker's index in the info window when it is clicked
  var html = html;
  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(html);
  });

  return marker;
}

*/
