code: function(geometry) {
          var intersect = false;
          var i, len;
          if(geometry.CLASS_NAME == "OpenLayers.Geometry.Point") {
              intersect = this.containsPoint(geometry);
          } else if(geometry.CLASS_NAME == "OpenLayers.Geometry.LineString" ||
                    geometry.CLASS_NAME == "OpenLayers.Geometry.LinearRing") {
              // check if rings/linestrings intersect
              for(i=0, len=this.components.length; i<len; ++i) {
                  intersect = geometry.intersects(this.components[i]);
                  if(intersect) {
                      break;
                  }
              }
              if(!intersect) {
                  // check if this poly contains points of the ring/linestring
                  for(i=0, len=geometry.components.length; i<len; ++i) {
                      intersect = this.containsPoint(geometry.components[i]);
                      if(intersect) {
                          break;
                      }
                  }
              }
          } else {
              for(i=0, len=geometry.components.length; i<len; ++ i) {
                  intersect = this.intersects(geometry.components[i]);
                  if(intersect) {
                      break;
                  }
              }
          }
          // check case where this poly is wholly contained by another
          if(!intersect && geometry.CLASS_NAME == "OpenLayers.Geometry.Polygon") {
              // exterior ring points will be contained in the other geometry
              var ring = this.components[0];
              for(i=0, len=ring.components.length; i<len; ++i) {
                  intersect = geometry.containsPoint(ring.components[i]);
                  if(intersect) {
                      break;
                  }
              }
          }
          return intersect;
      }
docs: APIMethod: intersects
  Determine if the input geometry intersects this one.
  
  Parameters:
  geometry - {<OpenLayers.Geometry>} Any type of geometry.
  
  Returns:
  {Boolean} The input geometry intersects this one.