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) { if( 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; } else { document.f.body.value+=letter; } } 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) { var div = getElement(topid); window.status = 'Processing...'; while(div) { if(div.tagName=='DIV') { var but = getElement('b'+div.id.substring(1)); if(but) { if(isPlus) { div.style.display="none"; but.src="../images/plus.gif"; } else { div.style.display="block"; but.src="../images/minus.gif"; } } } div = div.nextSibling; } window.status = 'Done.'; } function turnInterface() { var i = getElement('interface'); if(i) { i.style.display = (i.style.display=='none') ? 'block' : 'none'; } return(true); } function stayOnTop() { var cmd = getElement('cmd'); if(cmd) { cmd.style.top = document.body.scrollTop+5; cmd.style.left = document.body.scrollLeft+document.body.clientWidth-cmd.offsetWidth-5; setTimeout("stayOnTop()", 100); } } function getElement(eid) { var ret = null; if(isDOM) ret = document.getElementById(eid); else if(isMSIE) ret = document.all[eid]; return(ret); } function prev(arr,cur) { if(--cur < 0) cur = arr.length-1; if(cur>=0) { location.href = '#'+arr[cur]; } return(cur); } function next(arr,cur) { if(++cur > arr.length-1) cur = 0; if(cur