var geoloc, map;
var ggmap = {
	init:function(){
        map = new GMap2(document.getElementById('ggmap'));		
        map.setMapType(G_PHYSICAL_MAP);	
		map.addControl(new GSmallZoomControl());
		ggmap.setCenter(geoloc[0], geoloc[1]);
		ggmap.addMarker(geoloc[0], geoloc[1]);	
	},

	addMarker: function(lat, lng, txt){
		/*
       	var pinIcon = new GIcon(G_DEFAULT_ICON);
        pinIcon.image = "pin.png";
		pinIcon.iconSize = new GSize(217, 217);
		pinIcon.iconAnchor = new GPoint(118, 118);
		pinIcon.shadow = false;		
		markerOptions = { icon:pinIcon };
		*/		
		var marker = new GMarker(new GLatLng(lat, lng)/*, markerOptions*/);
		
		if(txt){
			GEvent.addListener(marker, 'click',function(){
				marker.openInfoWindowHtml(txt);
			})
		}
		map.addOverlay(marker);
	},
	
	setCenter:function(lat, lng){
		map.setCenter(new GLatLng(lat, lng), 6);
	},
		
	setGeoloc:function(loc){
		geoloc = loc;
	}
}