var map = {};

map.load = function () {
	if (GBrowserIsCompatible()) {
		this.map = new GMap2(document.getElementById("map"));
	} else {
		alert('Google maps cant be loaded');
	}
}

map.init = function () {
		// Connect to GMaps and load the map
		this.load();

		// ****** Map Controls and Option go here ******
		//this.map.setMapType(G_HYBRID_MAP);
		this.map.addControl(new GSmallMapControl());
		//this.map.addControl(new GScaleControl());
		//this.map.addControl(new GOverviewMapControl());
		//this.map.addControl(new GMapTypeControl());
      	this.map.enableContinuousZoom();
      	//this.map.enableGoogleBar();
	
		// ****** Just in case ******
		//this.map.clearOverlays();
		
		// ****** Initial position of the map ******
		var point = new GLatLng(38.25028352118112, 21.739819049835205);
		this.map.setCenter(point, 16); // numbers are centered to kalamata
		var marker = new GMarker(point);
		var html = '<br />Μαιζώνος 21-23';
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(html);
		});		
		this.map.addOverlay(marker);
}
