roundcubemail/program/include/rcmail_output_html.php
public function add_script($script, $position='head')
    {
        if (!isset($this->scripts[$position])) {
            $this->scripts[$position] = "\n" . rtrim($script);
        }
        else {
            $this->scripts[$position] .= "\n" . rtrim($script);
        }
    }
public function add_script($script, $position='head')
    {
        if (!isset($this->scripts[$position])) {
            $this->scripts[$position] = "\n" . rtrim($script);
        }
        else {
            $this->scripts[$position] .= "\n" . rtrim($script);
        }
    }
public function add_script ( $ script , $ position = 'head' ) { if ( ! isset ( $ this -> scripts [ $ position ] ) ) { $ this -> scripts [ $ position ] = "\n" . rtrim ( $ script ) ; } else { $ this -> scripts [ $ position ] .= "\n" . rtrim ( $ script ) ; } }
Add inline javascript code

@param string $script   JS code snippet
@param string $position Target position [head|head_top|foot]
Add inline javascript code