<%@language=vbscript codepage=936 %>
<!--#include file="conn/hl_conn.asp"-->
<!--#include file="inc/Md5.asp"-->
<!--#include file="inc/UpiConfig.asp"-->
<SCRIPT LANGUAGE="JavaScript">
<!-- Hide

function killErrors() {
return true;
}

window.onerror = killErrors;

// -->
</SCRIPT>
<!--ÈÝ´í´úÂë½áÊø-->
<%
ComeUrl=Trim(Request("ComeUrl"))

   	If ComeUrl = "" Then
    ComeUrl = Request.ServerVariables("HTTP_REFERER")
	End If
	If Instr(ComeUrl,"User_Index_Top.asp")>0 Then ComeUrl=HL_Url
	If Instr(ComeUrl,"User_Logout.asp")>0 Then ComeUrl=HL_Url
 Dim iNum, MemberName
        MemberName = ReplaceBadChar(Trim(Request("MemberName")))
		If MemberName = "" Then
            MemberName = Request.Cookies("hl_user")("username")
		End If
		Md5Info=Md5(MemberName & SecurityKey, 32)
		
'Call CloseConn
If HLIntegration = True Then
     If IsNull(SecurityKey) = False And SecurityKey <> "" And IsNull(arrUpiUrls) = False And arrUpiUrls <> "" Then
    HLUpi = Split(arrUpiUrls, "|")
       	For iNum = 0 To UBound(HLUpi)
	Response.Write "<script src='" & HLUpi(iNum) & "?action=LogoutUser&Md5Info=" & Md5Info & "&name=" & MemberName & "'></script>" & vbCrLf
		Next
    End If
	session("hl_user")=""
	Response.Cookies("hl_user")("username")=""
	Response.Cookies("hl_user")("password")=""
	if Domainname<>"" then Response.Cookies("hl_user").Domain=Domainname
	Response.Write("<script language=JavaScript>top.location='"&ComeUrl&"';</script>")
End If
session.abandon
%>
