%
Public sub StrCount1(Str)
Counter = 0
z=0
For I = 1 To Len(Trim(Str))
If Asc(Mid(Str, I, 1))<0 Then
Counter = Counter + 2
Else
Counter = Counter + 1
end if
if counter >= 20 then
z=i
response.write left(str,z)
exit for
end if
Next
if z=0 then
response.write str
end if
End sub
Public sub StrCount2(Str)
Counter = 0
z=0
For I = 1 To Len(Trim(Str))
If Asc(Mid(Str, I, 1))<0 Then
Counter = Counter + 2
Else
Counter = Counter + 1
end if
if counter >= 46 then
z=i
response.write left(str,z)
exit for
end if
Next
if z=0 then
response.write str
end if
End sub
%>