if (GBrowserIsCompatible()) {
	
	
	
	// this variable will collect the html which will eventually be placed in the side_bar
	var side_bar_html = "";

	// arrays to hold copies of the markers and html used by the side_bar
	// because the function closure trick doesnt work there
	var gmarkers = [];
	var i = 0;

	// Create our "tiny" marker icon
	var icon = new GIcon();
		icon.image = "gfx/con-icon.png";
		icon.iconSize = new GSize(48, 23);
		icon.shadowSize = new GSize(150, 84);
		icon.iconAnchor = new GPoint(23, 22);
		icon.infoWindowAnchor = new GPoint(48, 0);

	// A function to create the marker and set up the event window
	function createMarker(point,name,html) {
		var marker = new GMarker(point,icon);
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml(html);
		});
		// save the info we need to use later for the side_bar
		gmarkers[i] = marker;
		i++;
		return marker;
	}

	// This function picks up the click and opens the corresponding info window
	function myclick(i) {
		GEvent.trigger(gmarkers[i], "click");
	}

	// This function zooms in or out
	// its not necessary to check for out of range zoom numbers, because the API checks
	function myzoom(a) {
		map.setZoom(map.getZoom() + a);
	}

	// create the map
	var map = new GMap2(document.getElementById("map"));
	map.setCenter(new GLatLng( 50.563926,-4.901624), 17);
	map.setMapType((G_SATELLITE_MAP));

	// add the points    
	var point = new GLatLng(50.563926,-4.901624);
	var marker = createMarker(point,"rose","<div class='logo2'><span class='locationtitle'>ROSERROW</span><br><br><strong>Address:</strong><br> Roserrow,<br>St Minver,<br>Wadebridge,<br>Cornwall,<br>PL27 6QT<br><br><strong>Telefone:</strong> 01208 863000 <br><strong>Facsimile:</strong> 01208 863002 <br><br><strong>Email:</strong> <span class='email2'><a href='mailto:info@roserrow.co.uk'>info@roserrow.co.uk</a></span></div>");
	map.addOverlay(marker);

var point = new GLatLng(50.564226,-4.901624);
	var marker = createMarker(point,"rose","<div class='logo2'><span class='locationtitle'>LUXURY APARTMENTS</span><br><br><strong>Address:</strong><br> Roserrow,<br>St Minver,<br>Wadebridge,<br>Cornwall,<br>PL27 6QT<br><br><strong>Telefone:</strong> 01208 863000 <br><strong>Facsimile:</strong> 01208 863002 <br><br><strong>Email:</strong> <span class='email2'><a href='mailto:info@roserrow.co.uk'>info@roserrow.co.uk</a></span></div>");
	map.addOverlay(marker);

	var point = new GLatLng(50.565350,-4.89639);
	var marker = createMarker(point,"rose","<div class='logo2'><span class='locationtitle'>HOUSES FOR RENT</span><br><br><strong>Address:</strong><br> Roserrow,<br>St Minver,<br>Wadebridge,<br>Cornwall,<br>PL27 6QT<br><br><strong>Telefone:</strong> 01208 863000 <br><strong>Facsimile:</strong> 01208 863002 <br><br><strong>Email:</strong> <span class='email2'><a href='mailto:info@roserrow.co.uk'>info@roserrow.co.uk</a></span></div>");
	map.addOverlay(marker);

	var point = new GLatLng(50.59479,-4.829131);
	var marker = createMarker(point,"rose","<div class='logo2'><span class='locationtitle'>CASTLE ROCK</span><br><br><strong>Address:</strong><br> Roserrow,<br>St Minver,<br>Wadebridge,<br>Cornwall,<br>PL27 6QT<br><br><strong>Telefone:</strong> 01208 863000 <br><strong>Facsimile:</strong> 01208 863002 <br><br><strong>Email:</strong> <span class='email2'><a href='mailto:info@roserrow.co.uk'>info@roserrow.co.uk</a></span></div>");
	map.addOverlay(marker);

	var point = new GLatLng(50.512344,-4.736279);
	var marker = createMarker(point,"rose","<div class='logo2'><span class='locationtitle'>THE WALLED GARDEN</span><br><br><strong>Address:</strong><br> Roserrow,<br>St Minver,<br>Wadebridge,<br>Cornwall,<br>PL27 6QT<br><br><strong>Telefone:</strong> 01208 863000 <br><strong>Facsimile:</strong> 01208 863002 <br><br><strong>Email:</strong> <span class='email2'><a href='mailto:info@roserrow.co.uk'>info@roserrow.co.uk</a></span></div>");
	map.addOverlay(marker);


	// ====== Restricting the range of Zoom Levels =====
	// Get the list of map types      
	var mt = map.getMapTypes();
	// Overwrite the getMinimumResolution() and getMaximumResolution() methods
	for (var i=0; i<mt.length; i++) {
		mt[i].getMinimumResolution = function() {return 2;}
		mt[i].getMaximumResolution = function() {return 18;}
	}
} else {
	alert("Sorry, the Google Maps API is not compatible with this browser");
}