function tse_htmled_script()
{
    $tse = get_option('tango_smileys_extended');
    if (tse_check_postpage()) {
        echo '<script language="javascript" type="text/javascript" src="' . plugins_url('tse-htmled.js', __FILE__) . '"></script>';
        echo "<div id='tse_htmled_smileys' class='postbox'><div class='tse_title'>Tango Smileys Extended</div><div class='inside htmlcti'>";
        tse_cti_anywhere('content', true, 'all');
        echo "</div></div>";
        echo <<<SCRIPT
\t<script language="javascript" type="text/javascript">
\t//<![CDATA[
\t\tif(document.getElementById("ed_toolbar")){
\t\t\tqt_toolbar = document.getElementById("ed_toolbar");
\t\t\tedButtons[edButtons.length] = new edButton("ed_tse","Tango Smileys", "", "", "");
\t\t\tvar qt_button = qt_toolbar.lastChild;
\t\t\twhile (qt_button.nodeType != 1){
\t\t\t\tqt_button = qt_button.previousSibling;
\t\t\t}
\t\t\tqt_button = qt_button.cloneNode(true);
\t\t\tqt_button.value = " ";
\t\t\tqt_button.title = "Tango Smileys";
\t\t\tqt_button.onclick = function () {}
\t\t\tqt_button.id = "ed_tse";
\t\t\tqt_toolbar.appendChild(qt_button);
\t\t}
\t\tat_attach("ed_tse", "tse_htmled_smileys", "click", "y", "pointer");
\t//]]>
\t</script>
SCRIPT;
    }
}
function tse_add_cti_smileys()
{
    $tse = get_option('tango_smileys_extended');
    echo "<h3 style='text-align: center;'>{$tse['cti_header']}</h3>";
    tse_cti_anywhere();
}