    //<![CDATA[

    var map = null;
    var geocoder = null;

   function load(address) {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());

        geocoder = new GClientGeocoder();
      }
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " не найден на карте. Пожалуйста, отправьте нам сообщение об этой ошибке.");
            } else {
              map.setCenter(point, 15);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }

    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              alert(address + " не найден");
            } else {
              map.setCenter(point, 13);
              var marker = new GMarker(point);
              map.addOverlay(marker);
              marker.openInfoWindowHtml(address);
            }
          }
        );
      }
    }


    function mapWrite()
    {
		document.getElementById('loading').innerHTML = "<div id='cont_map'><img class='close' src='images/close.gif' onclick='document.getElementById(\"cont_map\").style.visibility=\"hidden\";'><div id='map'></div><form id='form_map' action=''><table><tr><td id='addres'><input type='text' name='address' value=''></td><td><input type='submit' id='submit' onclick='showAddress(document.getElementById(\"form_map\").address.value);return false;' value='Найти на карте' ></td></tr></table></form> </div><img src='images/loading.gif' alt='загрузка...'>";
 

    }


    //]]>
    
    window.onload = mapWrite;
    //window.onunload=GUnload();



function click_map(address)
{

	mapWrite();
	document.getElementById("cont_map").style.visibility="visible";
	document.getElementById("form_map").address.value = address;
	window.scrollTo(0,0);
	load(address);
}


document.onkeydown = register;

function register(e) {


  if(!e) e = window.event;

  var k = e.keyCode;

  if (e.ctrlKey && k==37) {

     try { location.href(document.getElementById("back").href);}
     catch(err){}

  }

  if (e.ctrlKey && k == 39) {

     try { location.href(document.getElementById("next").href);}
     catch(err){}

  }
 
}

