docs: function adaptFrame2HeaderPosition(oldHeaderPos) {
          var position, frame, header;
  
          frame = W.getFrame();
          if (!frame) return;
  
          header = W.getHeader();
  
          // If no header is found, simulate the 'top' position
          // to better fit the whole screen.
          position = W.headerPosition || 'top';
  
          // When we move from bottom to any other configuration,
          // we need to move the header before the frame.
          if (oldHeaderPos === 'bottom' && position !== 'bottom') {
              W.getFrameRoot().insertBefore(W.headerElement, frame);
          }
  
          W.removeClass(frame, 'ng_mainframe-header-[a-z-]*');
          switch(position) {
          case 'right':
              W.addClass(frame, 'ng_mainframe-header-vertical-r');
              break;
          case 'left':
              W.addClass(frame, 'ng_mainframe-header-vertical-l');
              break;
          case 'top':
              W.addClass(frame, 'ng_mainframe-header-horizontal-t');
              if (header) W.getFrameRoot().insertBefore(header, frame);
              break;
          case 'bottom':
              W.addClass(frame, 'ng_mainframe-header-horizontal-b');
              if (header) {
                  W.getFrameRoot().insertBefore(header, frame.nextSibling);
              }
              break;
          }
      }