function BBEntry() {
	this.title = "";
	this.street = "";
	this.zip = "";
	this.city = "";
	this.phone = "";
	this.fax = "";
	this.url = "";
	this.lat = 0.0;
	this.lng = 0.0;
	this.icon = new GIcon(G_DEFAULT_ICON);
	this.marker = null;
	this.info

	return {
		addToMap : function(map) {
			var latlng = new GLatLng(this.lat,this.lng);
			this.marker = new GMarker(latlng, this.icon);
			this.marker.title = this.title;
			this.createInfoWindow(map);
			map.addOverlay(this.marker);			
		},
		
		createInfoWindow: function(map) {
			this.marker.bindInfoWindowHtml(
				"<div class='mapFlag'><div class=\"mapFlagTitle\"><a href="+this.url+">"
				+this.title+"</a></div>"
				+"<div>"
				+this.street+"<br/>"
				+this.zip+" "+this.city+"<br/><a href="+this.url+">Eintrag aufrufen</a><br/>"
				+"</div>"
				//+"<div><a class='zoom' href='javascript:map.returnToSavedPosition()'>&lt;&lt;zur&uuml;ck</a></div>"
				//+"<div><a class='zoom' href='javascript:map.savePosition();map.setCenter(new GLatLng("+this.lat+","+this.lng+"),14)'>Heranzoomen</a></div>"
				+"<div class='cb'></div>"
				+"</div>",
				this.getInfoWindowOptions()
			);				
		}
		,
		getInfoWindowOptions: function() {
			var opts = new Object();
			opts.maxWidth = 210;
			return opts;
		}
		
	};
	
} 
jQuery(document).ready(function () {
	GMap2.prototype.DMautoZoom=function(entries)
	{
	var rects={'minLng':999,'minLat':999,'maxLng':-999,'maxLat':-999}
		  
	for ( var i = 0; i < entries.length; i++ ) 
	{ 
		rects={
				'minLng':Math.min(rects.minLng,entries[i].lng),
				'minLat':Math.min(rects.minLat,entries[i].lat),
				'maxLng':Math.max(rects.maxLng,entries[i].lng),
				'maxLat':Math.max(rects.maxLat,entries[i].lat)
		}
	}
	var rect=new GLatLngBounds(
		new GLatLng(rects.minLat,rects.minLng ),
		new GLatLng(rects.maxLat,rects.maxLng )
	);
	
	
		zoomlvl = this.getBoundsZoomLevel(rect);
		if(zoomlvl > 13 )
		{
			zoomlvl = 13;
		}
		this.setCenter(
				rect.getCenter(),
				zoomlvl
		);
	}
});
