	//<![CDATA[

    // Check to see if this browser can run the Google API

      var gmarkers = [];
      var htmls = [];
      var to_htmls = [];
      var from_htmls = [];
      var i=0;

      // A function to create the marker and set up the event window
      function createMarker(point,name,html,addr) {
        var marker = new GMarker(point);
/*
        // The info window version with the "to here" form open
        to_htmls[i] = html + '<br>Directions: <b>To here</b> - <a href="javascript:fromhere(' + i + ')">From here</a>' +
           '<br>Start address (Street, City, State, Zip):<form action="http://maps.google.com/maps" method="get" target="_blank">' +
           '<input type="text" SIZE=30 MAXLENGTH=48 name="saddr" id="saddr" value="' + daddr + '" /><br>' +
           '<INPUT value="Get Directions" TYPE="SUBMIT"><br /><br />' +
           '<input type="hidden" name="daddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" +
           '"/>';
        // The info window version with the "to here" form open
        from_htmls[i] = html + '<br>Directions: <a href="javascript:tohere(' + i + ')">To here</a> - <b>From here</b>' +
           '<br>End address (Street, City, State, Zip):<form action="http://maps.google.com/maps" method="get"" target="_blank">' +
           '<input type="text" SIZE=30 MAXLENGTH=48 name="daddr" id="daddr" value="' + daddr + '" /><br>' +
           '<INPUT value="Get Directions" TYPE="SUBMIT"><br /><br />' +
           '<input type="hidden" name="saddr" value="' + point.lat() + ',' + point.lng() +
                  // "(" + name + ")" +
           '"/>';
*/
        // The info window version with the "to here" form open
        to_htmls[i] = html + '<br>Directions: <b>To here</b> - <a href="javascript:fromhere(' + i + ')">From here</a>' +
           '<br>Start address (Street, City, State, Zip):<form action="http://maps.google.com/maps" method="get" target="_blank">' +
           '<input type="text" SIZE=30 MAXLENGTH=48 name="saddr" id="saddr" value="" /><br>' +
           '<INPUT value="Get Directions" TYPE="SUBMIT"><br /><br />' +
           '<input type="hidden" name="daddr" value="' + addr + '"/>';
        // The info window version with the "to here" form open
        from_htmls[i] = html + '<br>Directions: <a href="javascript:tohere(' + i + ')">To here</a> - <b>From here</b>' +
           '<br>End address (Street, City, State, Zip):<form action="http://maps.google.com/maps" method="get"" target="_blank">' +
           '<input type="text" SIZE=30 MAXLENGTH=48 name="daddr" id="daddr" value="" /><br>' +
           '<INPUT value="Get Directions" TYPE="SUBMIT"><br /><br />' +
           '<input type="hidden" name="saddr" value="' + addr + '"/>';
		   
        // The inactive version of the direction info
        html = html + '<br><b>Get Directions:</b> <a href="javascript:tohere('+i+')">To here</a> - <a href="javascript:fromhere('+i+')">From here</a>';

        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        gmarkers[i] = marker;
        htmls[i] = html;
        i++;
        return marker;
      }

      // functions that open the directions forms
      function tohere(i) {
        gmarkers[i].openInfoWindowHtml(to_htmls[i]);
      }
      function fromhere(i) {
        gmarkers[i].openInfoWindowHtml(from_htmls[i]);
      }

      // Display the map, with some controls and set the initial location
      function load() {
      if (GBrowserIsCompatible()) {

	  var map1 = new GMap2(document.getElementById("map1"));
	  map1.addControl(new GSmallMapControl());
      //map1.addControl(new GMapTypeControl());
      map1.setCenter(new GLatLng(41.586889, -93.640097), 13);

	  var map2 = new GMap2(document.getElementById("map2"));
      map2.addControl(new GSmallMapControl());
      //map2.addControl(new GMapTypeControl());
      map2.setCenter(new GLatLng(40.813595, -96.711032), 13);

      // Set up markers with info windows

      var point1 = new GLatLng(41.586889, -93.640097);
	  var addr1 = "1707+High+St,+Des+Moines,+IA+50309";
      var marker1 = createMarker(point1,'Des Moines Office','<b>Des Moines Office</b><br>1707 High Street<br>Des Moines, IA 50309-3313',addr1)
      map1.addOverlay(marker1);
	  
      var point2 = new GLatLng(40.813595, -96.711032);
	  var addr2 = "720+O+St,+Suite+D+Lincoln,+NE+68508";
      var marker2 = createMarker(point2,'Lincoln Office','<b>Lincoln Office</b><br>720 "O" Street, Suite D<br>Lincoln, NE 68508-1322',addr2)
      map2.addOverlay(marker2);
	  }
}
    //]]>