' VB Script Document
 Function bytes2BSTR(vIn) '×ª»»ISO9001×Ö·ûÎªgb2312µÄvbs
         strReturn = ""
         For i = 1 To LenB(vIn)
         ThisCharCode = AscB(MidB(vIn,i,1))
         If ThisCharCode < &H80 Then
         strReturn = strReturn & Chr(ThisCharCode)
         Else
         NextCharCode = AscB(MidB(vIn,i+1,1))
         strReturn = strReturn & Chr(CLng(ThisCharCode) * &H100 + CInt(NextCharCode))
         i = i + 1
         End If
         Next
         bytes2BSTR = strReturn
    End Function
	
	 Function getHTTPPage(url) 
     on error resume next 
        dim http,code 
        set http= createobject("Microsoft.XMLHTTP") 
        Http.open "GET",url,false 
        Http.send() 
        if Http.readystate<>4 then
            exit function 
        end if 
        code=bytes2BSTR(Http.responseBody)
        oSource.value=code
		fn.document.body.innerHTML="<base href='"+url+"'>"+code
        set http=nothing
        if err.number<>0 then err.Clear 
    End function