http://www.codeguru.com.ua/article/a-183.html
Виды процедур
В VBScript существует два вида процедур: подпрограмма (Sub) и функция (Function)
код транслитератора такой:
' VBScript File
Sub clickMutateVB()
Document.getElementById("e").Value = MutateVB(Document.getElementById("e").Value, Document.getElementById("from").Value + Document.getElementById("to").Value)
End Sub
Function MutateVB(str, flag)
'Латиница в кириллицу(Unicode)
if flag = 301 OR flag = 401 then
for l = 0 to UBound(lattoc4)
str = Replace(str,lattoc4(l), ltocir4(l))
next
for l = 0 to UBound(lattoc3)
str = Replace(str,lattoc3(l), ltocir3(l))
next
for l = 0 to UBound(lattoc2)
str = Replace(str,lattoc2(l), ltocir2(l))
next
for l = 0 to UBound(lattoc1)
str = Replace(str,lattoc1(l), ltocir1(l))
next
end if
'Кириллица(Unicode) в латиницу
if flag = 103 OR flag = 104 then
for l = 0 to UBound(cirtol4)
str = Replace(str,cirtol4(l), ctolat4(l))
next
for l = 0 to UBound(lattoc3)
str = Replace(str,cirtol3(l), ctolat3(l))
next
for l = 0 to UBound(lattoc2)
str = Replace(str,cirtol2(l), ctolat2(l))
next
for l = 0 to UBound(lattoc1)
str = Replace(str,cirtol1(l), ctolat1(l))
next
end if
далее массивы