You need to declare the map variable globally. The function changeMarkerPos cannot currently use it.
var map;
function initialize() {
var brooklyn = new googl............
EDIT - The following will not make any difference this time. setCenter() is useful but not the answer to your question.
I was doing something similar earlier this week and used map.setCenter(); What about this:
function changeMarkerPos(lat, lon){
myLatLng = new google.maps.LatLng(lat, lon);
marker.setPosition(myLatLng);
map.panTo(myLatLng);
map.setCenter(myLatLng);
}