var ground = {}, beermarkers = [], groundmarkers = []; ground.mapinit = function() { if (GBrowserIsCompatible()) { var bounds = new GLatLngBounds(); map = new GMap2($("groundmap")); map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.setCenter(new GLatLng(54,-3),1); var FootballIcon = new GIcon(); FootballIcon.image = "http://i.holmesdale.net/icons/football.png"; FootballIcon.shadow = "http://i.holmesdale.net/travel/shadow-football.png"; FootballIcon.iconSize = new GSize(16.0, 16.0); FootballIcon.shadowSize = new GSize(25.0, 16.0); FootballIcon.iconAnchor = new GPoint(8.0, 8.0); FootballIcon.infoWindowAnchor = new GPoint(8.0, 8.0); for(i=0;i

'+grounds[i].team+'

'+grounds[i].ground+'

")})'); eval("map.addOverlay(groundmarkers["+i+"]);"); bounds.extend(point); } map.setZoom(map.getBoundsZoomLevel(bounds)); map.setCenter(bounds.getCenter()); } }; Event.observe(window, 'load', function(e) { ground.mapinit(); });