code: function(scale, closest) {
          var res = OpenLayers.Util.getResolutionFromScale(scale, 
                                                           this.baseLayer.units);
  
          var halfWDeg = (this.size.w * res) / 2;
          var halfHDeg = (this.size.h * res) / 2;
          var center = this.getCachedCenter();
  
          var extent = new OpenLayers.Bounds(center.lon - halfWDeg,
                                             center.lat - halfHDeg,
                                             center.lon + halfWDeg,
                                             center.lat + halfHDeg);
          this.zoomToExtent(extent, closest);
      }
docs: APIMethod: zoomToScale
  Zoom to a specified scale
  
  Parameters:
  scale - {float}
  closest - {Boolean} Find the zoom level that most closely fits the
  specified scale. Note that this may result in a zoom that does
  not exactly contain the entire extent.
  Default is false.