// JavaScript Document
				
		var geocoder = new GClientGeocoder();
		function displayPoint(map, markers, marker, index){
			if ($('#map_message').is(':hidden')) {//Allow toggling of markers
				$('#map_message').fadeIn();
			}
			else{//Remove all .active classes and hide markers
				$('#map_message').hide();
				$(".active").removeClass();
			}
			//$("#map_message").hide();//Default behaviour, doesn't allow toggling
			
			var moveEnd = GEvent.addListener(map, "moveend", function(){
				var markerOffset = map.fromLatLngToDivPixel(marker.getLatLng());
				$("#map_message")
					.html('<div class="xbtn"></div>' + markers[index][0])//Use information from array
					.fadeIn()
					.css({ top:markerOffset.y, left:markerOffset.x });
			GEvent.removeListener(moveEnd);
			});
			map.panTo(marker.getLatLng());
		}	
		
		function setActive(el){
			$(".active").removeClass();//Remove all .active classes
			$("#map_list").find('li').eq(el).addClass('active');//Find list element equal to index number and set active
			$(el).addClass('active');//Set active if list element clicked directly
		}
		
		function configureOverlays($this, map, markers, mark, i, delayTime)
		{
			//setTimeout(function(){ 
				map.addOverlay(mark);
		/*==========================================================
						configureOverlays-List Setup
		==========================================================*/
		
				//Declared variables of the array. Label:property name, Statelabel:State
				var label = markers[i][1];
				var stateLabel = markers[i][3];
				
				//var orderingByState = typeof(markers[i][2]);
					
					//if(orderingByState == "object")
					//{
						// Populate state using variable
						
						// hide blank entrie function
						if(stateLabel == ""){
							$("<li />")
							.html(stateLabel)//Use list item label from array
							.css({'display' : 'none'})
							.appendTo("#map_list");
						}
						else
						{
							$("<li />")
								.html(stateLabel)//Use list item label from array
								.css({ 'color' : '#3b73a9', 'background' : '#f5f5f5', 'font-weight' : 'bold', 'cursor' : 'default', 'display' : 'block', 'width' : '510px'})
								.appendTo("#map_list");	
						}
						
						// Populate property using variables
						$("<li />")
							.html(label)//Use list item label from array
							.css({ 'width' : '162px', 'padding-bottom' : '10px' , 'padding-top' : '10px'})
							.click(function(){
								displayPoint(map, markers, mark, i);
								setActive(this);//Show active state
								
							})
						.appendTo("#map_list");
					//}
					//else
					//{
						//alert('The city of ');
											 
					//}
				
						
											 
					
					
		/* ======================================================== 
					//configureOverlays-Overlay Events
		   ========================================================	*/		
			
				GEvent.addListener(mark, "click", function(){
					displayPoint(map, markers, mark, i);
					setActive(i);//Show active location
				});
				
				displayPoint(map, markers, mark, i);
				setActive(i);//Show active location
				if (i == (markers.length - 1)) {//If last item in array
					//setTimeout(function(){//Remove active class and fade marker after delay
					$("#map_message").fadeOut(3500);
						//setActive();
					//}, 3500);
				}
			//}, delayTime); 		
		}
		$(document).ready(function(){ //Start script when ready
				   
			if (document.getElementById("map_canvas")) {//Checks to see that the page element exists and to prevent conflict with other maps
				
				//Default map center location
				var defaultLat = 39.57182223734374;
				var defaultLon = -100.01953125;
				
				
				
				var markers = new Array();
markers[0] = ["<strong>Sea and Breeze Beach Club</strong><br/>16 Tybrisa Street, Tybee Island, Georgia, United States, 31328 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/seaandbreezebeachclub.aspx\">View Property</a>", "Sea and Breeze Beach Club", (new GMarker(new GLatLng(32.0002152,-80.845666))),"Georgia"];

markers[1] = ["<strong>Crow Creek Golf Resort</strong><br/>395 S. Crow Drive, Calabash, North Carolina, United States, 28467 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/crowcreekgolfresort.aspx\">View Property</a>", "Crow Creek Golf Resort", (new GMarker(new GLatLng(33.8907278,-78.5683446))),"North Carolina"];

markers[2] = ["<strong>Pirate's Cove</strong><br/>Pirates Cove, 1015 Pirates Way Manteo, NC 27954<br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/PiratesCove.aspx\">View Property</a>", "Pirate's Cove", (new GMarker(new GLatLng(35.897789,-75.640177))),""];

markers[3] = ["<strong>Shallowbag Bay Club</strong><br/>102 North Bay Club Drive, Manteo, NC 27954 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/shallowbagbayclub.aspx\">View Property</a>", "Shallowbag Bay Club", (new GMarker(new GLatLng(35.898947,-75.667258))),""];

markers[4] = ["<strong>Hughes Retreat</strong><br/>2010 South Virginia Dare Trail, Kill Devil Hills, NC 27948<br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/Hughes Retreat.aspx\">View Property</a>", "Hughes Retreat", (new GMarker(new GLatLng(35.9962854,-75.6467599))),""];

/*markers[2] = [ "<strong>Arrowhead Pointe</strong><br/>1141 Peace Pipe Lane, Myrtle Beach, South Carolina, United States, 29579 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/arrowheadpointe.aspx\">View Property</a>", "Arrowhead Pointe", (new GMarker(new GLatLng(33.6890603,-78.8866943))),"South Carolina" ];*/

markers[5] = ["<strong>Baynard Cove</strong><br/>16 Baynard Cove Road, Hilton Head, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/baynardcove.aspx\">View Property</a>", "Baynard Cove", (new GMarker(new GLatLng(32.117356,-80.8088075))),"South Carolina"];
markers[6] = ["<strong>Beach Club at Montego</strong><br/>1307 S. Ocean Blvd., Myrtle Beach, South Carolina, United States, 29577 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/beachclubatmontego.aspx\">View Property</a>", "Beach Club at Montego", (new GMarker(new GLatLng(33.674332,-78.8995039))),""];

markers[7] = [/* "<strong>Berkshire Forest</strong><br/>600 Heathrow Drive, Myrtle Beach, South Carolina, United States, 29579 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/berkshireforest.aspx\">View Property</a>", "Berkshire Forest", (new GMarker(new GLatLng(33.740767,-78.9026109))),"" */];

markers[8] = ["<strong>Broad Creek Landing</strong><br/>22 Quartermaster Lane, Hilton Head Island, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/broadcreeklanding.aspx\">View Property</a>", "Broad Creek Landing", (new GMarker(new GLatLng(32.1652331,-80.7823231))),""];
markers[9] = ["<strong>Coligny Villas</strong><br/>22 Quartermaster Lane, Hilton Head Island, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/colignyvillas.aspx\">View Property</a>", "Coligny Villas", (new GMarker(new GLatLng(32.1652331,-80.7823231))),""];

markers[10] = [/* "<strong>Courtside Villas</strong><br/>15 Deallyon Rd., Hilton Head Island, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/courtsidevillas.aspx\">View Property</a>", "Courtside Villas", (new GMarker(new GLatLng(32.216316,-80.752608))),"" */];

markers[11] = ["<strong>Fiddler's Cove</strong><br/>35 Folly Field Road, Hilton Head, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/fiddlerscove.aspx\">View Property</a>", "Fiddler's Cove", (new GMarker(new GLatLng(32.2028446,-80.6941209))),""];
markers[12] = ["<strong>Forest Garden</strong><br/>125 Cordillo Parkway, Hilton Head, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/forestgarden.aspx\">View Property</a>", "Forest Garden", (new GMarker(new GLatLng(32.14108,-80.762022))),""];
markers[13] = ["<strong>Harbourgate Resort and Marina</strong><br/>1000 2nd Avenue South, North Myrtle Beach, South Carolina, United States, 29582 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/harbourgateresortandmarina.aspx\">View Property</a>", "Harbourgate Resort and Marina", (new GMarker(new GLatLng(33.826581,-78.683506))),""];
markers[14] = ["<strong>Hilton Head Beach Club</strong><br/>22 Deallyon Ave., Hilton Head Island, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/hiltonheadbeachclub.aspx\">View Property</a>", "Hilton Head Beach Club", (new GMarker(new GLatLng(32.216316,-80.752608))),""];
markers[15] = ["<strong>Hilton Head Resort</strong><br/>663 William Hilton Parkway, Hilton Head, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/hiltonheadresort.aspx\">View Property</a>", "Hilton Head Resort", (new GMarker(new GLatLng(32.191222,-80.709515))),""];
markers[16] = ["<strong>International Club Villas</strong><br/>719 Shearwater, Murrells Inlet, South Carolina, United States, 29576 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/internationalclubvillas.aspx\">View Property</a>", "International Club Villas", (new GMarker(new GLatLng(33.5510021,-79.0414261))),""];
markers[17] = ["<strong>Island Beach and Tennis Resort</strong><br/>40 Folly Field Rd., Hilton Head Island, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/islandbeachandtennisresort.aspx\">View Property</a>", "Island Beach and Tennis Resort", (new GMarker(new GLatLng(32.202867,-80.692504))),""];
markers[18] = ["<strong>Island House</strong><br/>25 Deallyon Ave, Hilton Head, South Carolina, United States, 29928-7033 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/islandhouse.aspx\">View Property</a>", "Island House", (new GMarker(new GLatLng(32.164761,-80.754698))),""];
markers[19] = ["<strong>Myrtle Beach Resort</strong><br/>5905 South Kings Highway, Myrtle Beach, South Carolina, United States, 29575 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/myrtlebeachresort.aspx\">View Property</a>", "Myrtle Beach Resort", (new GMarker(new GLatLng(33.633237,-78.957495))),""];
markers[20] = ["<strong>Seascape Condominiums</strong><br/>42 South Forest Beach Dr., Hilton Head, South Carolina, United States, 29938 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/seascapecondominiums.aspx\">View Property</a>", "Seascape Condominiums", (new GMarker(new GLatLng(32.1395435,-80.758653))),""];
markers[21] = ["<strong>Seaside Villas</strong><br/>23 South Forest Beach Dr., Hilton Head Island, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/seasidevillas.aspx\">View Property</a>", "Seaside Villas", (new GMarker(new GLatLng(32.1407277,-80.7557272))),""];
markers[22] = ["<strong>Shorewood Condominium</strong><br/>21 South Forest Beach Drive, Hilton Head Island, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/shorewoodcondominiums.aspx\">View Property</a>", "Shorewood Condominium", (new GMarker(new GLatLng(32.1409171,-80.7552761))),""];
markers[23] = ["<strong>The Breakers</strong><br/>4 N. Forest Beach Dr., Hilton Head Island, South Carolina, United States, 29928 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/thebreakers.aspx\">View Property</a>", "The Breakers", (new GMarker(new GLatLng(32.1429025,-80.7504489))),""];

markers[24] = [/* "<strong>Waterford</strong><br/>31 Shipyard Drive, Hilton Head, South Carolina, United States, 29926 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/waterford.aspx\">View Property</a>", "Waterford", (new GMarker(new GLatLng(32.155233,-80.7428568))),"" */];

markers[25] = ["<strong>Windsor Green</strong><br/>5011 Harvest Drive, Myrtle Beach, South Carolina, United States, 24572 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/windsorgreen.aspx\">View Property</a>", "Windsor Green", (new GMarker(new GLatLng(33.766306,-78.961721))),""];
markers[26] = ["<strong>River Oaks</strong><br/>1286 River Oaks Drive, Myrtle Beach, South Carolina, United States, 29579 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/riveroaks.aspx\">View Property</a>", "River Oaks", (new GMarker(new GLatLng(33.7331,-78.900983))),""];

markers[27] = ["<strong>Courtside Villas</strong><br/>15 Deallyon Road, Hilton Head, SC 29928<br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/courtsidevillas.aspx\">View Property</a>", "Courtside Villas", (new GMarker(new GLatLng(32.164761,-80.754698))),""];

markers[28] = ["<strong>English Mountain</strong><br/>1081 Cove Rd., Sevierville, Tennessee, United States, 37862 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/englishmountain.aspx\">View Property</a>", "English Mountain", (new GMarker(new GLatLng(35.883235,-83.3160174)))," Tennessee"];

markers[29] = ["<strong>Gatlinburg Towers</strong><br/>413 Baskins Creek Road , Gatlinburg, Tennessee, United States, 37738 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/gatlinburgtowers.aspx\">View Property</a>", "Gatlinburg Towers", (new GMarker(new GLatLng(35.7087966,-83.5107989))),""];
markers[30] = ["<strong>Serenity Point Condos</strong><br/>1070 Alpine Drive, Sevierville, Tennessee, United States, 37876 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/serenitypointcondos.aspx\">View Property</a>", "Serenity Point Condos", (new GMarker(new GLatLng(35.88038,-83.3198412))),""];
markers[31] = ["<strong>Summit of Gatlinburg</strong><br/>1260 Ski View Dr., Gatlinburg, Tennessee, United States, 37738 <br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/summitofgatlinburg.aspx\">View Property</a>", "Summit of Gatlinburg", (new GMarker(new GLatLng(35.7053251,-83.5614885))),""];

markers[32] = ["<strong>The Olds</strong><br/>203 E. Aviation Drive Kill Devil Hills, NC 27948<br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/TheOlds.aspx\">View Property</a>", "The Olds", (new GMarker(new GLatLng(36.0153419,-75.659411))),""];


markers[33] = ["<strong>Colington Pointe</strong><br/>109C Colington Point Circle, Kill Devil Hills, NC 27948<br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/ColingtonPointe.aspx\">View Property</a>", "Colington Pointe", (new GMarker(new GLatLng(36.0307226,-75.6760101))),""];

markers[34] = ["<strong>Windsong</strong><br/>4238 North Virginia Dare Trail, Kitty Hawk, NC 27949<br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/Windsong.aspx\">View Property</a>", "Windsong", (new GMarker(new GLatLng(36.0960961,-75.7086998))),""];

markers[35] = ["<strong>Sea Dunes</strong><br/>3836 N. Virginia Dare Trail, Kitty Hawk, NC 27949<br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/seadunes.aspx\">View Property</a>", "Sea Dunes", (new GMarker(new GLatLng(36.0960961,-75.7086998))),""];

markers[36] = ["<strong>The Ocean Winds</strong><br/>1212 S. Virginia Dare Trail, Kill Devil Hills, NC 27949<br/><a href=\"/Properties/PropertiesbyRegion/SoutheastUS/oceanwinds.aspx\">View Property</a>", "The Ocean Winds", (new GMarker(new GLatLng(36.0033342,-75.6509389))),""];





				var map = new google.maps.Map2($("#map_canvas").get(0));//Initialise google maps
				map.setCenter(new GLatLng(defaultLat, defaultLon), 6);//Set location to the default and zoom level to 8
				//map.disableDoubleClickZoom();//Disable zooming
				
				//=============================
					//Zoom Functionality
				//=============================
				var customUI = map.getDefaultUI();
        		customUI.maptypes.hybrid = false; // Remove MapType.G_HYBRID_MAP
        		map.setUI(customUI);
				map.setMapType(G_PHYSICAL_MAP);
				
				

				//=============================
				      //Functions Called
				//=============================
				$.each(markers,function(i,marker){
					var delayTime = ((i * 0) / (0.5 * markers.length));//Delay time decreases as number of markers increases
					var mark;
					
					var location = typeof(marker[2]);
					
					if(location == "object") //Only for Get Lat String (not in use anymore)
					{
						var mark = marker[2];
						configureOverlays(this, map, markers, mark, i, delayTime);
					}
					else
					{
						
						//geocoder.getLatLng(
						//	 marker[0]
						//	,function(point) {
						//		mark = new GMarker(point);
						//		configureOverlays(this, map, markers, mark, i, delayTime);
						//	}
						//);							 
					}
					
					
				});
			
				$("#map_list").css("opacity","0.2").animate({opacity: 1}, 1100);//Fade in menu
				$("#map_message").appendTo(map.getPane(G_MAP_FLOAT_SHADOW_PANE));
			}//End if map_canvas exists
			
			
			/* 
			================================
			  X hide #map_message config 
			================================
			*/	
			$("#map_message").click(function () { 
				$("#map_message").hide(); 
			});	
			
		}); //End onReady
		
		
