//<![CDATA[

var map = null;
var geocoder = null;
var icon = null;
   function load() {
      if (GBrowserIsCompatible()) {
   		map = new GMap2(document.getElementById("map"));
		geocoder = new GClientGeocoder();
		//icon = new GIcon();

		map.addControl(new GLargeMapControl());
		map.addControl(new GMapTypeControl());
		map.enableContinuousZoom();
  GEvent.addDomListener(document.getElementById("map"), "DOMMouseScroll", wheelZoom); // Firefox
  GEvent.addDomListener(document.getElementById("map"), "mousewheel",     wheelZoom); // IE

 		//icon.image = "img/regal_marker.png";
		//icon.shadow = "img/regal_marker_shadow.png";
		//icon.iconSize = new GSize(34, 45);
		//icon.shadowSize = new GSize(50, 45);
		//icon.iconAnchor = new GPoint(9, 34);
		//icon.infoWindowAnchor = new GPoint(9, 2);
		//icon.infoShadowAnchor = new GPoint(18, 25);
		showAddress('41.13101335392204,14.774685502052307','<strong>Orsini Art Caf&egrave;</strong><br />Piazza Orsini<br>82100 Benevento');
      }
    }    
    function showAddress(address,values) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " not found");
            } else {
     		   map.setCenter(point, 16);
     		   marker = new GMarker(point);
			  infoTabs = [ new GInfoWindowTab("Info", "<div style=\"width:200px; height:20px;\">"+values+"</div>")];
			   GEvent.addListener(marker, "click", function() {
		 		 marker.openInfoWindowTabsHtml(infoTabs);
		       });
     		   map.addOverlay(marker);
			  marker.openInfoWindowTabsHtml(infoTabs);
            }
          }
        );
      }
	 // location.href="#map";
    }
function wheelZoom(a)
{
  if (a.detail) // Firefox
  {
    if (a.detail < 0)
    { map.zoomIn(); }
    else if (a.detail > 0)
    { map.zoomOut(); }
  }
  else if (a.wheelDelta) // IE
  {
    if (a.wheelDelta > 0)
    { map.zoomIn(); }
    else if (a.wheelDelta < 0)
    { map.zoomOut(); }
  }
}
    //]]>

