// Google Map 

var key;
if (location.href.indexOf('ashcroft.atomicmotion.com') > 0) {
	key = 'ABQIAAAAjGyNVtJ43DMuY0EBt-_FMBTYojods9nOpGoiXjQiZ_eT8j7FBBRi9eorTimw3576p62bR3gBlkqwNw';
} else if (location.href.indexOf('ashcrofthomes.ca') > 0) {
	key = 'ABQIAAAAfgWFH2Kf86caTnpdtmgCChTN-JR347S-GBu4GFFkAnl7WlufrhT0J-v7v_baIVtL_4sMRWs80kTW0A';
} else if (location.href.indexOf('ashcroft-homes.com') > 0) {
	key = 'ABQIAAAAjGyNVtJ43DMuY0EBt-_FMBQEp33vIdso-Ejo3lC2Iqoy--LqZxTVE-HFBacTySTXSSqdHP8J35gC0A';
}
document.write('<scr'+'ipt src="http://maps.google.com/maps?file=api&amp;v=2&amp;key='+key+'"></scr'+'ipt>');
		
function load() {

	if (GBrowserIsCompatible()) {
   
	  var map = new GMap2(document.getElementById("map"));
		map.setCenter(new GLatLng(45.383024,-75.723051), 10);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());

		// Briar Ridge
		var text1 = "<div class=popup>Briar Ridge</div>";
		var icon1 = new GIcon();
		icon1.image = "/images/pins/briarridge.png";
		icon1.iconSize = new GSize(69, 32);
		icon1.iconAnchor = new GPoint(21, 32);
		icon1.infoWindowAnchor = new GPoint(21, 32);
		var marker1 = new GMarker(new GLatLng(45.354648,-75.922507), icon1);
		GEvent.addListener(marker1, "click", function() { window.location = "/communities/details.aspx?listingid=1"; });
		map.addOverlay(marker1);

		// Central Park
		var text2 = "<div class=popup>Central Park</div>";
		var icon2 = new GIcon();
		icon2.image = "/images/pins/centralpark.png";
		icon2.iconSize = new GSize(73, 33);
		icon2.iconAnchor = new GPoint(21, 33);
		icon2.infoWindowAnchor = new GPoint(21, 33);
		var marker2 = new GMarker(new GLatLng(45.370414,-75.732308), icon2);
		GEvent.addListener(marker2, "click", function() { window.location = "/communities/details.aspx?listingid=2"; });
		map.addOverlay(marker2);
		
		// Glebe Court
		var text3 = "<div class=popup>Glebe Court</div>";
		var icon3 = new GIcon();
		icon3.image = "/images/pins/glebecourt.png";
		icon3.iconSize = new GSize(71, 33);
		icon3.iconAnchor = new GPoint(21, 33);
		icon3.infoWindowAnchor = new GPoint(21, 33);
		var marker3 = new GMarker(new GLatLng(45.402789,-75.689235), icon3);
		GEvent.addListener(marker3, "click", function() { window.location = "/communities/details.aspx?listingid=8"; });
		map.addOverlay(marker3);
		
		// Manhattan Square
		var text4 = "<div class=popup>Manhattan Square</div>";
		var icon4 = new GIcon();
		icon4.image = "/images/pins/manhattansquare.png";
		icon4.iconSize = new GSize(92, 32);
		icon4.iconAnchor = new GPoint(21, 32);
		icon4.infoWindowAnchor = new GPoint(21, 32);
		var marker4 = new GMarker(new GLatLng(45.315945,-75.832067), icon4);
		GEvent.addListener(marker4, "click", function() { window.location = "/communities/details.aspx?listingid=9"; });
		map.addOverlay(marker4);
		
		// Oak Ridge Gate
		var text5 = "<div class=popup>Oak Ridge Gate</div>";
		var icon5 = new GIcon();
		icon5.image = "/images/pins/oakridge.png";
		icon5.iconSize = new GSize(79, 34);
		icon5.iconAnchor = new GPoint(79, 20);
		icon5.infoWindowAnchor = new GPoint(79, 20);
		var marker5 = new GMarker(new GLatLng(45.47217,-75.454102), icon5);
		GEvent.addListener(marker5, "click", function() { window.location = "/communities/details.aspx?listingid=5"; });
		map.addOverlay(marker5);
		
		// Up Country
		var text6 = "<div class=popup>Up Country</div>";
		var icon6 = new GIcon();
		icon6.image = "/images/pins/upcountry.png";
		icon6.iconSize = new GSize(66, 32);
		icon6.iconAnchor = new GPoint(21, 32);
		icon6.infoWindowAnchor = new GPoint(21, 32);
		var marker6 = new GMarker(new GLatLng(45.245978,-75.91248), icon6);
		GEvent.addListener(marker6, "click", function() { window.location = "/communities/details.aspx?listingid=6"; });		
		map.addOverlay(marker6);
		
		// CitiPlace
		var text7 = "<div class=popup>CitiPlace</div>";
		var icon7 = new GIcon();
		icon7.image = "/images/pins/citiplace.png";
		icon7.iconSize = new GSize(58, 33);
		icon7.iconAnchor = new GPoint(58, 31);
		icon7.infoWindowAnchor = new GPoint(58, 31);
		var marker7 = new GMarker(new GLatLng(45.343032,-75.719821), icon7);
		GEvent.addListener(marker7, "click", function() { window.location = "/communities/details.aspx?listingid=3"; });
		map.addOverlay(marker7);
		
		// Opus
		var text8 = "<div class=popup>Opus</div>";
		var icon8 = new GIcon();
		icon8.image = "/images/pins/opus.png";
		icon8.iconSize = new GSize(66, 33);
		icon8.iconAnchor = new GPoint(66, 31);
		icon8.infoWindowAnchor = new GPoint(66, 31);
		var marker8 = new GMarker(new GLatLng(45.415024,-75.693051), icon8);
		GEvent.addListener(marker8, "click", function() { window.location = "/communities/details.aspx?listingid=7"; });
		map.addOverlay(marker8);
		
		// Ashcroft Sales Office
		var text9 = "<div class=popup><h1>Ashcroft Homes</h1><h2>Corporate Office</h2><br /><b>Location</b><br />Antares and Hunt Club<br />18 Antares Drive</div>";
		var icon9 = new GIcon();
		icon9.image = "/images/pins/ashcroft.png";
		icon9.iconSize = new GSize(85, 33);
		icon9.iconAnchor = new GPoint(21, 33);
		icon9.infoWindowAnchor = new GPoint(21, 33);
		var marker9 = new GMarker(new GLatLng(45.335043,-75.707474), icon9);
		GEvent.addListener(marker9, "click", function() { marker2.openInfoWindowHtml(text9); });
		map.addOverlay(marker9);
	
	}
		
}