
    function RTELoaded(w) {
        w.setToolbar("tbimage",false)
        w.setToolbar("tbtable",false)
        w.setToolbar("tbline",false)
        w.setSkin ("#idToolbar {border: 1px #999999 solid; background:#eceff6}")
        plaintext = document.all.documentbody.value;
        window.richedit.setHTML(plaintext);
        window.richedit.idEditbox.document.execCommand("SelectAll");
        window.richedit._Format("FormatBlock","<div>");
        window.richedit.idEditbox.document.execCommand("UnSelect");
    }
    function dosubmit() {
        okToLeave=true;
        if (window.richedit.getBGColor() != '') {
                document.all.documentbody.value = "<div style='background-color:" + window.richedit.getBGColor() + "'>" + window.richedit.getHTML() + "</div>";
        } else {
               document.all.documentbody.value = window.richedit.getHTML();
        }
    }

    function RTELoaded2(w) {
        w.setToolbar("tbimage",false)
        w.setToolbar("tbtable",false)
        w.setToolbar("tbline",false)
        w.setSkin ("#idToolbar {border: 1px #999999 solid; background:#eceff6}")
        plaintext = document.all.documentbody2.value;
        window.richedit2.setHTML(plaintext);
        window.richedit2.idEditbox.document.execCommand("SelectAll");
        window.richedit2._Format("FormatBlock","<div>");
        window.richedit2.idEditbox.document.execCommand("UnSelect");
    }
    function dosubmit2() {
        okToLeave=true;
        if (window.richedit2.getBGColor() != '') {
                document.all.documentbody2.value = "<div style='background-color:" + window.richedit2.getBGColor() + "'>" + window.richedit.getHTML() + "</div>";
        } else {
               document.all.documentbody2.value = window.richedit2.getHTML();
        }
    }
