	function HGmap() { }

    HGmap.prototype = {
		load: function() {
			if (GBrowserIsCompatible()) {
			    this.map = new GMap2(document.getElementById("map"));
				//<!-- office1 55.823671072201414 - 37.49558687210083 -->
				//<!-- office2 55.94457987805178 - 37.8678560256958 -->
				//<!-- between 55.888 - 37.652 -->
			    this.map.setCenter(new GLatLng(55.888, 37.652), 10);

				this.map.addControl(new GMapTypeControl());
				this.map.addControl(new GLargeMapControl());

				this.Icon1 = new GIcon();
				this.Icon1.image = "/map/icons/moscowi.png";
				this.Icon1.iconSize = new GSize(165, 42); //w,h
				this.Icon1.iconAnchor = new GPoint(82, 42);
				this.Icon1.shadow = "/map/icons/moscows.png";
				this.Icon1.shadowSize = new GSize(165, 42);

				this.Icon2 = new GIcon();
				this.Icon2.image = "/map/icons/korolevi.png";
				this.Icon2.iconSize = new GSize(53, 40); //w,h
				this.Icon2.iconAnchor = new GPoint(26, 40);
				this.Icon2.shadow = "/map/icons/korolevs.png";
				this.Icon2.shadowSize = new GSize(53, 40);
				GEvent.addListener(this.Icon2, "click", function() {
				    this.toKorolev();
				  });

				var marker1 = new GMarker(new GLatLng(55.94457987805178, 37.8678560256958), this.Icon1);
				var marker2 = new GMarker(new GLatLng(55.823671072201414, 37.49558687210083), this.Icon2);

				GEvent.bind(marker1, "click", this, this.toKorolev);
				GEvent.bind(marker2, "click", this, this.toMoscow);

				this.map.clearOverlays();

				this.map.addOverlay(marker1);
				this.map.addOverlay(marker2);
		      }
		},

		toMoscow: function() {
			this.map.setCenter(new GLatLng(55.823671072201414, 37.49558687210083), 16);
		},

		toKorolev: function() {
			this.map.setCenter(new GLatLng(55.94457987805178, 37.8678560256958), 16);
		}
    }
