function createMarker(point,html) {
	var marker = new GMarker(point,markerOptions);
	GEvent.addListener(marker, 'click', function() {
		marker.openInfoWindowHtml(html);
	});
	return marker;
}
function initMap() {
	
	if (GBrowserIsCompatible()) {
		var map = new GMap2(document.getElementById("villaselectmap"));
		map.setCenter(new GLatLng(18.16673,-77.299805), 8);
		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());

/* ### BEGIN OF LOCATIONS ### */
		markerOptions = { title:"Ah Selah" };
		var point = new GLatLng(18.468147,-77.318189);
		var marker = createMarker(point,'<div style="width:200px">Go to the <a href="http://www.conciergevillavacationservices.com/ah-selah.html">Ah Selah</a> page')
		map.addOverlay(marker);

		markerOptions = { title:"Carey Island" };
		var point = new GLatLng(18.418454,-77.066099);
		var marker = createMarker(point,'<div style="width:200px">Go to the <a href="http://www.conciergevillavacationservices.com/carey-island.html">Carey Island</a> page')
		map.addOverlay(marker);

		markerOptions = { title:"Idle Hours" };
		var point = new GLatLng(18.463176,-77.337008);
		var marker = createMarker(point,'<div style="width:200px">Go to the <a href="http://www.conciergevillavacationservices.com/idle-hours.html">Idle Hours</a> page')
		map.addOverlay(marker);

		markerOptions = { title:"Spanish Cove" };
		var point = new GLatLng(18.463222,-77.335972);
		var marker = createMarker(point,'<div style="width:200px">Go to the <a href="http://www.conciergevillavacationservices.com/spanish-cove.html">Spanish Cove</a> page')
		map.addOverlay(marker);

		markerOptions = { title:"Tropical Spice" };
		var point = new GLatLng(18.463609,-77.326467);
		var marker = createMarker(point,'<div style="width:200px">Go to the <a href="http://www.conciergevillavacationservices.com/tropical-spice.html">Tropical Spice</a> page')
		map.addOverlay(marker);
/* ### END OF LOCATIONS ### */
	}
}

