Message Inbox JavaScript
Originally by jaybonci
1: function replyTo(s, c) {
2: if (c || document.message_inbox_form.setvar_autofillInbox.checked) {
3: document.message_inbox_form.message.value = "/msg "+s+" ";
4: document.message_inbox_form.message.focus();
5: }
6: }
7:
8: function replyToEddie (s) {
9: replyTo(s,1);
10: }
11:
12: function clearReply() {
13: document.message_inbox_form.message.value = "";
14: }
15:
16: function checkAll(){
17: for (i=0; i < document.message_inbox_form.elements.length; i++) {
18: if(document.message_inbox_form.elements[i].name.substring(0,9) == "deletemsg")
19: {document.message_inbox_form.elements[i].checked=true;}
20: }
21: }
22:
23:
24: function archiveAll() {
25: for (i=0; i < document.message_inbox_form.elements.length; i++) {
26: if(document.message_inbox_form.elements[i].name.substring(0,7) == "archive")
27: {document.message_inbox_form.elements[i].checked=true;}
28: }
29: }
30:
31: function unarchiveAll() {
32: for (i=0; i < document.message_inbox_form.elements.length; i++) {
33: if(document.message_inbox_form.elements[i].name.substring(0,9) == "unarchive")
34: {document.message_inbox_form.elements[i].checked=true;}
35: }
36: }
37:
38: function clearArchive() {
39: for (i=0; i < document.message_inbox_form.elements.length; i++) {
40: if((document.message_inbox_form.elements[i].name.substring(0,7) == "archive") || (document.message_inbox_form.elements[i].name.substring(0,9) == "unarchive"))
41: {document.message_inbox_form.elements[i].checked=false;}
42: }
43: }
44:
45: function enlargeTextbox(textbox) {
46: if (textbox.morph) {
47: textbox.morph('height: 15em;');
48: }
49: else {
50: textbox.style.height = '15em';
51: textbox.rows = 8;
52: }
53: }
54:
55: function shrinkTextbox(textbox) {
56: // Only shrink box back down if no text has been entered
57: if (textbox.value === "") {
58:
59: if (textbox.morph) {
60: textbox.morph('height: 2em;');
61: }
62: else {
63: // Don't do jarring shrinking effect if morphing is not enabled
64: }
65:
66: }
67:
68: }