fMap.prototype.map = null;
fMap.prototype.geocoder = null;
fMap.prototype.zoomLevel = 13;
fMap.prototype.Events = new Array();
fMap.prototype.OnCenter = function(){};
fMap.prototype.currentPoint = null;

function fMap(mapElement)
{	
	this.map = new GMap2(mapElement);
	this.map.enableScrollWheelZoom();
};

fMap.prototype.SetCenter = function(lat, lng)
{
	this.map.setCenter(new GLatLng(lat, lng), this.zoomLevel);
}

fMap.prototype.CenterOnAddress = function(address, displayMarker)
{
	if (this.geocoder) 
	{
		var canvas = this;
		this.geocoder.getLatLng(address, function(point) 
		{
			if (!point) 
			{
				alert(address + " not found");
			}
			else
			{				
				canvas.map.setCenter(point, canvas.zoomLevel);
				canvas.currentPoint = point;
				canvas.OnCenter();
				if(arguments.length>1 && arguments[1] == true)
				{
					var marker = new GMarker(point);
					canvas.map.addOverlay(marker);
					marker.openInfoWindowHtml(address);
				}
			}
		});						
	}
}