protected function _renderScript($script, $link, $attribs = array())
    {
        $attribs = AnHelperArray::toString($attribs);

        if (!$link) {
            $html  = '<script type="text/javascript" '.$attribs.'>'."\n";
            $html .= trim($script);
            $html .= '</script>'."\n";
        } else {
            $html = '<script type="text/javascript" src="'.$script.'" '.$attribs.'></script>'."\n";
        }

        return $html;
    }