How to make Google Maps v3 API to center the map on one of the several open InfoWindow?

Such task: there are two offices of the company, in different cities. And dynamically, when the button is clicked I want to concentrate on that which is necessary. The bug (or my krivorukost) that if you open two of the balun, the map will be centered so that the last outdoor balun at the top left.
If a balun is all good. Thought to make a infoWindow.close() in the center, and it doesn't work, console error does not fall out.
Here is the code:
function initMaps() {
 var KOffLatLng = new google.maps.LatLng(50.4322014,30.514801),
 LOffLatLng = new google.maps.LatLng(51.4994914,-0.1331221);
 var mapOptions = {
 zoom: 17,
 center: KOffLatLng,
 mapTypeId: google.maps.MapTypeId.ROADMAP
};
 var map = new google.maps.Map(document.getElementById('mapCanvas'), mapOptions);
 var kyivOffice = new google.maps.Marker({
 position: KOffLatLng,
 map: map,
 title: 'title'
});
 var londonOffice = new google.maps.Marker({
 position: LOffLatLng,
 map: map,
 title: 'titile'
});
 var infoWindowK = new google.maps.InfoWindow({
 content: "holding...",
 maxWidth: 400
});
 var infoWindowL = new google.maps.InfoWindow({
 content: "holding2...",
 maxWidth: 400
 }); 
 infoWindowK.open(map,kyivOffice); 
 infoWindowL.open(map,londonOffice); 
}

 the function uses the loadscript() {
 var script = document.createElement("script");
 script.type = "text/javascript";
 script.src = "http://maps.googleapis.com/maps/api/js?key=МОЙКЛЮЧБЛАБЛАБЛА&sensor=false&callback=initMaps";
document.body.appendChild(script);
 }
September 26th 19 at 07:25

Find more questions by tags Google MapsJavaScript