// JavaScript Document

function initialize() {
  if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map_canvas"));
    map.setCenter(new GLatLng(26.4404507, -80.1425171), 10); //13.0711866, 80.1789093
    //Create controls
    //map.addControl(new GMapTypeControl());
    //map.addControl(new GLargeMapControl());
	map.addControl(new GLargeMapControl3D());
	map.addControl(new GScaleControl());
	map.addControl(new GHierarchicalMapTypeControl());
	//map.addControl(new GOverviewMapControl());


    // Create a base icon for all of our markers that specifies the
    // shadow, icon dimensions, etc.
    var baseIcon = new GIcon(G_DEFAULT_ICON);
    baseIcon.shadow = "images/shadow50.png";
    baseIcon.iconSize = new GSize(15, 29);
    baseIcon.shadowSize = new GSize(35, 32);
    baseIcon.iconAnchor = new GPoint(9, 34);
    baseIcon.infoWindowAnchor = new GPoint(9, 2);

    // Creates a marker whose info window displays the letter corresponding
    // to the given index.
    function createMarker(point, index) {
      // Create a lettered icon for this point using our icon class
      var letteredIcon = new GIcon(baseIcon);
      //letteredIcon.image = "http://www.google.com/mapfiles/marker" + letter + ".png";
	  letteredIcon.image = "images/red.png";

      // Set up our GMarkerOptions object
      markerOptions = { icon:letteredIcon };
      var marker = new GMarker(point, markerOptions);

      GEvent.addListener(marker, "click", function() 
	  {
        //marker.openInfoWindowHtml(add);
		 var address = "<p><strong>Transport Services</strong><br />900 Linton Blvd Suite 200A,<br />Delray   Beach,<br />FL 33444,<br />Toll Free: 888-561-HAUL ( 4285 ),<br />Local:   (561)-391-9949  Fax: (561)-391-9950 </p>";
		switch(index)
		{
			case 0:	marker.openInfoWindowHtml(address);   break;
			
		}
      });
      return marker;
    }

    // Add more markers to the map at lat, lng locations
	
	//var lng=new Array(26.4396054,0);
	//var lat=new Array(-80.0846672,0);
	//for(i = 0; i <= 1; i++)
	//{
	var latlng = new GLatLng(26.4396054, -80.0846672);
      	map.addOverlay(createMarker(latlng, 0));
	//}
	
  }
}

