var isDOM= (document.getElementById!=null) var isMSIE= (document.all!=null) && (document.all.item!=null) var isMSIE5= isDOM && isMSIE && (window.opera==null); var lat = new String("qwabvgdezijklmnoprstufhcy'QWABVGDEZIJKLMNOPRSTUFHCY'") function TransBuf(rus,rus1,fraz) { var fraza1 = '' var regim = true var regim1 = true var len = fraz.length for( i=0; i'))) regim1 = true; if(regim && regim1) { var c1 = fraz.charAt(i+1) var c2 = fraz.charAt(i+2) if( c0 =='e' && c1=="'" ) { fraza1 += rus1.charAt(0); i++; continue } if( c0 =='E' && c1=="'" ) { fraza1 += rus1.charAt(1); i++; continue } if( c0 =='z' && c1=='h' ) { fraza1 += rus1.charAt(2); i++; continue } if( c0 =='Z' && ((c1=='h') || (c1=='H'))) { fraza1 += rus1.charAt(3); i++; continue } if( c0 =='c' && c1=='h' ) { fraza1 += rus1.charAt(4); i++; continue } if( c0 =='C' && ((c1=='h') || (c1=='H'))) { fraza1 += rus1.charAt(5); i++; continue } if( (c0 =='j' && c1=='u') || (c0 =='y' && c1=='u') ) { fraza1 += rus1.charAt(6); i++; continue } if( (c0 =='J' && ((c1=='u') || (c1=='U'))) || (c0 =='Y' && ((c1=='u') || (c1=='U')))) { fraza1 += rus1.charAt(7); i++; continue } if( (c0 =='j' && c1=='a') || (c0 =='y' && c1=='a') ) { fraza1 += rus1.charAt(8); i++; continue } if( (c0 =='J' && ((c1=='a') || (c1=='A'))) || (c0 =='Y' && ((c1=='a') || (c1=='A'))) ) { fraza1 += rus1.charAt(9); i++; continue } if( (c0 =='j' && c1=='o') || (c0 =='y' && c1=='o') ) { fraza1 += rus1.charAt(10); i++; continue } if( (c0 =='J' && ((c1=='o') || (c1=='O'))) || (c0 =='Y' && ((c1=='o') || (c1=='O')))) { fraza1 += rus1.charAt(11); i++; continue } if( c0 =='s' && c1=='h' && c2=="'" ) { fraza1 += rus1.charAt(12); i+=2; continue } if( c0 =='S' && ((c1=='h') || (c1=='H')) && c2=="'" ) { fraza1 += rus1.charAt(13); i+=2; continue } if( c0 =='s' && c1=='h' ) { fraza1 += rus1.charAt(14); i++; continue } if( c0 =='S' && ((c1=='h') || (c1=='H')) ) { fraza1 += rus1.charAt(15); i++; continue } loc = lat.indexOf(c0); if(loc>=0) c0 = rus.charAt(loc); } fraza1 += c0; } return(fraza1); } var bodyVal; function Translate(rus,rus1) { if ( document.f.add.value == 'Lat->Rus' ) { bodyVal = document.f.body.value; titleVal = document.f.subject.value; document.f.body.value = 'One moment, please...'; document.f.body.value = TransBuf(rus,rus1,bodyVal); document.f.subject.value = TransBuf(rus,rus1,titleVal); document.f.add.value = "Cancel"; } else { document.f.body.value = bodyVal; document.f.subject.value = titleVal; document.f.add.value = "Lat->Rus"; } } var saveAction = ''; var saveTarget = ''; function startup() { document.f.subject.focus(); saveAction = document.f.action; saveTarget = document.f.target; } function go() { if(saveAction!='') document.f.action=saveAction; if(saveTarget!='') document.f.target=saveTarget; } function doCopy() { document.f.body.value=document.f.body1.value; } function doClear() { document.f.body.value=''; if(document.f.hello.value!='') { document.f.body.value=document.f.hello.value; document.f.body.value+='\n'; } document.f.body.value+=document.f.bye.value; } function checkTitle() { return(document.f.subject.value!=''); } function checkGarbage() { return( !document.f.topic0.checked ); } function getTopicCount() { var cnt = 0; for( i = 0; i<32; i++ ) { var obj = eval ("document.f.topic"+i); if(obj==null) break; else if(obj.checked) cnt++; } return(cnt); } function checkTopics() { var cnt = getTopicCount(); return((cnt>0) && (cnt<5)); } function Preview( letter ) { document.f.action=letter; document.f.target="_blank"; document.f.submit(); } function storeCaret(textEl) { if( isMSIE5 && textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate(); } function TransLetter( letter ) { if( isMSIE5 && document.f.body.createTextRange && document.f.body.caretPos) { var caretPos = document.f.body.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? letter + ' ' : letter; caretPos.select(); } else if(document.f.body.selectionStart) { var textarea = document.f.body; var begin = textarea.value.substr(0, textarea.selectionStart); var selection = textarea.value.substr(textarea.selectionStart, textarea.selectionEnd - textarea.selectionStart); var end = textarea.value.substr(textarea.selectionEnd); var newCursorPos = textarea.selectionStart; var scrollPos = textarea.scrollTop; textarea.value = begin + letter + end; if (textarea.setSelectionRange) textarea.setSelectionRange(newCursorPos + letter.length, newCursorPos + letter.length); textarea.scrollTop = scrollPos; } else { document.f.body.value+=letter; } document.f.body.focus(); } function so(oid,bid,prefix) { var obj = getElement(oid); var but = getElement(bid); if(obj && but) { if(but.src.indexOf("minus.gif")<0) { obj.style.display="block"; but.src=prefix+"/images/minus.gif"; } else { obj.style.display="none"; but.src=prefix+"/images/plus.gif"; } } } function collapse(topid,isPlus) { window.status = 'Processing...'; var spans = document.getElementsByTagName('SPAN'); for( var i=0; i=0) { location.href = '#'+arr[cur]; } return(cur); } function next(arr,cur) { if(++cur > arr.length-1) cur = 0; if(cur0) ? 'vmailact.gif' : 'vmail.gif'); else img.className = (state>0) ? 'blink' : ''; } } catch(e) {} }