//<![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(47.00189, -122.3692025), 10, G_NORMAL_MAP);
var bds = new GLatLngBounds(new GLatLng(45.55439576, -122.92698185), new GLatLng(48.44938424, -121.81142315));
map.setZoom(map.getBoundsZoomLevel(bds));
map.addControl(new GSmallMapControl());
var point = new GLatLng(47.860278,-122.203056);
var marker = createMarker(point,"Mill Creek","http://www.americanhomeguides.com/homes/new_communities/washington/mill_creek.html", 0);
map.addOverlay(marker);
var point = new GLatLng(47.530278,-122.031389);
var marker = createMarker(point,"Issaquah","http://www.americanhomeguides.com/homes/new_communities/washington/issaquah.html", 1);
map.addOverlay(marker);
var point = new GLatLng(47.483056,-122.215833);
var marker = createMarker(point,"Renton","http://www.americanhomeguides.com/homes/new_communities/washington/renton.html", 2);
map.addOverlay(marker);
var point = new GLatLng(47.034444,-122.821944);
var marker = createMarker(point,"Lacey","http://www.americanhomeguides.com/homes/new_communities/washington/lacey.html", 3);
map.addOverlay(marker);
var point = new GLatLng(48.015278,-122.0625);
var marker = createMarker(point,"Lake Stevens","http://www.americanhomeguides.com/homes/new_communities/washington/lake_stevens.html", 4);
map.addOverlay(marker);
var point = new GLatLng(47.525249,-122.652288);
var marker = createMarker(point,"Port Orchard","http://www.americanhomeguides.com/homes/new_communities/washington/port_orchard.html", 5);
map.addOverlay(marker);
var point = new GLatLng(47.329444,-122.578889);
var marker = createMarker(point,"Gig Harbor","http://www.americanhomeguides.com/homes/new_communities/washington/gig_harbor.html", 6);
map.addOverlay(marker);
var point = new GLatLng(47.981797,-122.189544);
var marker = createMarker(point,"Everett","http://www.americanhomeguides.com/homes/new_communities/washington/everett.html", 7);
map.addOverlay(marker);
var point = new GLatLng(46.999945,-122.916045);
var marker = createMarker(point,"Tumwater","http://www.americanhomeguides.com/homes/new_communities/washington/tumwater.html", 8);
map.addOverlay(marker);
var point = new GLatLng(47.038056,-122.899444);
var marker = createMarker(point,"Olympia","http://www.americanhomeguides.com/homes/new_communities/washington/olympia.html", 9);
map.addOverlay(marker);
var point = new GLatLng(47.381111,-122.233611);
var marker = createMarker(point,"Kent","http://www.americanhomeguides.com/homes/new_communities/washington/kent.html", 10);
map.addOverlay(marker);
var point = new GLatLng(48.421002,-122.313348);
var marker = createMarker(point,"Mount Vernon","http://www.americanhomeguides.com/homes/new_communities/washington/mount_vernon.html", 11);
map.addOverlay(marker);
var point = new GLatLng(48.051944,-122.175833);
var marker = createMarker(point,"Marysville","http://www.americanhomeguides.com/homes/new_communities/washington/marysville.html", 12);
map.addOverlay(marker);
var point = new GLatLng(47.096944,-122.63);
var marker = createMarker(point,"Dupont","http://www.americanhomeguides.com/homes/new_communities/washington/dupont.html", 13);
map.addOverlay(marker);
var point = new GLatLng(47.674167,-122.120278);
var marker = createMarker(point,"Redmond","http://www.americanhomeguides.com/homes/new_communities/washington/redmond.html", 14);
map.addOverlay(marker);
var point = new GLatLng(47.3075,-122.227222);
var marker = createMarker(point,"Auburn","http://www.americanhomeguides.com/homes/new_communities/washington/auburn.html", 15);
map.addOverlay(marker);
var point = new GLatLng(47.76,-122.204444);
var marker = createMarker(point,"Bothell","http://www.americanhomeguides.com/homes/new_communities/washington/bothell.html", 16);
map.addOverlay(marker);
var point = new GLatLng(47.641944,-122.079167);
var marker = createMarker(point,"Sammamish","http://www.americanhomeguides.com/homes/new_communities/washington/sammamish.html", 17);
map.addOverlay(marker);
var point = new GLatLng(47.944722,-122.303333);
var marker = createMarker(point,"Mukilteo","http://www.americanhomeguides.com/homes/new_communities/washington/mukilteo.html", 18);
map.addOverlay(marker);
var point = new GLatLng(47.525777,-121.82236);
var marker = createMarker(point,"Snoqualmie","http://www.americanhomeguides.com/homes/new_communities/washington/snoqualmie.html", 19);
map.addOverlay(marker);
var point = new GLatLng(47.597543,-122.150885);
var marker = createMarker(point,"Bellevue","http://www.americanhomeguides.com/homes/new_communities/washington/bellevue.html", 20);
map.addOverlay(marker);
var point = new GLatLng(47.550833,-121.886389);
var marker = createMarker(point,"Fall City","http://www.americanhomeguides.com/homes/new_communities/washington/fall_city.html", 21);
map.addOverlay(marker);
var point = new GLatLng(47.253056,-122.443056);
var marker = createMarker(point,"Tacoma","http://www.americanhomeguides.com/homes/new_communities/washington/tacoma.html", 22);
map.addOverlay(marker);
var point = new GLatLng(47.177222,-122.185278);
var marker = createMarker(point,"Bonney Lake","http://www.americanhomeguides.com/homes/new_communities/washington/bonney_lake.html", 23);
map.addOverlay(marker);
var point = new GLatLng(47.053056,-122.293056);
var marker = createMarker(point,"Graham","http://www.americanhomeguides.com/homes/new_communities/washington/graham.html", 24);
map.addOverlay(marker);
var point = new GLatLng(45.587222,-122.398333);
var marker = createMarker(point,"Camas","http://www.americanhomeguides.com/homes/new_communities/washington/camas.html", 25);
map.addOverlay(marker);
var point = new GLatLng(45.638889,-122.660278);
var marker = createMarker(point,"Vancouver","http://www.americanhomeguides.com/homes/new_communities/washington/vancouver.html", 26);
map.addOverlay(marker);
var point = new GLatLng(45.582778,-122.352222);
var marker = createMarker(point,"Washougal","http://www.americanhomeguides.com/homes/new_communities/washington/washougal.html", 27);
map.addOverlay(marker);
var point = new GLatLng(45.815278,-122.741389);
var marker = createMarker(point,"Ridgefield","http://www.americanhomeguides.com/homes/new_communities/washington/ridgefield.html", 28);
map.addOverlay(marker);
var point = new GLatLng(45.910833,-122.740556);
var marker = createMarker(point,"Woodland","http://www.americanhomeguides.com/homes/new_communities/washington/woodland.html", 29);
map.addOverlay(marker);
var point = new GLatLng(45.781111,-122.532222);
var marker = createMarker(point,"Battle Ground","http://www.americanhomeguides.com/homes/new_communities/washington/battle_ground.html", 30);
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();
    }
}
	