
var GoogleMap = null; 




function addMarker(address)
{
	$('#map_canvas').css('height','0px');
	var geocoder = new google.maps.Geocoder();
	
	geocoder.geocode
	(
		{'address': address},
		function(results, status)
		{
			/*var icon = '/images/map/ges_map_icon.png';
			//var icon = '/images/map/veneto.png';
			if(image != "")
				icon = image; 
			*/

			if (status == google.maps.GeocoderStatus.OK)
			{
				/*START INITIALIZE MAP*/
				var zoom = 15;
				var center = results[0].geometry.location;
				
				var myOptions =
				{
					zoom: zoom,
					center: center,
					mapTypeId: google.maps.MapTypeId.ROADMAP
					,scrollwheel:true
				}
				GoogleMap = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
				/*END INITIALIZE MAP*/
				
				
				var marker = new google.maps.Marker({
					position: results[0].geometry.location,
					map: GoogleMap,
					//title: tooltip,
					clickable: true,
					//icon: 'http://google-maps-icons.googlecode.com/files/factory.png'
					//icon: icon
					//icon: '/images/ges_map_icon.png'
				});
				$('#map_canvas').css('height','700px');
				
				/*
				var infowindow = new google.maps.InfoWindow({  
					content: description  
				});
				*/
				
				/*
				google.maps.event.addListener(
					marker,
					'click', 
					function()
					{  
						infowindow.open(GoogleMap, marker);  
					}
				);*/
			}
			else
			{
				//alert("Problema nella ricerca dell'indirizzo: " + status);
			}
		}
	);
	
}
	
