<%

Function removehtml(strHTML) 
Dim objRegExp, Match, Matches 
Set objRegExp = New Regexp 
objRegExp.IgnoreCase = True 
objRegExp.Global = True 
'取闭合的<> 
objRegExp.Pattern = "<[^>]*?>" 
'进行匹配 
Set Matches = objRegExp.Execute(strHTML) 
' 遍历匹配集合，并替换掉匹配的项目 
For Each Match in Matches 
strHtml=Replace(strHTML,Match.Value,"") 
Next 
RemoveHTML=strHTML 
Set objRegExp = Nothing 
End Function

Function IsValidEmail(email)
dim names, name, i, c
IsValidEmail = true
names = Split(email, "@")
if UBound(names) <> 1 then
   IsValidEmail = false
   exit Function
end if
for each name in names
   if Len(name) <= 0 then
     IsValidEmail = false
     exit Function
   end if
   for i = 1 to Len(name)
     c = Lcase(Mid(name, i, 1))
     if InStr("abcdefghijklmnopqrstuvwxyz_-.", c) <= 0 and not IsNumeric(c) then
       IsValidEmail = false
       exit Function
     end if
   next
   if Left(name, 1) = "." or Right(name, 1) = "." then
      IsValidEmail = false
      exit Function
   end if
next
if InStr(names(1), ".") <= 0 then
   IsValidEmail = false
   exit Function
end if
i = Len(names(1)) - InStrRev(names(1), ".")
if i <> 2 and i <> 3 then
   IsValidEmail = false
   exit Function
end if
if InStr(email, "..") > 0 then
   IsValidEmail = false
end if
end Function
function isInteger(para)
       on error resume next
       dim str
       dim l,i
       if isNUll(para) then 
          isInteger=false
          exit function
       end if
       str=cstr(para)
       if trim(str)="" then
          isInteger=false
          exit function
       end if
       l=len(str)
       for i=1 to l
           if mid(str,i,1)>"9" or mid(str,i,1)<"0" then
              isInteger=false 
              exit function
           end if
       next
       isInteger=true
       if err.number<>0 then err.clear
end function
function CutStr(str,strlen,endStr)
dim cvSt:cvSt=Str
if cvSt="" then
CutStr=""
exit function
end if
dim l,t,c
l=len(cvSt)
t=0
for i=1 to l
c=Abs(Asc(Mid(cvSt,i,1)))
if c>255 then
t=t+2
else t=t+1
end if
if t>=strlen then
cutStr=left(cvSt,i)&endStr
exit for
else cutStr=cvSt
end if
next
cutStr=replace(cutStr,chr(10),"")
cutStr=replace(cutStr,chr(0),"")
end Function
%>