You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
3.0 KiB

function tGotFocus(oTxt) {
top.findex.document.form1.txtRemoteEntry.value = "qanswers.document.form1."+oTxt.name;
return true;
}
var aEnglish,aSymbol,aMath,aMisc,aKeys,aCharSet;
aEnglish="aeiouyAEIOUYaeiouyAEIOUYaeiouyAEIOUYaeiouyAEIOUYcnsCN!?";
aMath = "0123+x. 0123o - Aau ";
aMisc = "rcsp ";
aSymbol =" ";
function langselect(oSelLang) {
var i,sBlank;
reset_autotimer();
i = oSelLang.selectedIndex;
sBlank = " ";
if (oSelLang.options[i].value == "fr") {
aKeys="'`^:~+";
aCharSet = aEnglish;
sBlank = "French";
aSymbol= " � � ";
aSymbol+="�� � �� � ";
aSymbol+="����� ����� ";
aSymbol+=" �� � �� � ";
aSymbol+="� � ";
} else { if (oSelLang.options[i].value == "deu") {
aKeys="'`^:~+";
aCharSet = aEnglish;
sBlank = "German";
aSymbol= " ";
aSymbol+=" ";
aSymbol+=" ";
aSymbol+="� �� � � ";
aSymbol+=" � ";
} else { if (oSelLang.options[i].value == "sp") {
aKeys="'`^:~+";
aCharSet = aEnglish;
sBlank = "Spanish";
aSymbol= "������������";
aSymbol+=" ";
aSymbol+=" ";
aSymbol+=" � � ";
aSymbol+="�� �ѡ�";
} else { if (oSelLang.options[i].value == "math") {
aKeys="'/:^";
aCharSet = aMath;
sBlank = "Math";
aSymbol= "�����׷ ";
aSymbol+="ؼ��� ";
aSymbol+="� ";
aSymbol+="��� ";
aSymbol+=" ";
} else { if (oSelLang.options[i].value == "misc") {
aKeys="^";
aCharSet = aMisc;
sBlank = "Misc";
aSymbol= "���� ";
aSymbol+=" ";
aSymbol+=" ";
aSymbol+=" ";
aSymbol+=" ";
} else {
sBlank = "";
aKeys="";
aCharSet = "";
}}}}}
return true;
}
function languagesupport(oTxt) {
var ostart,oText,schar,iidx,siidx;
reset_autotimer();
if (bNSNG) { return true;}
oText = oTxt.value;
ostart=oText.length-1;
iidx=aKeys.indexOf(oText.charAt(ostart));
if (iidx == 5) {iidx = 4};
if (iidx != -1) {
ostart--;
schar=oText.charAt(ostart);
siidx=iidx*12;
iidx=aCharSet.indexOf(schar,siidx);
if (iidx != -1) {
if (aSymbol.charAt(iidx) != " ") {
oTxt.value=oText.substring(0,ostart)+aSymbol.charAt(iidx);
}
}
}
return true;
}
function onConvert(oTxt) {
var ostart,oText,schar,schar2,iidx,siidx,oOutput,oend;
reset_autotimer();
oText = oTxt.value;
oOutput = oText.charAt(0);
for (ostart=1; ostart<=oText.length-1;ostart++) {
schar2=oText.charAt(ostart);
iidx=aKeys.indexOf(schar2);
if (iidx == 5) {iidx = 4};
if (iidx == -1) {
oOutput += schar2;
} else {
oend=ostart-1;
schar=oText.charAt(oend);
siidx=iidx*12;
iidx=aCharSet.indexOf(schar,siidx);
if (iidx == -1) {
oOutput += schar2;
} else {
if (aSymbol.charAt(iidx) != " ") {
oend=oOutput.length-1;
oOutput = oOutput.substring(0,oend)+aSymbol.charAt(iidx);
} else {
oOutput += schar2;
}
}
}
}
oTxt.value=oOutput;
return true;
}