//<![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(39.897361, -83.420972), 10, G_NORMAL_MAP);
var bds = new GLatLngBounds(new GLatLng(39.54531922, -84.25893056), new GLatLng(40.24940278, -82.58301344));
map.setZoom(map.getBoundsZoomLevel(bds));
map.addControl(new GSmallMapControl());
var point = new GLatLng(40.099167,-83.114167);
var marker = createMarker(point,"Dublin","http://www.americanhomeguides.com/homes/new_communities/ohio/dublin.html", 0);
map.addOverlay(marker);
var point = new GLatLng(39.995556,-82.674444);
var marker = createMarker(point,"Pataskala","http://www.americanhomeguides.com/homes/new_communities/ohio/pataskala.html", 1);
map.addOverlay(marker);
var point = new GLatLng(40.081111,-82.808889);
var marker = createMarker(point,"New Albany","http://www.americanhomeguides.com/homes/new_communities/ohio/new_albany.html", 2);
map.addOverlay(marker);
var point = new GLatLng(39.881389,-83.093056);
var marker = createMarker(point,"Grove City","http://www.americanhomeguides.com/homes/new_communities/ohio/grove_city.html", 3);
map.addOverlay(marker);
var point = new GLatLng(39.552222,-84.233333);
var marker = createMarker(point,"Springboro","http://www.americanhomeguides.com/homes/new_communities/ohio/springboro.html", 4);
map.addOverlay(marker);
var point = new GLatLng(39.897196,-84.134759);
var marker = createMarker(point,"Phoneton","http://www.americanhomeguides.com/homes/new_communities/ohio/phoneton.html", 5);
map.addOverlay(marker);
var point = new GLatLng(40.144722,-84.2425);
var marker = createMarker(point,"Piqua","http://www.americanhomeguides.com/homes/new_communities/ohio/piqua.html", 6);
map.addOverlay(marker);
var point = new GLatLng(39.960929,-84.189387);
var marker = createMarker(point,"Tipp City","http://www.americanhomeguides.com/homes/new_communities/ohio/tipp_city.html", 7);
map.addOverlay(marker);
var point = new GLatLng(39.961111,-82.998889);
var marker = createMarker(point,"Columbus","http://www.americanhomeguides.com/homes/new_communities/ohio/columbus.html", 8);
map.addOverlay(marker);
var point = new GLatLng(40.2425,-82.859167);
var marker = createMarker(point,"Sunbury","http://www.americanhomeguides.com/homes/new_communities/ohio/sunbury.html", 9);
map.addOverlay(marker);
var point = new GLatLng(40.126111,-82.929167);
var marker = createMarker(point,"Westerville","http://www.americanhomeguides.com/homes/new_communities/ohio/westerville.html", 10);
map.addOverlay(marker);
var point = new GLatLng(40.033333,-83.158333);
var marker = createMarker(point,"Hilliard","http://www.americanhomeguides.com/homes/new_communities/ohio/hilliard.html", 11);
map.addOverlay(marker);
var point = new GLatLng(39.809167,-82.9725);
var marker = createMarker(point,"Lockbourne","http://www.americanhomeguides.com/homes/new_communities/ohio/lockbourne.html", 12);
map.addOverlay(marker);
var point = new GLatLng(39.713611,-82.599444);
var marker = createMarker(point,"Lancaster","http://www.americanhomeguides.com/homes/new_communities/ohio/lancaster.html", 13);
map.addOverlay(marker);
var point = new GLatLng(39.845833,-82.811667);
var marker = createMarker(point,"Canal Winchester","http://www.americanhomeguides.com/homes/new_communities/ohio/canal_winchester.html", 14);
map.addOverlay(marker);
var point = new GLatLng(40.198333,-83.010278);
var marker = createMarker(point,"Lewis Center","http://www.americanhomeguides.com/homes/new_communities/ohio/lewis_center.html", 15);
map.addOverlay(marker);
var point = new GLatLng(40.215,-82.88);
var marker = createMarker(point,"Galena","http://www.americanhomeguides.com/homes/new_communities/ohio/galena.html", 16);
map.addOverlay(marker);
var point = new GLatLng(39.995556,-82.811389);
var marker = createMarker(point,"Blacklick","http://www.americanhomeguides.com/homes/new_communities/ohio/blacklick.html", 17);
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();
    }
}
	