смотреть оглавление

примерразмер кода

")); return (s22.substring(s22.lastIndexOf(">")+1,s22.length)); } function translate_letter() { var txt = String.fromCharCode(event.keyCode); if (processhtmltags&&(txt=='<')) { prelanguage=language; setlat(); } if (processhtmltags&&(txt=='>')) { if(prelanguage) setlat(); else setrus(); } if (processbbcodetags&&(txt=='[')) { prelanguage=language; setlat(); } if (processbbcodetags&&(txt==']')) { if(prelanguage) setlat(); else setrus(); } if (!tra[txt]) { return false; // no need to process the letter } event.keyCode = 0; with(document.selection.createRange()) { text = ''; collapse(); } cursor_pos_selection = document.selection.createRange(); cursor_pos_selection.select(); cursor_pos_selection.text = '%'; cursor_pos_selection.moveStart("word",-3); pretxt = cursor_pos_selection.text.substring(0,cursor_pos_selection.text.length-1); cursor_pos_selection.text = ''; cursor_pos_selection.collapse(); if (language) { result = pretxt+translatesymboltolatin(txt); // to latin } else { result = translatesymboltocyrillic(pretxt+txt); // to cyrillic } with(document.selection.createRange()) { select(); text = result; collapse(); } return false; } function translatesymboltocyrillic(txt) { var pretxt = txt.substr(0,txt.length-1); var last = txt.substr(txt.length-1,1); var lat = tra[last]; var rus = abc2[last]; if (lat) { for (var ii=0; iilat[ii].length?(pretxt.length-lat[ii].length):0; if (lat[ii]==pretxt.substr(pos,pretxt.length-pos)) { return pretxt.substr(0,pretxt.length-lat[ii].length)+rus[ii]; } } } return txt; } function translatesymboltolatin(symb) { return abc1[symb]?abc1[symb]:symb; } function translateAlltoCyrillic() { var transliterateit = 1; var swithchesoff = /\]|\>/; var is_selection_flag = 1; var userselection = document.selection.createRange(); var txt = userselection.text; if (userselection==null || userselection.text==null || userselection.parentElement==null || userselection.parentElement().type!="textarea") { // no text selected, all the text in the textarea is to be processed is_selection_flag = 0; txt = document.searchform.subject.value; } var txtnew = txt.substr(0,1); if (((txtnew=="<")&&processhtmltags)||((txtnew=="[")&&processbbcodetags)) transliterateit=0; if (txtnew.match(swithchesoff)) transliterateit=1; if (transliterateit) {txtnew = translatesymboltocyrillic(txtnew);} var symb = ""; for (kk=1;kk ') { value = '<-'; } } undotext.push(document.searchform.subject.value); if (undotext.length > (undodepth+1)) { undotext.shift(); } } return false; } function recovertext() { if (undotext.length > 1) { document.searchform.subject.value = undotext[undotext.length-2]; undotext.pop(); } if (undotext.length < 2) { document.searchform.rtext.value = '> '; } return false; } //-->
abvgdejo,yo,özhzijklmnoprstufh,xcchshw,shh#y'je,äju,yu,üja,ya
рус/лат  Esc