Q:

Center map in Google Maps during start-up

Need to center map on load to value set in string in location array.  When I try to run this, it renames the html file in browser with "London,New%20York".  Google Maps API works otherwise. 
Am I missing some funda here?
<script type="text/javascript">
            var geocoder = new google.maps.Geocoder();
            var map;
            var location = ["London", "New York"];
            var pos;

            function initialize()
            {
                google.maps.visualRefresh = true;
                getGeoCode();
                var mapOptions = {
                zoom: 8,
                center: pos,
                mapTypeId: google.maps.MapTypeId.ROADMAP
                }
                map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
             }

            function getGeoCode()
            {
                geocoder.geocode({'address': location[1]}, function(results, status){
                if(status == google.maps.GeocoderStatus.OK)
                {
                    pos = results[0].geometry.location;
                }
                else
                {
                    alert("Not found");
                }
              });
            }

            google.maps.event.addDomListener(window, 'load', initialize);
  </script>

A:

The problem is that "location" is a reserved word in javascript
when you set that to 
var location = ["London", "New York"];

You change the url of the page.
You also have a problem with the asynchronous behavior of the geocoder, you need to use the results in the callback function.  This works for me:
<script type="text/javascript">
            var geocoder = new google.maps.Geocoder();
            var map;
            var locations = ["London", "New York"];
            var pos;

            function initialize()
            {
                google.maps.visualRefresh = true;
                getGeoCode();
             }

            function getGeoCode()
            {
                geocoder.geocode({'address': locations[1]}, function(results, status){
                if(status == google.maps.GeocoderStatus.OK)
                {
                    pos = results[0].geometry.location;
                    var mapOptions = {
                      zoom: 8,
                      center: pos,
                      mapTypeId: google.maps.MapTypeId.ROADMAP
                    }
                    map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions);
                }
                else
                {
                    alert("Not found");
                }
              });
            }

            google.maps.event.addDomListener(window, 'load', initialize);
  </script>

