<%
response.write GetRndStr(15) & "<br>"
response.write GetRndStr(30) & "<br>"
Function GetRndStr(LengthNum)
If isDebug Then On Error Resume Next End If
Dim Ran,i
GetRndStr=""
For i=1 To Abs(LengthNum)
Randomize
Ran = CInt(Rnd * 2)
Randomize
If Ran = 0 Then
Ran = CInt(Rnd * 25) + 97
GetRndStr =GetRndStr& UCase(Chr(Ran))
ElseIf Ran = 1 Then
Ran = CInt(Rnd * 9)
GetRndStr = GetRndStr & Ran
ElseIf Ran = 2 Then
Ran = CInt(Rnd * 25) + 97
GetRndStr =GetRndStr& Chr(Ran)
End If
Next
End Function
%>