Че-то не получается. Короче вот скрипт.
function nm()
{
a = document.forma.txt.value
len = a.length
flag = "0";
nota = "";
nota1 = "";
alc = "";
for (i = 1; i<len; i++)
{
nota = "";
p = a.substring(i-2,i-1);
r = a.substring(i-1,i);
s = a.substring(i,i+1);
t = a.substring(i+1,i+2);
if (s=="c") {nota = "A"; flag="1";}
if (s=="d") {nota = "B"; flag="1";}
if (s=="e") {nota = "C"; flag="1";}
if (s=="f") {nota = "D"; flag="1";}
if (s=="g") {nota = "E"; flag="1";}
if (s=="a") {nota = "F"; flag="1";}
if (s=="b") {nota = "G"; flag="1";}
if (s=="-") {nota = "R"; flag="1";}
if (flag=="1")
{
if (r=="#") {nota = nota + "#";
if (p=="1") {nota1 = "16";}
if (p=="2") {nota1 = "8";}
if (p=="4") {nota1 = "4";}
if (p=="8") {nota1 = "2";}
if (p=="6") {nota1 = "1";}
}
else
{
if (r=="1") {nota1 = "16";}
if (r=="2") {nota1 = "8";}
if (r=="4") {nota1 = "4";}
if (r=="8") {nota1 = "2";}
if (r=="6") {nota1 = "1";}
}
if (t=="0") {nota = nota + "1";}
if (t=="1") {nota = nota + "-";}
if (t=="2") {nota = nota + "";}
if (t=="3") {nota = nota + "+";}
if (t=="4") {nota = nota + "5";}
alc = alc + nota + nota1 + " ";
flag = "0";
}
}
reswindow=window.open("","","scrollbars=1;width=300,height=150,resizable="+resize+",menubar="+menu+",fullscreen="+full+",status="+stat+"");
reswindow.document.write(start);
reswindow.document.write("<P><B>Результат:</B><p>" + alc + "<br>");
reswindow.document.write("<br><form><input type=\"button\" value=\"Закрыть окно\" onclick=\"window.close()\"></form>");
reswindow.document.write(end);
}
Мне нужно его перевести в ПХП.
Помогите плызззз...