function atw_createMarker(point, name, been_there, picture, text, hometown)
{
	// choosing the marker icon
	var icon = G_DEFAULT_ICON; //icons["default"];
	if (hometown) icon = icons["home"];
	else if (picture != "") icon = icons["picture"];
	else if (text != "<br />") icon = icons["text"];
	var marker = new GMarker(point, icon);
			
	// setting up the look of the infowindow 
	var html = "<div class=\"infowindow-map\" style=\"width:250px;\">";
	html += "<h3>"+name+"</h3>";
	if (hometown) html += "<em>Lived there: "+been_there+"</em><br />";
	else html += "<em>Been there: "+been_there+"</em><br />";
	if (picture != '')
	{
		html += '<img src="'+picture+'" alt="" title="'+name+'" />';
	}
	html += text;
	html += "</div>";
	GEvent.addListener(marker, "click", function()
	{
		marker.openInfoWindowHtml(html);
	});

	return marker;
}

function atw_goTo(latitude, longitude, zoom)
{
	map.setCenter(new GLatLng(latitude, longitude), zoom);
}

function atw_initIcons()
{
	var baseIcon = new GIcon();
	baseIcon.iconSize=new GSize(32,32);
	baseIcon.shadowSize=new GSize(56,32);
	baseIcon.iconAnchor=new GPoint(16,32);
	baseIcon.infoWindowAnchor=new GPoint(16,0);
          
	icons["default"] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal2/icon13.png", null, "http://maps.google.com/mapfiles/kml/pal2/icon13s.png");
	icons["picture"] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal4/icon46.png", null, "http://maps.google.com/mapfiles/kml/pal4/icon46s.png");
	icons["text"] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal3/icon43.png", null, "http://maps.google.com/mapfiles/kml/pal3/icon43s.png");
	icons["home"] = new GIcon(baseIcon, "http://maps.google.com/mapfiles/kml/pal3/icon56.png", null, "http://maps.google.com/mapfiles/kml/pal3/icon56s.png");

}
