/******************************************************************************
 * Name: LoadGoogleMapWithAddress
******************************************************************************/
function LoadGoogleMapWithAddress(my_latitude, my_longitude, agent_id, agent_name, listing_price, listing_address, listing_nsew, listing_street, listing_city, listing_zip) {
	if (GBrowserIsCompatible()) {
		var map              = new GMap2(document.getElementById("map"));
		var address_point    = new GLatLng(my_latitude, my_longitude);
		var address_marker   = new GMarker(address_point);
		var info_window_html = "<table height='125px'>" +
			                   "    <tr>" +
			                   "        <td style=\"font-size: 12px\" align=\"center\">" +
			                   "            <img src=\"/images/logo_thumbnail.jpg\"><br>" +
			                   "            <img src=\"/images/agents/" + agent_id + "_icon.jpg\"><br>" +
			                   "        " + agent_name +
			                   "        </td>" +
			                   "        <td style=\"font-size: 12px\">" +
			                   "            <span style=\"font-size: 14px; font-weight: bold; color: #0000FF\">$" + listing_price + "</span><br>" +
			                   "        " + listing_address + " " + listing_nsew + ". " + listing_street + "<br>" +
			                   "        " + listing_city + ", IL " + listing_zip +
			                   "        </td>" +
			                   "    </tr>" +
			                   "</table>";

		map.setCenter(new GLatLng(address_point.lat(), address_point.lng()), 15);
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.addOverlay(address_marker);

		map.openInfoWindowHtml(new GLatLng(address_point.lat(), address_point.lng()), info_window_html);

		GEvent.addListener(address_marker, "click", function(marker, point) {
			                                            map.openInfoWindowHtml(new GLatLng(address_point.lat(), address_point.lng()), info_window_html);
													});
	}
}

/******************************************************************************
 * Name: LoadGoogleMap
******************************************************************************/
function LoadGoogleMap(my_latitude, my_longitude) {
	if (GBrowserIsCompatible()) {
		var map              = new GMap2(document.getElementById("map"));
		var address_point    = new GLatLng(my_latitude, my_longitude);
		var address_marker   = new GMarker(address_point);

		map.setCenter(new GLatLng(address_point.lat(), address_point.lng()), 15);
		map.addControl(new GSmallMapControl());
		map.addOverlay(address_marker);
	}
}
