var MapViewer = function(oConfig)
{
	this.init(oConfig);
};

MapViewer.prototype = {
	
	map: null,
	marker: null,
	
	init: function(oConfig)
	{
		var lat	= oConfig.lat;
		var lng	= oConfig.lng;
		
		YAHOO.util.Dom.setStyle('map-container', 'height', oConfig.h + 'px');
		YAHOO.util.Dom.setStyle('map-container', 'width', oConfig.w + 'px');
		
		if (GBrowserIsCompatible())
		{
			this.map = new GMap2(YAHOO.util.Dom.get("map-container"));
			this.map.addControl(new GLargeMapControl());
			this.map.addControl(new GMapTypeControl());
			var center = new GLatLng(lat, lng);
			this.map.setCenter(center, 15);
			this.marker = new GMarker(
						center,
						{
							draggable : false
						});
			this.map.addOverlay(this.marker);
			window.unload	= GUnload();
		}
	}
};
