function manager(page, block, link) { document.forms[0].page.value = page; if (block) { document.forms[0].block.value = block; } else { document.forms[0].block.value = ''; } if (link) { document.forms[0].link.value = link; } else { document.forms[0].link.value = ''; } document.forms[0].submit(); } function menu(type) { document.forms[0].type.value = type; document.forms[0].submit(); } function go(unit, topic) { if (topic) { document.forms[0].active_topic.value = topic; } document.forms[0].action = '/cgi-bin/' + unit + '.pl'; document.forms[0].unit.value = unit; document.forms[0].rate.value = ''; document.forms[0].submit(); } function authors(author) { document.forms[0].action = '/cgi-bin/authors.pl'; document.forms[0].author_login.value = author; document.forms[0].submit(); } function post_text() { document.forms[0].action = '/cgi-bin/form.pl'; document.forms[0].type.value = 'text_new'; document.forms[0].submit(); } function post_message() { document.forms[0].action = '/cgi-bin/form.pl'; document.forms[0].type.value = 'message_new'; document.forms[0].submit(); } function post_rec() { document.forms[0].action = '/cgi-bin/form.pl'; document.forms[0].type.value = 'rec_new'; document.forms[0].submit(); } function add_notes(message) { document.forms[0].action = '/cgi-bin/form.pl'; document.forms[0].message.value = message; document.forms[0].type.value = 'notes_new'; document.forms[0].submit(); } function reverse(unit, rec_author, rec_writer) { document.forms[0].action = '/cgi-bin/' + unit + '.pl'; document.forms[0].type.value = 'reverse'; if (rec_author) { document.forms[0].rec_author.value = rec_author; } if (rec_writer) { document.forms[0].rec_writer.value = rec_writer; } document.forms[0].submit(); } function forward(unit, rec_author, rec_writer) { document.forms[0].action = '/cgi-bin/' + unit + '.pl'; document.forms[0].type.value = 'forward'; if (rec_author) { document.forms[0].rec_author.value = rec_author; } if (rec_writer) { document.forms[0].rec_writer.value = rec_writer; } document.forms[0].submit(); } function calendar(year, month, day) { document.forms[0].year.value = year; document.forms[0].month.value = month; document.forms[0].day.value = day; document.forms[0].submit(); } function ethymology(word) { document.forms[0].action = '/cgi-bin/ethymology.pl'; document.forms[0].word.value = word; document.forms[0].submit(); } function list(val) { document.forms[0].list.value = val; document.forms[0].submit(); } function cert(link) { document.forms[1].link.value = link; document.forms[1].page.value = 'cert'; document.forms[1].submit(); } function decodeMail(text) { var elements = reverseText(text).split('<~>'); document.write(buildTag(elements[0], elements[1], elements[2])); } function buildTag(email, text, title) { return '' + ((text) ? text : email) + ''; } function reverseText(text) { var str = ''; for (var i = text.length - 1; i >= 0; i--) str += text.charAt(i); return str; } function aod(login, type, tr) { document.forms[0].login.value = login; document.forms[0].type.value = type; document.forms[0].tr.value = tr; document.forms[0].submit(); } function afisha(login, type) { document.forms[0].login.value = login; document.forms[0].type.value = type; document.forms[0].submit(); }