<%
'on error resume next
dim dsnstr1,dsnstr,rs
dsnstr1="DRIVER=sql server;server=127.0.0.1;database=lh100;uid=sa;password=lh100com"
set dsnstr=server.CreateObject("adodb.connection")
dsnstr.Open dsnstr1
set rs=server.CreateObject("adodb.recordset")
If Err.Number <> 0 Then
		set rs=nothing
		dsnstr.close
		set dsnstr=nothing
		On Error GoTo 0
        	Response.redirect "/err.asp"
		response.End()
end if
On Error GoTo 0

function sqlstr(dat)
sqlstr=replace(dat,"'","''")
end function

Function htmlCode(content)
dim TempContent
	TempContent = content
	TempContent = replace(TempContent,"<","&lt;")
	TempContent = replace(TempContent,">","&gt;")
	TempContent = replace(TempContent,vbcrlf,"&nbsp;<br>")
	TempContent = replace(TempContent,chr(32),"&nbsp;")
	TempContent = replace(TempContent,chr(34),"&quot;")
	htmlCode=TempContent
End Function

function code(content)
dim TempContent
	TempContent = content
	TempContent = replace(TempContent,chr(34),"&quot;")
	code=TempContent
end function
%>