  var address_array = new Array();
  var address_def_state = '';

  function mapload() {
	var map = null;
	var geocoder = null;
	
    if (GBrowserIsCompatible()) {
		var aa_nmb = 0;
       	var map = new GMap2(document.getElementById("map"));

		// Create our custom marker icon
		var icon = new GIcon();
		icon.image = icon_image;
		icon.iconSize = new GSize(45, 51);
		icon.iconAnchor = new GPoint(18, 51);
		icon.infoWindowAnchor = new GPoint(18, 51);

		//activate google's geocoder	
		geocoder = new GClientGeocoder();	
					
		/****************Begin Geocoding Address********************/
		function newGeoMarker(oneaddress, InfoHtml) {
			if (geocoder) {
				geocoder.getLatLng(
					oneaddress,
					function(point) {
						if (point) {
							if (aa_nmb == 0 && address_array.length == 1) {
								map.setCenter(point, 13);
							}
							var marker = new GMarker(point, icon);
							map.addOverlay(marker);

							GEvent.addListener(marker, "click", function() {
								marker.openInfoWindowHtml('<div style="padding: 10px 10px 0 0;">'+InfoHtml+'</div>', {maxWidth:200}); 
							});
							aa_nmb++;
							runAddress();
						}
						else {
							alert(oneaddress+" not found.");
						}
					}
				);
			}
		}

		function newCenter(oneaddress) {
			if (geocoder) {
				geocoder.getLatLng(
				    oneaddress,
				    function(point) {
						if (point) {
							map.setCenter(point, 7);
						}
					}
				);
			}
		}	  

		function runAddress() {
			if (aa_nmb < address_array.length) {
				fdata = address_array[aa_nmb];
				fdata_array = fdata.split('{*}');
				newGeoMarker(fdata_array[0], fdata_array[1]);
			}
		}

		if (address_array.length > 1) {
		    newCenter(address_def_state);
		}
		runAddress();
	}
  }

