<% include GoogleJavaScript %>
<div class="googlemapcontainer">
<div id="$DomID" class="map googlemap"><!-- map is rendered here --></div>
<% if $Caption %><p class="caption">$Caption</p><% end_if %>
</div>
<script type="text/javascript">
  function initialize() {
    var mapOptions = {
      center: { lat: $Latitude, lng: $Longitude},
      zoom: $Zoom,
      mapTypeId: google.maps.MapTypeId.{$MapType}
    };
    var map = new google.maps.Map(document.getElementById('$DomID'),
        mapOptions);
    if ($AllowFullScreen) {
	map.controls[google.maps.ControlPosition.TOP_RIGHT].push(
		FullScreenControl(map, "Full Screen", "Original Size")
	);
    }
  }
  google.maps.event.addDomListener(window, 'load', initialize);
</script>

<% include GoogleJavaScript %>
<div class="googlemapcontainer">
<div id="$DomID" class="map googlemap" style="background: #EEE; border: solid red 1px;height: 500px;"><!-- map is rendered here --></div>
<% if $Caption %><p class="caption">$Caption</p><% end_if %>
</div>

Move JavaScript to a template that can be rendered at the end of the page
FIX: Move JavaScript to a template that can be rendered at the end of the page
