I am embedding an iframe google map inside a tab but when the user clicks on the tab the map is not centered to the marker.

http://bit.ly/UTHskS

After research i think that I need to use this code but I am not sure how to incorporate this in my theme.

Code:
var zoom = map.getZoom();
var center = map.getCenter();
map.checkResize();
map.setCenter(center,zoom);
Any help would be much appreciated.

Andy