/*
http://maps.google.com/maps?f=q&hl=en&q=33947&ll=26.892067,-82.272491&spn=0.168101,0.347099
*/

function addLoadEvent(func) {
	var oldonload = window.onload;
	if (typeof window.onload != 'function') {
		window.onload = func;
	} else {
		window.onload = function() {
			oldonload();
			func();
		}
	}
}

function makeMap() {

if(!document.getElementById) return false;

// create the map
var map = new GMap(document.getElementById("map"));

// add map large controllers
map.addControl(new GLargeMapControl());



// Centre of Rotonda (-82.272491, 26.892067)
// set the center map location
var location = new GPoint(-82.272491, 26.892067);


// center and zoom into the location
map.centerAndZoom(location, 11);

// Marker for Florida Suncoast Villas (-82.272491, 26.892067)
// add a marker for the location
var marker = new GMarker(new GPoint(-82.272491, 26.892067));
map.addOverlay(marker);

// Show a map blow up of the Rotonda
marker.showMapBlowup(5, G_MAP_TYPE);

GEvent.addListener(marker, 'click', function() {marker.showMapBlowup(5, G_MAP_TYPE);});

/*
// create the text for the info window
var myText = document.createTextNode("Rotonda West, FL")

// create the div element for the info window
var myDiv = document.createElement("div");

myDiv.setAttribute("class","infoWindow")

myDiv.appendChild(myText);

// add an info window for the location
marker.openInfoWindow(myDiv);

GEvent.addListener(marker, 'click', function() {marker.openInfoWindow(myDiv);});

/*window.setTimeout(function() {
  map.zoomTo(4);
}, 5000);
*/
}


addLoadEvent(makeMap);


