// Ustawia inputy wg pozycji markera.		
function setMarkerPosInputs(prefix, overlay, point) {
    if (!point) {
        point = marker.getPoint();
    } else {
        marker.setPoint(point);
    }
    setVal(prefix + 'latitude', point.lat());
    setVal(prefix + 'longitude', point.lng());
    map.panTo(point);
}

function setMarkerPos(overlay, point) {
    setMarkerPosInputs('sighting_', overlay, point)
}

function setMarkerPosForUser(overlay, point) {
    setMarkerPosInputs('user_', overlay, point)
}

// Wywoluje dymek dla danego markera
function showMarkerPopup(marker) {
    marker.openInfoWindow(marker.html);
}

var baseIcon;
if (typeof(GIcon) != "undefined") {
	baseIcon = new GIcon();
	baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
	baseIcon.iconSize = new GSize(20, 34);
	baseIcon.shadowSize = new GSize(37, 34);
	baseIcon.iconAnchor = new GPoint(9, 34);
	baseIcon.infoWindowAnchor = new GPoint(9, 2);
	baseIcon.infoShadowAnchor = new GPoint(18, 25);
}

function zoomAt(x, y) {
   map.setCenter(new GLatLng(x,y), 17);
}
