<%
function  GetSafeCode2()	
	Dim test,Result
	 on error resume next
	Set test=Server.CreateObject("Adodb.Stream")
	Set test=Nothing
	If Err Then
		Dim zNum
		Randomize timer
		zNum = cint(8999*Rnd+1000)
     if issession=0 then
 	   response.Cookies("safecode")=zNum
	   Result = replace(request.Cookies("safecode"),"'","")
 	  else
       Session("SafeCode") = zNum
	   Result = Session("SafeCode")	
    end if 		
	Else
		Result = "<img src=""../../inc/Safecode.asp"" align=""absmiddle""  align=""absmiddle"">"		
	End If
	GetSafeCode2= Result
End function
ss=GetSafeCode2()

response.Write("document.write('"&ss&"')")



%>