code: def buildhtmlheader(self):
          
          
          if self.drilldown_flag:
              self.add_JSsource('http://code.highcharts.com/modules/drilldown.js')
  
  
  
          if self.offline:
              opener = urllib.request.build_opener()
              opener.addheaders = [('User-Agent', 'Mozilla/5.0')]
  
              self.header_css = [
                  '<style>%s</style>' % opener.open(h).read() for h in self.CSSsource
              ]
  
              self.header_js = [
                  '<script type="text/javascript">%s</script>' % opener.open(h).read() for h in self.JSsource
              ]
          else:
              self.header_css = [
                  '<link href="%s" rel="stylesheet" />' % h for h in self.CSSsource
              ]
  
              self.header_js = [
                  '<script type="text/javascript" src="%s"></script>' % h for h in self.JSsource
              ]
  
          self.htmlheader = ''
          for css in self.header_css:
              self.htmlheader += css
          for js in self.header_js:
              self.htmlheader += js
docs: generate HTML header content