//<![CDATA[
var points = [];
var markers = [];
var counter = 0;
var icon = [];
icon[0] = new GIcon();
icon[0].image = "http://www.americanhomeguides.com/apps/googlemaps/images/mm_20_red.png";
icon[0].shadow = "http://www.americanhomeguides.com/apps/googlemaps/images/mm_20_shadow.png";
icon[0].shadowSize = new GSize(22,20);
icon[0].iconSize = new GSize(12,20);
icon[0].iconAnchor = new GPoint(0,0);
icon[0].infoWindowAnchor = new GPoint(10,10);
var map = null;
function onLoad() {
if (GBrowserIsCompatible()) {
var mapObj = document.getElementById("map");
if (mapObj != "undefined" && mapObj != null) {
map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(40.0481945, -82.9970835), 10, G_NORMAL_MAP);
var bds = new GLatLngBounds(new GLatLng(39.87805289, -83.11650867), new GLatLng(40.21833611, -82.87765833));
map.setZoom(map.getBoundsZoomLevel(bds));
map.addControl(new GSmallMapControl());
var point = new GLatLng(39.881389,-83.093056);
var marker = createMarker(point,"Grove City","http://www.americanhomeguides.com/homes/golf/ohio/grove_city.html", 0);
map.addOverlay(marker);
var point = new GLatLng(40.126111,-82.929167);
var marker = createMarker(point,"Westerville","http://www.americanhomeguides.com/homes/golf/ohio/westerville.html", 1);
map.addOverlay(marker);
var point = new GLatLng(40.215,-82.88);
var marker = createMarker(point,"Galena","http://www.americanhomeguides.com/homes/golf/ohio/galena.html", 2);
map.addOverlay(marker);
var point = new GLatLng(40.198333,-83.010278);
var marker = createMarker(point,"Lewis Center","http://www.americanhomeguides.com/homes/golf/ohio/lewis_center.html", 3);
map.addOverlay(marker);
var point = new GLatLng(40.099167,-83.114167);
var marker = createMarker(point,"Dublin","http://www.americanhomeguides.com/homes/golf/ohio/dublin.html", 4);
map.addOverlay(marker);
}
} else {
alert("Sorry, the Google Maps API is not compatible with this browser.");
}
}
function createMarker(point, title, html, n) {
if(n >= 1) { n = 0; }
var marker = new GMarker(point,{icon: icon[n], title: title});
GEvent.addListener(marker, "click", function() {location.href = html; });
points[counter] = point;
markers[counter] = marker;
counter++;
return marker;
}
function showInfoWindow(idx,html) {
map.centerAtLatLng(points[idx]);
markers[idx].openInfoWindowHtml(html);
}
//]]>

function WindowOnload(oNewOnloadFunction) {
    var oPreviousOnloadFunction = window.onload;
    window.onload = function() {
        if (oPreviousOnloadFunction) { oPreviousOnloadFunction(); }
        oNewOnloadFunction();
    }
}
	