<% 
function CheckStr(str)
 if str<>"" and not isnull(str) then 
   CheckStr=replace(str,"'","&#39;")
   CheckStr=replace(CheckStr, ">", "&gt;")
   CheckStr=replace(CheckStr, "<", "&lt;")
   CheckStr=replace(CheckStr, " ", "&nbsp;")
 end if
end function
function CheckStrbox(str)
 if str<>"" and not isnull(str) then 
   CheckStrbox=replace(str,"'","&#39;")
   CheckStrbox=replace(CheckStrbox, ">", "&gt;")
   CheckStrbox=replace(CheckStrbox, "<", "&lt;")
   CheckStrbox=replace(CheckStrbox, " ", "&nbsp;")
   CheckStrbox=replace(CheckStrbox, chr(13), "<br>")
 end if
end function
function ChangeStrbox(str)
 if str<>"" and not isnull(str) then 
   ChangeStrbox=replace(str,"<br>" ,chr(13))
 end if
end function
function lenmix(checkstr)
   lenTotal = 0
   for i=1 to Len(checkstr)
   strWord = mid(checkstr,i,1)
   if asc(strWord) < 0 or asc(strWord) > 127 then
    lenTotal = lenTotal + 2
   else
    lenTotal = lenTotal + 1
   end if
   next
   lenmix = lentotal
end function
%> 
