code: function(element, name) {
          var names = element.className;
          if(names) {
              element.className = OpenLayers.String.trim(
                  names.replace(
                      new RegExp("(^|\\s+)" + name + "(\\s+|$)"), " "
                  )
              );
          }
          return element;
      }
docs: Function: removeClass
  Remove a CSS class name from an element.  Safe where element does not
  have the class name.
  
  Parameters:
  element - {DOMElement} A DOM element node.
  name - {String} The CSS class name to remove.
  
  Returns:
  {DOMElement} The element.