function mapload(xmlparam) { 
	 		
		goTo = function(lng, lat, markernum) {
		var newCenter = new GPoint(lng, lat);
		gmarkers[markernum].openInfoWindowHtml(gmarkers[markernum].my_html);
			//map.recenterOrPanToLatLng(newCenter);
					     }
		moveAndZoom = function(lng, lat, zoom){
			map.centerAndZoom(new GPoint(lng, lat),zoom); 
				} 
    	               
                        gmarkers = [];

                        var icon = new GIcon();
                        icon.image = "/templates/gmap/images/oca_logo_map_marker.png";
                        icon.shadow = "/templates/gmap/images/oca_logo_map_marker_shadow.png";
                        icon.iconSize = new GSize(25, 11);
                        icon.shadowSize = new GSize(26, 13);
                        icon.iconAnchor = new GPoint(1, 11);
                        icon.shadowAnchor = new GPoint(25, 1);
                        icon.infoWindowAnchor = new GPoint(5, 1);
                        
                        // Center the map on the OK
                        var map = new GMap(document.getElementById("map"));
                        map.addControl(new GLargeMapControl());
                        map.addControl(new GMapTypeControl());
						
                        map.centerAndZoom(new GPoint(-97.51, 35.459),10);
                          // Creates a marker whose info window displays the htmlbit
                        function createMarker(point, htmlbit) {
                          	var marker = new GMarker(point, icon);
                       		marker.my_html = htmlbit;    
							// Show this marker's info in the info window when it is clicked
                            GEvent.addListener(marker, "click", function() {
								marker.openInfoWindowHtml(htmlbit);
                              });
                              return marker;
                            }
                             
                            // Download the data and load it on the map.
                            var request = GXmlHttp.create();
                            var xmlurl="/locations/getmapxml.asp?" + xmlparam;
						   // alert(xmlurl);
							request.open("GET", xmlurl, true);
                            request.onreadystatechange = function() {
                              if (request.readyState == 4) {
								var xmlDoc = request.responseXML;
								var locations = xmlDoc.documentElement.getElementsByTagName("location");
                                for (var i = 0; i < locations.length; i++) {
                               	 	
									var point = new GPoint(parseFloat(locations[i].getAttribute("lng")), parseFloat(locations[i].getAttribute("lat")));
                                    var title = locations[i].getAttribute("name");

									var phone = locations[i].getAttribute("phone");  
	                                var address1 = locations[i].getAttribute("address1");
	                                var address2 = locations[i].getAttribute("address2");
	                                var city = locations[i].getAttribute("city");
	                                var state = locations[i].getAttribute("state");
	                                var zip = locations[i].getAttribute("zip");
                            
	                                var htmlbit = "<div id=\"infobubble\" style=\"width: 200px;\">";
	                                htmlbit += "<strong>" + title + "</strong><br>";
	                                htmlbit += address1 + "<br>";
	                                if(address2 != ''){
										htmlbit += address2 + "<br>";
									}
	                                htmlbit += city + ", " + state + " " + zip;
								   
									htmlbit += "<br>";
	                               htmlbit += phone + "<br>";
	                                htmlbit += "</div>";        
	                                	
	                                var marker = createMarker(point, htmlbit);
	                                gmarkers[i] = marker;	
									map.addOverlay(marker);                                          
 
                                }
                              }
                            }
                                request.send(null);  
       			  
					  }