<%
Function GetPopedomList(AdminName)
	Dim RsAdminObj,SqlAdmin
	Set RsAdminObj = Server.CreateObject("ADODB.RecordSet")
	SqlAdmin = "Select G.PopList from Admin as A,AdminGroup as G where A.GroupID=G.ID and A.Name='" & AdminName & "'"
	RsAdminObj.Open SqlAdmin,Conn
	if Not RsAdminObj.Eof then
		GetPopedomList = RsAdminObj(0)
	end if
	RsAdminObj.Close
	Set RsAdminObj = Nothing
End Function 
Function JudgePopedomTF(AdminName,PopedomName)
	Dim RsAdminObj,PopList
	JudgePopedomTF = False
	Set RsAdminObj = Server.CreateObject("ADODB.RecordSet")
	RsAdminObj.Open "Select GroupID from Admin where Name='" & Replace(AdminName,"'","") & "'",Conn
	if Not RsAdminObj.Eof then
		if CStr(RsAdminObj("GroupID")) = "0" then
			JudgePopedomTF = True
		else
			PopList = GetPopedomList(AdminName)
			if (PopList <> "") and (PopedomName <> "") then
				if InStr(PopList,PopedomName) <> 0 then
					JudgePopedomTF = True
				else
					JudgePopedomTF = False
				end if
			else
				JudgePopedomTF = False
			end if
		end if
	else
		JudgePopedomTF = False
	end if
End Function 
Sub ReturnError()
	Response.Write("<script>alert(""[系统错误]\n\n您的权限不足!请与系统管理员联系\n"&Copyright&""");window.close();</script>")
	Response.End 
end Sub
Sub ReturnError1()
	Response.Write("<script>alert(""[系统错误]\n\n您的权限不足!请与系统管理员联系\n"&Copyright&""");location.href=""javascript:history.back()"";</script>")
	Response.End 
end Sub
Sub ReturnError2()
	Response.Write("loading...")
	Response.End 
end Sub
%>