public function include_script($fn)
    {
        if (is_object($this->output) && $this->output->type == 'html') {
            $src = $this->resource_url($fn);
            $this->output->add_header(html::tag('script',
                array('type' => "text/javascript", 'src' => $src)));
        }
    }