<!-- Begin
	function makeMap() {
		//create the map & controls
		

		var map = new GMap(document.getElementById("map"));
		map.addControl(new GLargeMapControl());
//		map.addControl(new GMapTypeControl());
		map.centerAndZoom(new GPoint(-71.913567,42.636251), 9);


		 
		// Download the data in data.xml and load it on the map.
		var request = GXmlHttp.create();
		request.open("GET", "data3.xml", true);
		request.onreadystatechange = function() {
			if (request.readyState == 4) {
				var xmlDoc = request.responseXML;
				var markers = xmlDoc.documentElement.getElementsByTagName("marker");
				
				for (var i = 0; i < markers.length; i++) {
					var tourney = parseFloat(markers[i].getAttribute("tourney"));
					var Lat = parseFloat(markers[i].getAttribute("lat"));
					var Lng = parseFloat(markers[i].getAttribute("lng"));
					var point = new GPoint(Lng, Lat);
					
					// Show the following HTML in the info window when it is clicked
					var html = '<div style="width:175px;text-align:left;"><span class="footerText">'+markers[i].getAttribute("name")+'<br>'+
					markers[i].getAttribute("add1")+'<br>'+
					markers[i].getAttribute("add2")+'<br></span></div>';
					//dest is just a way to combine lines 1 & 2 of the address so they can be sent to maps.google.com					
					var dest = markers[i].getAttribute("add1") + ',' + markers[i].getAttribute("add2");
					//dirLink is the "get directions to here' link. It uses the 'dest' var and contains a form.
					var dirLink = '';
//					var dirLink = '<form action="http://maps.google.com/maps" method="get"><label for="saddr"><span class="footerText"><br>Enter your address for directions:<br></span></label><input type="text" SIZE=40 MAXLENGTH=40 name="saddr" id="saddr" value="" /><br><INPUT ID="SUBMIT" TYPE="SUBMIT" VALUE="Get directions to here."><input type="hidden" name="daddr" value="'+dest+'" /><input type="hidden" name="hl" value="en" /></form>';

          //info is just a combination of all the other information that is put together to be displayed in the popup
					var info = html + dirLink;
					if (tourney == 1){
						imageurl = "images/marker.png";
					} else {
						imageurl = "images/markerGreen.png";
					}										
					// Creates a marker whose info window displays the given number
						var marker = createMarker(point, info);
						map.addOverlay(marker);									
				}				
			}
		}
		request.send(null);
    }

	// This is the code I used so I could have custom markers. If you want to use default markers
	function createMarker(point, html) {
		var icon = new GIcon();
//					icon.image = "images/marker.png";  
					icon.image = imageurl;  
//					icon.shadow = "images/shadow50.png";
					icon.iconSize = new GSize(20, 34);
//					icon.shadowSize = new GSize(37, 34);
					icon.iconAnchor = new GPoint(9, 34);    
					icon.infoWindowAnchor = new GPoint(9, 2);
					icon.infoShadowAnchor = new GPoint(18, 25);
		var marker = new GMarker(point, icon);

		//this is the listener that tells when someone clicks on a marker
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(html);
		});

		return marker;
	}
	
	function zoomAndLoad(point, level) {
		map.centerAndZoom(point, level);
	}
	 
	// End -->
