// JavaScript Document


	// Create a directions object and register a map and DIV to hold the 
    // resulting computed directions

    var map;
    var directionsPanel;
    var directions;

	function initialize() {
      map = new GMap2(document.getElementById("map"));
      map.setCenter(new GLatLng(33.566859,-101.863174), 12);
    	directions = new GDirections(map, $("route"));
    	directions.loadFromWaypoints(addresses);
		var cc = $('center_content');
		if(cc){
			cc.style.height='auto';
		}
	}
	
	function map_business() {
        map = new GMap2(document.getElementById("map"));
        geocoder = new GClientGeocoder();
		if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              //alert(address + " not found");
			  var map_region = $('google_map');
			  var map_button = $('map_it');
			  if(map_region){
			  	map_region.remove();
			  	map_button.remove();
			  }
            } else {
              map.setCenter(point, 14);
              var marker = new GMarker(point);
              map.addOverlay(marker);
			  map.addControl(new GSmallMapControl());
			  map.addControl(new GScaleControl());
			  map.addControl(new GMapTypeControl());
            }
          }
        );
      }
    }
	