			function openSluMap(){
			  Modalbox.show('/pages/stlucia-map', {title: 'St. Lucia Map', width: 499, height: 427, contentOverflow: 'hidden', contentHeightAdjust: 0});
			  $('MB_content').style.padding = '0px';
			  $('MB_content').style.margin = '0px';
			  $('MB_frame').style.overflow = 'hidden';
			  $('MB_frame').style.paddingBottom = '0px';
			}
			
			var map;
			var	property_data = [
				{
					thumbnail: 'img/ports/gfl_charles_airport_thb.jpg',
					title: 'George F.L. Charles Airport',
					info: 'George F. L. Charles Airport (Formerly Vigie Airport) (IATA: SLU, ICAO: TLPC) is the smaller of two airport in Saint Lucia, the other being Hewanorra International Airport. It is located 2 km north of Castries, the capital city. George F. L. Charles Airport is managed by the Saint Lucia Air and Seaports Authority (SLASPA). Unique among airports in the world is the runway, which runs parallel to a pristine beach. Nearby Vigie Beach is a popular attraction.',
					facts: '<table style="width: 220px; font-size: 88%;" class="infobox vcard"><tbody><tr><th style="background: rgb(102, 153, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: white;" colspan="4"><span style="font-size: 115%;" class="fn org">George F. L. Charles Airport</span></th></tr><tr><th style="white-space: nowrap;" colspan="4">IATA: <span class="nickname">SLU</span> – ICAO: <span class="nickname">TLPC</span></th></tr><tr style="background: rgb(102, 153, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: white; font-size: 115%;"><th colspan="4">Summary</th></tr><tr style="text-align: left;" class="note"><th colspan="2">Airport type</th><td colspan="2">Public</td></tr><tr style="text-align: left;" class="note"><th colspan="2">Operator</th><td colspan="2">Saint Lucia Air & Sea Ports Authority</td></tr><tr style="text-align: left;"><th colspan="2">Location</th><td colspan="2"><span class="label">Saint Lucia</span></td></tr><tr style="text-align: left;"><th colspan="2">Elevation AMSL</th><td colspan="2">22 ft / 7 m</td></tr><tr style="text-align: left;"><th colspan="2">Coordinates</th><td colspan="2"><span class="plainlinksneverexpand"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Erioll_world.svg/18px-Erioll_world.svg.png" title="show location on an interactive map" style="padding: 0px 3px 0px 0px; cursor: pointer;" class="noprint"/><a rel="nofollow" title="http://stable.toolserver.org/geohack/geohack.php?pagename=George_F._L._Charles_Airport&amp;params=14_01_12_N_60_59_34_W_type:airport" class="external text" href="http://stable.toolserver.org/geohack/geohack.php?pagename=George_F._L._Charles_Airport&amp;params=14_01_12_N_60_59_34_W_type:airport"><span title="Maps, aerial photos, and other data for this location" class="geo-dms"><span class="latitude">14&deg;01\'12"N</span> <span class="longitude">60&deg;59\'34"W</span></span></a></span></td></tr><tr style="background: rgb(102, 153, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: white; font-size: 115%;"><th colspan="4">Runways</th></tr><tr style="background: rgb(221, 221, 221) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><th style="width: 20%;" rowspan="2">Direction</th><th style="width: 40%;" colspan="2">Length</th><th style="width: 40%;" rowspan="2">Surface</th></tr><tr style="background: rgb(221, 221, 221) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><th style="width: 20%;">ft</th><th style="width: 20%;">m</th></tr><tr style="text-align: center;"><td>09/27</td><td>5,735</td><td>1,748</td><td>Asphalt</td></tr></tbody></table>',
					type: 'airport',
					latitude: 14.019822042053168,
					longitude: -60.994720458984375
				},
				{
					thumbnail: 'img/ports/hewanorra_intl_airport_thb.jpg',
					title: 'Hewanorra International Airport',
					info: 'Hewanorra International Airport (IATA: UVF, ICAO: TLPL), near Vieux Fort, Saint Lucia, in the Caribbean, is the larger of the country\'s two airports and is managed by the Saint Lucia Air and Seaports Authority (SLASPA). The airport is a Fire Category 9 airport that handles 500,000 passengers a year and has the capability to handle the Boeing 747, Airbus A320, Airbus A340 and other similar aircraft. Aircraft maintenance there is carried out by Caribbean Dispatch Services. George F. L. Charles Airport is located in Castries and handles inter-Caribbean flights.',
					facts: '<table style="width: 220px; font-size: 88%;" class="infobox vcard"><tbody><tr><th style="background: rgb(102, 153, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: white;" colspan="4"><span style="font-size: 115%;" class="fn org">Hewanorra International Airport</span></th></tr><tr><th style="white-space: nowrap;" colspan="4">IATA: <span class="nickname">UVF</span> - ICAO: <span class="nickname">TLPL</span></th></tr><tr style="background: rgb(102, 153, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: white; font-size: 115%;"><th colspan="4">Summary</th></tr><tr style="text-align: left;" class="note"><th colspan="2">Airport type</th><td colspan="2">Public</td></tr><tr style="text-align: left;" class="note"><th colspan="2">Operator</th><td colspan="2">Saint Lucia Air and Seaports Authority</td></tr><tr style="text-align: left;"><th colspan="2">Location</th><td colspan="2"><span class="label">Vieux Fort, Saint Lucia</span></td></tr><tr style="text-align: left;"><th colspan="2">Elevation AMSL</th><td colspan="2">14 ft / 4 m</td></tr><tr style="text-align: left;"><th colspan="2">Coordinates</th><td colspan="2"><span class="plainlinksneverexpand"><img src="http://upload.wikimedia.org/wikipedia/commons/thumb/9/9a/Erioll_world.svg/18px-Erioll_world.svg.png" title="show location on an interactive map" style="padding: 0px 3px 0px 0px; cursor: pointer;" class="noprint"/><a rel="nofollow" title="http://stable.toolserver.org/geohack/geohack.php?pagename=Hewanorra_International_Airport&amp;params=13_43_59_N_060_57_09_W_type:airport" class="external text" href="http://stable.toolserver.org/geohack/geohack.php?pagename=Hewanorra_International_Airport&amp;params=13_43_59_N_060_57_09_W_type:airport"><span title="Maps, aerial photos, and other data for this location" class="geo-dms"><span class="latitude">13&deg;43\'59"N</span> <span class="longitude">060&deg;57\'09"W</span></span></a></td></tr><tr style="background: rgb(102, 153, 204) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; color: white; font-size: 115%;"><th colspan="4">Runways</th></tr><tr style="background: rgb(221, 221, 221) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><th style="width: 20%;" rowspan="2">Direction</th><th style="width: 40%;" colspan="2">Length</th><th style="width: 40%;" rowspan="2">Surface</th></tr><tr style="background: rgb(221, 221, 221) none repeat scroll 0% 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;"><th style="width: 20%;">ft</th><th style="width: 20%;">m</th></tr><tr style="text-align: center;"><td>10/28</td><td>9,003</td><td>2,744</td><td>Asphalt</td></tr></tbody></table>',
					type: 'airport',
					latitude: 13.73795937412686,
					longitude: -60.95206260681152
				},
				{
					thumbnail: 'img/ports/marigot_thb.jpg',
					title: 'Marigot Bay Marina',
					info: 'Marigot Bay is tucked away on the scenic west coast of the island, and is well known as the eastern Caribbean’s safest and most attractive hurricane hole. The Marina at Marigot Bay provides an exclusive berthing facility and full service marina for yachts of all sizes. The Marina can accommodate 40 yachts from 30 ft to 250 ft LOA with a maximum draft of 16 ft and a maximum beam of 44ft. Available amenities include including supermarket with wine shop, boutiques, bank/cash point, art gallery, craft shops, restaurants and bars, bakery and coffee shop, car rentals and internet facilities.',
					facts: '',
					type: 'marina',
					latitude: 13.968086432362718,
					longitude: -61.02527618408203
				},
				{
					thumbnail: 'img/ports/rodney_bay_marina_thb.jpg',
					title: 'Rodney Bay Marina',
					info: 'Located on the north western side of the island and north of the port of Castries, Rodney Bay Marina is a privately owned and operated marina facility. It is situated in a well-sheltered lagoon making it safe and secure. The facility offers yachters 232 slips and a 4.5 acre boatyard, as well as excellent accommodations for mega yachts up to 200 feet with drafts of up to 14 feet. Available amenities include shopping centers, banks, car rental agencies, restaurants, internet cafes, and on-site customs and immigration offices.',
					facts: '',
					type: 'marina',
					latitude: 14.076416363978215,
					longitude: -60.94948768615723
				},
				{
					thumbnail: 'img/ports/port_castries_thb.jpg',
					title: 'Port Castries',
					info: 'Port Castries on the north of the island is a well sheltered harbour which receives cargo vessels as well as cruise ships. It has full container facilities including roll-on/roll-off service. Regular container service is available from the United States, Canada, Europe, South America and the Far East. Duty free shopping facilities namely Duty-free Point Seraphine and La Place Carinage are located on the northern and southern shores of the harbour. From the port it is only a short walk to the commercial centre of the city of Castries.',
					facts: '',
					type: 'seaport',
					latitude: 14.01291436260218,
					longitude: -60.99326133728027
				},
				{
					thumbnail: 'img/ports/vieux_fort_seaport_thb.jpg',
					title: 'Port Vieux Fort',
					info: 'Port Vieux Fort, the second largest port on St. Lucia, is located on the southernmost tip of the island in the town of Vieux Fort. The facility is located about a 5-minute drive from the Industrial Estates located in Vieux Fort.  It is a full roll-on/roll-off container port with expanded storage facilities. Regular container service is available from the United States, Canada, Europe, South America and the Far East.',
					facts: '',
					type: 'seaport',
					latitude: 13.72490244746069,
					longitude: -60.95545291900635
				},
				{
					thumbnail: 'img/industrial_estates/union_thb.jpg',
					title: 'Union Industrial Estate (UN)',
					info: 'As the name suggest the estate is located at Union and is within a 10-minute drive from the Capital Castries. This places it in close proximity to the major air and sea port facilities. The 6.7 acre estate comprises 2 buildings ranging from 19,200sq.ft. to 20,000sq.ft. <br><br><b>** Estates are fitted with electricity, water and telecoms amenities.</b>',
					facts: '',
					type: 'building',
					latitude: 14.026444307766045,
					longitude: -60.95962643623352
				},
				{
					thumbnail: 'img/industrial_estates/bisee_thb.jpg',
					title: 'Bisee Industrial Estate (BE)',
					info: 'As the name suggest the estate is located at Bisee and is within a 5-minute drive from the Capital Castries. This places it in close proximity to the major air and sea port facilities. The 4.5 acre estate comprises 6 buildings ranging from 3,500sq.ft. to 20,000sq.ft. <br><br><b>** Estates are fitted with electricity, water and telecoms amenities.</b>',
					facts: '',
					type: 'building',
					latitude: 14.023701534432834,
          longitude: -60.9756338596344
				},
				{
					thumbnail: 'img/industrial_estates/odsan_thb.jpg',
					title: 'Odsan Industrial Estate (OD)',
					info: 'As the name suggest the estate is located at Odsan just outside the city circuit. It is within a 10-minute drive from the south of the Capital Castries. This places it in close proximity to the major air and sea port facilities. The 42 acre estate comprises 7 buildings ranging from 9,800sq.ft. to 24,800sq.ft. <br><br><b>** Estates are fitted with electricity, water and telecoms amenities.</b>',
					facts: '',
					type: 'building',
					latitude: 13.975872086041315,
          longitude: -60.986233949661255
				},
				{
					thumbnail: '',
					title: 'Dennery Industrial Estate (DY)',
					info: 'As the name suggest the estate is located at Dennery and is within a 30 minute drive south from the Capital Castries and approximately the same distance from the southern city of Vieux Fort.  Access to the north and south air and sea ports facilities is easy via a modern road network. The 17 acre estate comprises 4 buildings ranging from 1,800sq.ft. to 13,800sq.ft. <br><br><b>** Estates are fitted with electricity, water and telecoms amenities.</b>',
					facts: '',
					type: 'building',
					latitude: 13.910662501726149,
          longitude: -60.90193212032318
				},
				{
					thumbnail: '',
					title: 'Beauchamp Industrial Estate (BP)',
					info: 'The estate is located in Beauchamp, quarter of Micoud and is within a 15-minute distance from the southern city of Vieux Fort.  Access to the southern air and sea port facilities is easy via a modern road network. The 22 acre estate comprises 1 building. <br><br><b>** Estates are fitted with electricity, water and telecoms amenities.</b>',
					facts: '',
					type: 'building',
					latitude: 13.81749416987557,
          longitude: -60.91412544250488
				},
				{
					thumbnail: 'img/industrial_estates/hewanorra_freezone_thb.jpg',
					title: 'Hewanorra Airport Freezone (HF)',
					info: 'The estate is located in Vieux Fort and is within walking distance from the international airport and 5 minutes from the Vieux Fort Sea Port.  The 6.3 acre estate comprises 4 buildings ranging from 8,400sq.ft. to 36,800sq.ft. <br><br><b>** Estates are fitted with electricity, water and telecoms amenities.</b>',
					facts: '',
					type: 'building',
					latitude: 13.739062009006863,
          longitude: -60.94961643218994
				},
				{
					thumbnail: '',
					title: 'Vieux Fort Freezone (VFF)',
					info: 'The estate is located in Vieux Fort and is within 5 minute distance from the international airport and Vieux Fort Sea Port. The 120 acre estate comprises 9 buildings ranging from 9,600sq.ft. to 20,000sq.ft. <br><br><b>** Estates are fitted with electricity, water and telecoms amenities.</b>',
					facts: '',
					type: 'building',
					latitude: 13.750004702726572,
          longitude: -60.9736704826355
				},
				{
					thumbnail: 'img/industrial_estates/vieux_fort_thb.jpg',
					title: 'Vieux Fort Industrial Estate (VFI)',
					info: 'The estate is located in Vieux Fort and is within 5 minute distance from the international airport and Vieux Fort Sea Port. The 15.4 acre estate comprises 9 buildings ranging from 6,000sq.ft. to 10,000sq.ft. <br><br><b>** Estates are fitted with electricity, water and telecoms amenities.</b>',
					facts: '',
					type: 'building',
					latitude: 13.740927513887168,
          longitude: -60.97138524055481
				}
				
			];
			var property_markers = [];
			var markers = [];
			
function loadMap() {
  if (GBrowserIsCompatible()) {
    
    map = new GMap2(document.getElementById("StLuciaMap"));
    map.enableContinuousZoom();
		map.enableScrollWheelZoom();
//    alert(document.getElementById("StLuciaMap"));
    map.setCenter(new GLatLng(13.919405039068674, -60.96038818359375), 10, G_HYBRID_MAP);
    map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		loadMarkers();
  }
}
			function loadMarkers(){
//				alert('load markers');
				for (var i=0;i<property_data.length;i++){
					property_data[i].labels = [];
					property_data[i].htmls = [];
					if (property_data[i]['info']) {
		  			property_data[i].labels[property_data[i].labels.length] = 'Info';
						var info = '<div style="width:250px;">';
			      info += '<div>';
			      info += '<div style="font-weight:bold;padding:2px;">' + property_data[i]['title'] + '</div>';
			      info += '<div style="padding:2px;">';
						if (property_data[i]['thumbnail']) {
					  	info += '<img src="' + property_data[i]['thumbnail'] + '" width="90px" height="70px" style="float:left;padding: 0px 2px 2px 0px;border:0px solid #000000;">';
					  }
						info += property_data[i]['info'] + '</div>';
			      info += '</div>';
			      info += '</div>';
						property_data[i].htmls[property_data[i].htmls.length] = info;
		  		}
					if (property_data[i]['facts']) {
						property_data[i].labels[property_data[i].labels.length] = 'Facts';
			      var facts = '<div>';
			      facts += '<div style="width:250px;">';
			      facts += '<div style="padding:2px;">' + property_data[i]['facts'] + '</div>';
			      facts += '</div>';		
						property_data[i].htmls[property_data[i].htmls.length] = facts;
					}
					
	        if (property_data[i].latitude && property_data[i].longitude && property_data[i].htmls.length > 0){
	    		  point = new google.maps.LatLng(property_data[i].latitude,property_data[i].longitude);
	          placeMarker(i,point,property_data[i].labels,property_data[i].htmls);
	        }
	      }
			}
			function getIconOptions(type){
				type = type || 'building';
				var new_icon = new GIcon();
				new_icon.image = "http://www.investstlucia.com/files/map_icons/" + type + ".png";
				new_icon.shadow = "http://www.investstlucia.com/files/map_icons/shadow.png";
				new_icon.size = new GSize(21,31);
				new_icon.iconAnchor = new GPoint(8,9);
				new_icon.infoWindowAnchor = new GPoint(7,7);
				 
				var opt;
				opt = {};  
				 
				opt.icon = new_icon;
				opt.draggable = false;
				opt.clickable = true;
				opt.dragCrossMove = true;
				
				return opt;
			}
			function placeMarker(index,point,labels,htmls){
		    property_markers[index] = createTabbedMarker(index,point,htmls,labels);
		    map.addOverlay(property_markers[index]);
		  }
			function createTabbedMarker(index,point,htmls,labels) {
				var options = getIconOptions(property_data[index]['type']);
		    markers[index] = new google.maps.Marker(point,options);
		    google.maps.Event.bind(markers[index], "click", this, function() {
		      
		      // adjust the width so that the info window is large enough for this many tabs
		      if (property_data[index].htmls.length > 2) {
		        property_data[index].htmls[0] = '<div style="width:'+property_data[index].htmls.length*88+'px">' + property_data[index].htmls[0] + '</div>';
		      }else{
						property_data[index].htmls[0] = '<div style="width:260px">' + property_data[index].htmls[0] + '</div>';
					}
		    
		      tabs = [];
		      for (var i=0; i<property_data[index].htmls.length; i++) {
		        tabs.push(new google.maps.InfoWindowTab(property_data[index].labels[i],property_data[index].htmls[i]));
		      }
		      markers[index].openInfoWindowTabsHtml(tabs);
		    });
		    return markers[index];
		  }