code: function(px) {
          var oldRelativePosition = this.relativePosition;
          this.relativePosition = this.calculateRelativePosition(px);
  
          OpenLayers.Popup.prototype.moveTo.call(this, this.calculateNewPx(px));
          
          //if this move has caused the popup to change its relative position, 
          // we need to make the appropriate cosmetic changes.
          if (this.relativePosition != oldRelativePosition) {
              this.updateRelativePosition();
          }
      }
docs: Method: moveTo
  Since the popup is moving to a new px, it might need also to be moved
  relative to where the marker is. We first calculate the new
  relativePosition, and then we calculate the new px where we will
  put the popup, based on the new relative position.
  
  If the relativePosition has changed, we must also call
  updateRelativePosition() to make any visual changes to the popup
  which are associated with putting it in a new relativePosition.
  
  Parameters:
  px - {<OpenLayers.Pixel>}