<%
 function dvHTMLEncode(fString)   
  if not isnull(fString) then   
          fString=replace(fString,">","&gt;")   
          fString=replace(fString,"<","&lt;")   
    
         
          fString=Replace(fString,CHR(34),"&quot;")   
          fString=Replace(fString,CHR(39),"&#39;")   
          fString=Replace(fString,CHR(13), "")   
          fString=Replace(fString,CHR(10)&CHR(10),"</P><P> ")   
          fString=Replace(fString,CHR(10),"<BR> ")   
    
          dvHTMLEncode=fString   
  end if   
  end function   
    
  function   dvHTMLCode(fString)   
  if not isnull(fString) then   
          fString=replace(fString,"&gt;",">")   
          fString=replace(fString,"&lt;","<")   
    
         
          fString=Replace(fString,"&quot;",CHR(34))   
          fString=Replace(fString,"&#39;",CHR(39))   
          fString=Replace(fString,"</P><P> ",CHR(10)&CHR(10))   
          fString=Replace(fString,"<BR> ",CHR(10))   
    
          dvHTMLCode=fString   
  end if   
  end function   
    
  function nohtml(str)   
          dim re   
          Set re=new RegExp   
          re.IgnoreCase =true   
          re.Global=True   
          re.Pattern="(\<.[^\<]*\>)"   
          str=re.replace(str,"   ")   
          re.Pattern="(\<\/[^\<]*\>)"   
          str=re.replace(str,"   ")   
          nohtml=str   
          set re=nothing   
  end function %>
