    //<![CDATA[

    var locations = {};

	function loadsimplemap() 
	{
      var map = new GMap2(document.getElementById("map"));
	  var focus=document.getElementById("addressfocus").value;
	  var x=parseFloat(document.getElementById("x"+focus).value);
	  var y=parseFloat(document.getElementById("y"+focus).value);
      map.setCenter(new GLatLng(x, y), 15);
        //var customUI = map.getDefaultUI();
		var customUI = new GMapUIOptions();
customUI.maptypes = {};
customUI.zoom = {};
customUI.controls = {};
customUI.maptypes.normal = true;
customUI.maptypes.hybrid = false;
customUI.zoom.doubleclick = true;
customUI.zoom.scrollwheel = false;
customUI.controls.largemapcontrol3d = true;
customUI.controls.menumaptypecontrol = false;
map.setUI(customUI);
        //Remove MapType.G_HYBRID_MAP;
      /*  customUI.maptypes = false;
        customUI.maptypes.normal = true;
        //customUI.maptypes = "G_NORMAL_MAP ";
		//map.setMapType("G_NORMAL_MAP");
        map.setUI(customUI);*/
	//	map.disableScrollWheelZoom();

	  var geocoder = new GClientGeocoder();
        //for (var i=1;i<=document.getElementById("addressmax").value;i++) 
		{
			if(document.getElementById("address"+focus)!=null)
			{
				var address = document.getElementById("address"+focus).value;
				function showAddress(address,id) 
				{
					point=new GLatLng(parseFloat(document.getElementById("x"+id).value),parseFloat(document.getElementById("y"+id).value));
					var blueIcon = new GIcon(G_DEFAULT_ICON);
					var title = address;
					blueIcon.image = "/img/map/h"+id+".png";
					blueIcon.iconSize = new GSize(133, 80);
					blueIcon.iconAnchor = new GPoint(65, 80);
					blueIcon.shadow =null;
					markerOptions = {icon:blueIcon,title:title};
					var marker = new GMarker(point, markerOptions);		  
					map.addOverlay(marker);
				}
				showAddress(address,focus);
			}
		}
    }
 
  /* function TextualZoomControl() {
    }
    TextualZoomControl.prototype = new GControl();

    // Creates a one DIV for each of the buttons and places them in a container
    // DIV which is returned as our control element. We add the control to
    // to the map container and return the element for the map class to
    // position properly.
    TextualZoomControl.prototype.initialize = function(map) {
      var container = document.createElement("div");

      var zoomInDiv = document.createElement("div");
      this.setButtonStyle1_(zoomInDiv);
      container.appendChild(zoomInDiv);
      zoomInDiv.appendChild(document.createTextNode(""));
      GEvent.addDomListener(zoomInDiv, "click", function() {
        map.zoomIn();
      });
      GEvent.addDomListener(zoomInDiv, "mouseover", function() {
        zoomInDiv.style.background= "url(/img/map_plus_hover.png) no-repeat";
      });
      GEvent.addDomListener(zoomInDiv, "mouseout", function() {
        zoomInDiv.style.background= "url(/img/map_plus.png) no-repeat";
      });
	  
      var zoomOutDiv = document.createElement("div");
      this.setButtonStyle2_(zoomOutDiv);
      container.appendChild(zoomOutDiv);
      zoomOutDiv.appendChild(document.createTextNode(""));
      GEvent.addDomListener(zoomOutDiv, "click", function() {
        map.zoomOut();
      });
      GEvent.addDomListener(zoomOutDiv, "mouseover", function() {
        zoomOutDiv.style.background= "url(/img/map_minus_hover.png) no-repeat";
      });
      GEvent.addDomListener(zoomOutDiv, "mouseout", function() {
        zoomOutDiv.style.background= "url(/img/map_minus.png) no-repeat";
      });
      map.getContainer().appendChild(container);
      return container;
    }

    // By default, the control will appear in the top left corner of the
    // map with 7 pixels of padding.
    TextualZoomControl.prototype.getDefaultPosition = function() {
      return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(7, 7));
    }

    // Sets the proper CSS for the given button element.
    TextualZoomControl.prototype.setButtonStyle1_ = function(button) {
      button.style.background = "url(/img/map_plus.png) no-repeat";
      button.style.width = "38px";
      button.style.height = "38px";
      button.style.cursor = "pointer";
      button.style.margin = "2px";
    }
    // Sets the proper CSS for the given button element.
    TextualZoomControl.prototype.setButtonStyle2_ = function(button) {
      button.style.background = "url(/img/map_minus.png) no-repeat";
      button.style.width = "38px";
      button.style.height = "38px";
      button.style.cursor = "pointer";
      button.style.margin = "2px";}	*/
    //]]>
	
function ShowPlaceonMap()
{
	document.getElementById("slideshow").value=0;
	var arrayPageSize = getPageSize();
	var arrayPageScroll = getPageScroll();
	var obj=document.getElementById("googlemapabsolute");
	if (obj) {
		obj.style.top = (arrayPageScroll[1] + ((arrayPageSize[3] - 350) / 2) + 'px');
		obj.style.left = (((arrayPageSize[0] - 20 - 740) / 2) + 'px');
		obj.style.display = 'block';		
		obj.style.visibility = 'visible';		
	}	
	var bgobj=document.getElementById("bggooglemap");
	if (bgobj) {
		bgobj.style.top = "0px";
		bgobj.style.width = (arrayPageSize[2]  + 'px');
		bgobj.style.left = "0px";
		bgobj.style.height = (arrayPageSize[0] + 'px');
		bgobj.style.display = 'block';		
		bgobj.style.visibility = 'visible';		
		document.body.style.overflowX='hidden';
	}
	else alert('no');
	load_sauna();
}
function HidePlaceonMap()
{

	var obj=document.getElementById("googlemapabsolute");
	if (obj) {
		obj.style.top = "-400px";
		obj.style.visibility = 'hidden';		
	}		
	var bgobj=document.getElementById("bggooglemap");
	if (bgobj) {
		bgobj.style.top = "-400px";
		bgobj.style.width = "1px";
		bgobj.style.height = "1px";
		bgobj.style.visibility = 'hidden';		
	}	
	document.body.style.overflowX='auto';
}

    function simplemap() {
      if (GBrowserIsCompatible()) {
		var adress=document.getElementById("adressmap").value;
        var map = new GMap2(document.getElementById("map"));
		var geocoder = new GClientGeocoder();
        function showAddress(address) {
          geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              //alert(address + " not found");
              document.getElementById("map").style.display = 'none';
            } else {
			        // Create our "tiny" marker icon
			 var blueIcon = new GIcon(G_DEFAULT_ICON);
			 blueIcon.image = "/img/map/h1.png";
			  blueIcon.iconSize = new GSize(133, 80);
			  blueIcon.iconAnchor = new GPoint(73, 75);		     
			 // Set up our GMarkerOptions object
			  markerOptions = { icon:blueIcon };
              map.setCenter(point, 16);
			  var marker = new GMarker(point, markerOptions);
              
		    GEvent.addListener(marker, "click", function() {
			var adr=document.getElementById("adressmap").value;
            marker.openInfoWindowHtml(adr);
          });
		  map.addOverlay(marker);//marker.openInfoWindowHtml(adress);
            }
          }
          );

        } 

		showAddress(adress);
      }
    }
var map;
function simpleyandexmap () {
  map = new YMaps.Map( document.getElementById("map") );
  map.removeAllOverlays();  
  var place=document.getElementById("adressmap").value;
 var geocoder = new YMaps.Geocoder(place, {results: 1, boundedBy: map.getBounds()});
 YMaps.Events.observe(geocoder, geocoder.Events.Load, function () {
  
  if (this.length()) {
  var geoPoint=this.get(0).getGeoPoint();
  var s = new YMaps.Style();
    s.iconStyle = new YMaps.IconStyle();
    s.iconStyle.offset = new YMaps.Point(-31,-34);
    s.iconStyle.href = "http://oddo-arh.ru/img/img.png";
    s.iconStyle.size = new YMaps.Point(63, 34);
  
  map.setCenter(new YMaps.GeoPoint(geoPoint.getLng(),geoPoint.getLat() ), 15, YMaps.MapType.MAP);
 var placemark = new YMaps.Placemark(new YMaps.GeoPoint(geoPoint.getLng(),geoPoint.getLat() ),{style: s});
	placemark.name = place;
	//placemark.description = "Описание";
	map.addOverlay(placemark); 
 /* map.addControl(new YMaps.TypeControl());
  map.addControl(new YMaps.ToolBar());*/
  map.addControl(new YMaps.Zoom());
/*  map.addControl(new YMaps.MiniMap());
  map.addControl(new YMaps.ScaleLine());*/

  map.addOverlay(placemark);
  this.get(0).setBalloonContent(this.get(0).text);
 // this.get(0).openBalloon();

    } else {
    alert("Ничего не найдено")
      }
});
}
