code: function(element, name) {
          if(!OpenLayers.Element.hasClass(element, name)) {
              element.className += (element.className ? " " : "") + name;
          }
          return element;
      }
docs: Function: addClass
  Add a CSS class name to an element.  Safe where element already has
  the class name.
  
  Parameters:
  element - {DOMElement} A DOM element node.
  name - {String} The CSS class name to add.
  
  Returns:
  {DOMElement} The element.