function Marker(B){var D=B.getElementsByTagName("position");if(D.length!=0){var A=parseFloat(D[0].getAttribute("lng"));var C=parseFloat(D[0].getAttribute("lat"));this.position=new GLatLng(C,A)}else{this.position=null}this.shown=false;this.info_shown=false;this.marker=null}function initMarker(B,A){Marker.prototype.map=B;Marker.prototype.photosPath=A}function createMarker(){var B=this.upper.position;var A=this.markerIcon;if(B==null){B=this.fallBack}if(A!=null){var D=createMarkerIcon(A)}this.upper.marker=new GMarker(B,{icon:D,title:this.name});var C=this;GEvent.addListener(this.upper.marker,"click",function(){if(C.upper.info_shown){C.hide()}else{C.upper.marker.openInfoWindowTabsHtml(C.toHtml())}});GEvent.addListener(this.upper.marker,"infowindowopen",function(){C.upper.info_shown=true});GEvent.addListener(this.upper.marker,"infowindowclose",function(){C.upper.info_shown=false})}function showMarker(){if(!this.upper.shown){this.upper.map.addOverlay(this.upper.marker);this.upper.shown=true}}function hideMarker(){if(this.upper.shown){this.upper.map.removeOverlay(this.upper.marker);this.upper.shown=false}if(this.upper.info_shown){this.upper.map.closeInfoWindow();this.upper.info_shown=false}}function goToMarker(){var A=this.upper.position;if(A==null){A=this.fallBack}this.upper.map.panTo(A);this.show();this.upper.marker.openInfoWindowTabsHtml(this.toHtml())}function toggleMarker(){if(this.upper.shown){this.show()}else{this.hide()}}function getOptionalProperty(B,A){var C=B.getElementsByTagName(A);if(C.length!=0){return C[0].firstChild.nodeValue}return null}function createMarkerIcon(A){var B=new GIcon();B.image=A.image;B.shadow=A.shadow;B.iconSize=new GSize(A.iw,A.ih);B.shadowSize=new GSize(A.sw,A.sh);B.iconAnchor=new GPoint(A.ax,A.ay);B.infoWindowAnchor=new GPoint(A.ix,A.iy);return B}