// ------------------------------------------------------------------- // // EVENT HANDLERS // // ------------------------------------------------------------------- var newline_string = "\n"; var quoted_msg_marker = ""; var require_categorization = 1; var cur_phrases = new Object(); // -------------- function findOpeningPos(str) { return 0; } function textChangeHandler() { NEEDS_SPELLCHECK = 1; left_frame = parent.frames.left; if (left_frame.invalidate) { // perhaps we should just switch back to the summary left_frame.invalidate(); } } function spellcheck() { // alert("spellcheck"); // find the useful part of the body var raw_body = document.reply.reply.value; var start_pos = 0; var end_pos = -1; start_pos = findPhraseType("header",1); if (start_pos == -1) { start_pos = findPhraseType("greeting",1); } if (start_pos == -1) { start_pos = 0; } while (start_pos < raw_body.length && (raw_body.charCodeAt(start_pos) == 10 || raw_body.charCodeAt(start_pos) == 13 || raw_body.charCodeAt(start_pos) == 32)) { start_pos++; } end_pos = findPhraseType("footer"); if (end_pos == -1) { end_pos = findPhraseType("signature"); } if (end_pos == -1) { end_match = strstr(raw_body,quoted_msg_marker); if (end_match) { end_pos = end_match.start; } } if (end_pos == -1) { end_pos = raw_body.length; } var body_text = raw_body.substring(start_pos,end_pos); // build the spellcheck submit form var aFrm = parent.parent.frames.frmInvisible; aFrm.document.clear(); aFrm.document.open(); aFrm.document.write('<'); aFrm.document.write('HTML><'); aFrm.document.write('HEAD><'); aFrm.document.write('BODY>'); aFrm.document.write('
'); aFrm.document.write('