<%
Dim RefreshType,RefreshID,AvailableDoMain,AvailableRefreshType,Dummy_Riker
Dim NotReplaceLableArray  '需要分页的标签
Dim NotReplaceLableOldArray '需要分页的标签  
NotReplaceLableArray = "" 
NotReplaceLableOldArray = ""  
If SysRootDir <> "" Then
	Dummy_Riker = "/" & SysRootDir
Else
	Dummy_Riker = ""
End If
Sub SetRefreshValue(RefreshTypeStr,RefreshIDStr)
	RefreshType = RefreshTypeStr
	RefreshID = RefreshIDStr
End Sub
Sub GetAvailableDoMain()
	Dim ConfigSql,RsConfigObj
	ConfigSql = "Select DoMain,MakeType,IndexExtName from Config"
	Set RsConfigObj = Conn.Execute(ConfigSql)
	if Not RsConfigObj.Eof then
		AvailableDoMain = RsConfigObj("DoMain")
		if Not IsNull(RsConfigObj("MakeType")) then
			AvailableRefreshType = RsConfigObj("MakeType")
		else
			AvailableRefreshType = 0
		end if
	else
		AvailableDoMain = GetDoMain
		AvailableRefreshType = 0
	end if
	Set RsConfigObj = Nothing
End Sub
'调用大栏目
Function SelfClass(ClassEName,NewsListNumberStr,TitleNumberStr,CompatPicStr,NaviPicStr,DateRuleStr,DateRightStr,RowHeightStr,RowNumberStr,ShowClassCNNameStr,MoreLinkTypeStr,MoreLinkContentStr,CSSStyleStr,OpenTypeStr,DateCSSStyleStr,TxtNaviStr)
	Dim RsNewsObj,NewsSql,RsClassObj,ClassSql,AllClassID,i,ClassCNName,ClassSaveFilePath
	Dim TempRowNumberStr,TempDateShowStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if DateRuleStr <> "" then
		if DateRightStr = "Left" then
			TempRowNumberStr = "colspan=""" & RowNumberStr & """"
		elseif DateRightStr = "Center" then
			TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
		elseif DateRightStr = "Right" then
			TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
		else
			TempRowNumberStr = "colspan=""" & RowNumberStr & """"
		end if
	else
		TempRowNumberStr = "colspan=""" & RowNumberStr & """"
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	if CompatPicStr <> "" then
		if DateRightStr <> "" then
			CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 " & TempRowNumberStr & ">" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
		else
			CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 " & TempRowNumberStr & ">" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
		end if
	end if
	ClassSql = "Select ClassCName,ClassEName,ClassID,SaveFilePath,FileExtName from NewsClass where ClassEName='" & ClassEName & "'"
	Set RsClassObj = Conn.Execute(ClassSql)
	if Not RsClassObj.Eof then
		if RsClassObj("SaveFilePath") = "/" then
			ClassSaveFilePath = RsClassObj("SaveFilePath")
		else
			ClassSaveFilePath = RsClassObj("SaveFilePath") & "/"
		end if
		if MoreLinkContentStr <> "" then
			if MoreLinkTypeStr = "1" then
				MoreLinkContentStr="<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ ><img border=0 src=""" & MoreLinkContentStr & """></a>"
			elseif MoreLinkTypeStr = "0" then
				MoreLinkContentStr = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & MoreLinkContentStr & "</a>"
			else
				MoreLinkContentStr = ""
			end if
		end if
		AllClassID = "'" & RsClassObj("ClassID") & "'" & ChildClassIDList(RsClassObj("ClassID"))
		NewsSql = "Select top " & NewsListNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.ClassID=NewsClass.ClassID and News.AuditTF=1 and NewsClass.ClassID in (" & AllClassID & ") order by AddDate Desc"
		SelfClass = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
		Set RsNewsObj = Conn.Execute(NewsSql)
		do while Not RsNewsObj.Eof
			SelfClass = SelfClass & "<tr>" & Chr(13) & Chr(10)
			for i = 1 to RowNumberStr
				if DateRuleStr <> "" then
					if DateRightStr = "Left" then
						TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>"
					elseif DateRightStr = "Center" then
						TempDateShowStr = "<td align=""center""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
					elseif DateRightStr = "Right" then
						TempDateShowStr = "<td align=""Right""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</td>" & "</span>" & Chr(13) & Chr(10)
					else
						TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>"
					end if
				else
					TempDateShowStr = ""
				end if
				if RsNewsObj("SaveFilePath") = "/" then
					ClassSaveFilePath = RsNewsObj("SaveFilePath")
				else
					ClassSaveFilePath = RsNewsObj("SaveFilePath") & "/"
				end if
				if ShowClassCNNameStr = "1" then
					ClassCNName = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsNewsObj("ClassEName") & "/index." & RsNewsObj("ClassFileExtName") & """ >[" & GotTopic(RsNewsObj("ClassCName"),TitleNumberStr) & "]</a>&nbsp;"
				else
					ClassCNName = ""
				end if
				if RsNewsObj("HeadNewsTF") = 1 then
					if DateRightStr = "Center" Or DateRightStr = "Center" then
						SelfClass = SelfClass & "<td " & RowHeightStr & ">" & NaviPicStr & ClassCNName & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & RsNewsObj("HeadNewsPath") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
					else
						SelfClass = SelfClass & "<td " & RowHeightStr & ">" & NaviPicStr & ClassCNName & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & RsNewsObj("HeadNewsPath") & """  title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
					end if
				else
					if DateRightStr = "Center" Or DateRightStr = "Center" then
						SelfClass = SelfClass & "<td " & RowHeightStr & ">" & NaviPicStr & ClassCNName & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsNewsObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("NewsFileExtName") & """  title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
					else
						SelfClass = SelfClass & "<td " & RowHeightStr & ">" & NaviPicStr & ClassCNName & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsNewsObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("NewsFileExtName") & """  title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
					end if
				end if
				RsNewsObj.MoveNext
				if RsNewsObj.Eof then
					Exit For
				end if
			Next
			SelfClass = SelfClass & "</tr>" & Chr(13) & Chr(10)
			SelfClass = SelfClass & CompatPicStr
		Loop
		if MoreLinkContentStr <> "" then
			if DateRuleStr <> "" then
				SelfClass = SelfClass & "<tr><td " & TempRowNumberStr & " align=""right"">" & MoreLinkContentStr & "</td></tr>" & Chr(13) & Chr(10)
			else
				SelfClass = SelfClass & "<tr><td align=""right"" " & TempRowNumberStr & ">" & MoreLinkContentStr & "</td></tr>" & Chr(13) & Chr(10)
			end if
		end if
		SelfClass = SelfClass & "</table>" & Chr(13) & Chr(10)
		Set RsNewsObj = Nothing
	else
		SelfClass = ""
	end if
	Set RsClassObj = Nothing
End Function
'调用栏目子栏目
Function ChildClassList(ClassNumberStr,NewsNumberStr,CompatPicStr,NaviPicStr,ClassRowHeightStr,NewsRowHeightStr,ClassRowNumberStr,NewsRowNumberStr,DateRuleStr,DateRightStr,TitleNumberStr,MoreLinkTypeStr,MoreLinkContentStr,ClassBGPicStr,CSSStyleStr,OpenTypeStr,DateCSSStyleStr,TxtNaviStr)
	Dim TempSetNewsRowHeightStr
	Dim TempSetNewsNumberStr
	Dim TempSetTitleNumberStr
	Dim TempSetCompatPicStr
	Dim TempSetNaviPicStr
	Dim TempSetDateRuleStr
	Dim TempSetDateRightStr
	Dim TempSetNewsRowNumberStr
	Dim TempSetMoreLinkTypeStr
	Dim TempSetMoreLinkContentStr
	Dim TempSetCSSStyleStr
	Dim TempSetOpenTypeStr
	Dim TempSetDateCSSStyleStr
	Dim TempSetTxtNaviStr
	TempSetNewsRowHeightStr = NewsRowHeightStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if RefreshType = "Class" then
		Dim ClassSql,RsClassObj,AllChildClassID,i
		AllChildClassID = ChildClassIDList(RefreshID)
		if AllChildClassID <> "" then
			if Left(AllChildClassID,1) = "," then
				AllChildClassID = Right(AllChildClassID,Len(AllChildClassID)-1)
			end if
		else
			ChildClassList = ""
			Exit Function
		end if
		if ClassBGPicStr <> "" then
			ClassBGPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & ClassRowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & ClassBGPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
		end if
		ClassSql = "Select Top " & ClassNumberStr & " * from NewsClass where ClassID in (" & AllChildClassID & ") and DelFlag=0 order by ID desc"
		Set RsClassObj = Conn.Execute(ClassSql)
		if Not RsClassObj.Eof then
			ChildClassList = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
			do while Not RsClassObj.Eof
				TempSetNewsRowHeightStr = NewsRowHeightStr
				TempSetNewsRowHeightStr = NewsRowHeightStr
				TempSetNewsNumberStr = NewsNumberStr
				TempSetTitleNumberStr = TitleNumberStr
				TempSetCompatPicStr = CompatPicStr
				TempSetNaviPicStr = NaviPicStr
				TempSetDateRuleStr = DateRuleStr
				TempSetDateRightStr = DateRightStr
				TempSetNewsRowNumberStr = NewsRowNumberStr
				TempSetMoreLinkTypeStr = MoreLinkTypeStr
				TempSetMoreLinkContentStr = MoreLinkContentStr
				TempSetCSSStyleStr = CSSStyleStr
				TempSetOpenTypeStr = OpenTypeStr
				TempSetDateCSSStyleStr = DateCSSStyleStr
				TempSetTxtNaviStr = TxtNaviStr
				ChildClassList = ChildClassList & "<tr>" & Chr(13) & Chr(10)
				For i = 1 to ClassRowNumberStr
					ChildClassList = ChildClassList & "<td valign=""top"">" & GetOneClassNewsList(RsClassObj,TempSetNewsNumberStr,TempSetTitleNumberStr,TempSetCompatPicStr,TempSetNaviPicStr,TempSetDateRuleStr,TempSetDateRightStr,TempSetNewsRowHeightStr,TempSetNewsRowNumberStr,TempSetMoreLinkTypeStr,TempSetMoreLinkContentStr,TempSetCSSStyleStr,TempSetOpenTypeStr,TempSetDateCSSStyleStr,TempSetTxtNaviStr) & "</td>"
					RsClassObj.MoveNext
					if RsClassObj.Eof then
						Exit For
					end if
				Next
				ChildClassList = ChildClassList & "</tr>" & Chr(13) & Chr(10)
				ChildClassList = ChildClassList & ClassBGPicStr & Chr(13) & Chr(10)
			Loop
			ChildClassList = ChildClassList & "</table>" & Chr(13) & Chr(10)
		else
			ChildClassList = ""
		end if
	else
		ChildClassList = ""
	end if
End Function
'得到一个栏目的新闻列表
Function GetOneClassNewsList(AlreadyClassObj,NewsListNumberStr,TitleNumberStr,CompatPicStr,NaviPicStr,DateRuleStr,DateRightStr,RowHeightStr,RowNumberStr,MoreLinkTypeStr,MoreLinkContentStr_R,CSSStyleStr,OpenTypeStr,DateCSSStyleStr,TxtNaviStr)
	Dim RsNewsObj,NewsSql,i,ClassSaveFilePath
	Dim TempRowNumberStr,TempDateShowStr,MoreLinkContentStr
	if Not AlreadyClassObj.Eof then
		if DateRuleStr <> "" then
			if DateRightStr = "Left" then
				TempRowNumberStr = "colspan=""" & RowNumberStr & """"
			elseif DateRightStr = "Center" then
				TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
			elseif DateRightStr = "Right" then
				TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
			else
				TempRowNumberStr = "colspan=""" & RowNumberStr & """"
			end if
		else
			TempRowNumberStr = "colspan=""" & RowNumberStr & """"
		end if
		if AlreadyClassObj("SaveFilePath") = "/" then
			ClassSaveFilePath = AlreadyClassObj("SaveFilePath")
		else
			ClassSaveFilePath = AlreadyClassObj("SaveFilePath") & "/"
		end if
		if OpenTypeStr = "1" then
			 OpenTypeStr = "target=""_blank"""
		else
			OpenTypeStr = ""
		end if
		if MoreLinkContentStr_R <> "" then
			if MoreLinkTypeStr = "1" then
				MoreLinkContentStr="<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & AlreadyClassObj("ClassEName") & "/index." & AlreadyClassObj("FileExtName") & """ ><img border=0 src=""" & MoreLinkContentStr_R & """></a>"
			elseif MoreLinkTypeStr = "0" then
				MoreLinkContentStr = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & AlreadyClassObj("ClassEName") & "/index." & AlreadyClassObj("FileExtName") & """ >" & MoreLinkContentStr_R & "</a>"
			else
				MoreLinkContentStr = ""
			end if
		end if
		NewsSql = "Select top " & NewsListNumberStr & " Title,Path,AddDate,HeadNewsTF,HeadNewsPath,FileName,FileExtName,TitleStyle from News where ClassID='" & AlreadyClassObj("ClassID") & "' and AuditTF=1 and DelTF=0"
		GetOneClassNewsList = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		if TxtNaviStr <> "" then
			NaviPicStr = TxtNaviStr
		else
			if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
		end if
		if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
		if CompatPicStr <> "" then
			if DateRightStr <> "" then
				CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 " & TempRowNumberStr & ">" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
			else
				CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 " & TempRowNumberStr & ">" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
			end if
		end if
		if DateRuleStr <> "" then
			GetOneClassNewsList = GetOneClassNewsList & "<tr><td colspan=""2"" align=""center""><a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & AlreadyClassObj("ClassEName") & "/index." & AlreadyClassObj("FileExtName") & """ >" & AlreadyClassObj("ClassCName") & "</a></td></tr>" & Chr(13) & Chr(10)
		else
			GetOneClassNewsList = GetOneClassNewsList & "<tr><td align=""center""><a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & AlreadyClassObj("ClassEName") & "/index." & AlreadyClassObj("FileExtName") & """ >" & AlreadyClassObj("ClassCName") & "</a></td></tr>" & Chr(13) & Chr(10)
		end if
		Set RsNewsObj = Conn.Execute(NewsSql)
		if Not RsNewsObj.Eof then
			do while Not RsNewsObj.Eof
				GetOneClassNewsList = GetOneClassNewsList & "<tr>" & Chr(13) & Chr(10)
				for i = 1 to RowNumberStr
					if DateRuleStr <> "" then
						if DateRightStr = "Left" then
							TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>"
						elseif DateRightStr = "Center" then
							TempDateShowStr = "<td align=""center""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
						elseif DateRightStr = "Right" then
							TempDateShowStr = "<td align=""Right""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>" & "</td>" & Chr(13) & Chr(10)
						else
							TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>"
						end if
					else
						TempDateShowStr = ""
					end if
					if RsNewsObj("HeadNewsTF") = 1 then
						if DateRightStr = "Center" OR DateRightStr = "Right" then
							GetOneClassNewsList = GetOneClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & RsNewsObj("HeadNewsPath") & """  title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
						else
							GetOneClassNewsList = GetOneClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & RsNewsObj("HeadNewsPath") & """  title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
						end if
					else
						if DateRightStr = "Center" OR DateRightStr = "Right" then
							GetOneClassNewsList = GetOneClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & AlreadyClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """  title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
						else
							GetOneClassNewsList = GetOneClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & AlreadyClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """  title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
						end if
					end if
					RsNewsObj.MoveNext
					if RsNewsObj.Eof then
						Exit For
					end if
				Next
				GetOneClassNewsList = GetOneClassNewsList & "</tr>" & Chr(13) & Chr(10) & CompatPicStr & Chr(13) & Chr(10)
			Loop
			if MoreLinkContentStr <> "" then
				if DateRuleStr <> "" then
					GetOneClassNewsList = GetOneClassNewsList & "<tr><td " & TempRowNumberStr & " align=""right"">" & MoreLinkContentStr & "</td></tr>" & Chr(13) & Chr(10)
				else
					GetOneClassNewsList = GetOneClassNewsList & "<tr><td align=""right"" " & TempRowNumberStr & ">" & MoreLinkContentStr & "</td></tr>" & Chr(13) & Chr(10)
				end if
			end if
			GetOneClassNewsList = GetOneClassNewsList & "</table>" & Chr(13) & Chr(10)
		else
			GetOneClassNewsList = ""
		end if
		Set RsNewsObj = Nothing
	else
		GetOneClassNewsList = ""
	end if
End Function
'调用专题新闻列表
Function SpecialNewsList(SpecialID,NewsNumberStr,TitleNumberStr,CompatPicStr,NaviPicStr,DateRuleStr,DateRightStr,RowHeightStr,RowNumberStr,MoreLinkTypeStr,MoreLinkContentStr,CSSStyleStr,OpenTypeStr,DateCSSStyleStr,TxtNaviStr)
	Dim SpecialSql,RsSpecialObj,i,RsTempObj,ClassSaveFilePath
	Dim TempRowNumberStr,TempDateShowStr
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	if DateRuleStr <> "" then
		if DateRightStr = "Left" then
			TempRowNumberStr = "colspan=""" & RowNumberStr & """"
		elseif DateRightStr = "Center" then
			TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
		elseif DateRightStr = "Right" then
			TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
		else
			TempRowNumberStr = "colspan=""" & RowNumberStr & """"
		end if
	else
		TempRowNumberStr = "colspan=""" & RowNumberStr & """"
	end if
	CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 " & TempRowNumberStr & ">" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	SpecialSql = "Select * from Special where EName ='" & SpecialID & "'"
	Set RsTempObj = Conn.Execute(SpecialSql)
	if Not RsTempObj.Eof then
		if RsTempObj("SaveFilePath") = "/" then
			ClassSaveFilePath = RsTempObj("SaveFilePath")
		else
			ClassSaveFilePath = RsTempObj("SaveFilePath") & "/"
		end if
		if MoreLinkContentStr <> "" then
			if MoreLinkTypeStr = "1" then
				MoreLinkContentStr="<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsTempObj("EName") & "/index." & RsTempObj("FileExtName") & """ ><img border=0 src=""" & MoreLinkContentStr & """></a>"
			elseif MoreLinkTypeStr = "0" then
				MoreLinkContentStr = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsTempObj("EName") & "/index." & RsTempObj("FileExtName") & """ >" & MoreLinkContentStr & "</a>"
			else
				MoreLinkContentStr = ""
			end if
		end if
		SpecialSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.ClassID=NewsClass.ClassID and News.SpecialID like '%" & RsTempObj("SpecialID") & "%' and News.AuditTF=1 and News.DelTF=0 order by AddDate Desc"
		Set RsSpecialObj = Conn.Execute(SpecialSql)
		SpecialNewsList = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">"
		do while Not RsSpecialObj.Eof
			SpecialNewsList = SpecialNewsList & "<tr>" & Chr(13) & Chr(10)
			for i = 1 to RowNumberStr
				if DateRuleStr <> "" then
					if DateRightStr = "Left" then
						TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>"
					elseif DateRightStr = "Center" then
						TempDateShowStr = "<td align=""center""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
					elseif DateRightStr = "Right" then
						TempDateShowStr = "<td align=""Right""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</td>" & "</span>" & Chr(13) & Chr(10)
					else
						TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>"
					end if
				else
					TempDateShowStr = ""
				end if
				if RsSpecialObj("SaveFilePath") = "/" then
					ClassSaveFilePath = RsSpecialObj("SaveFilePath")
				else
					ClassSaveFilePath = RsSpecialObj("SaveFilePath") & "/"
				end if
				if RsSpecialObj("HeadNewsTF") = 1 then
					if DateRightStr = "Center" OR DateRightStr = "Right" then
						SpecialNewsList = SpecialNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & RsSpecialObj("HeadNewsPath") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
					else
						SpecialNewsList = SpecialNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & RsSpecialObj("HeadNewsPath") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
					end if
				else
					if DateRightStr = "Center" OR DateRightStr = "Right" then
						SpecialNewsList = SpecialNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsSpecialObj("ClassEName") & "/" & RsSpecialObj("FileName") & "." & RsSpecialObj("NewsFileExtName") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
					else
						SpecialNewsList = SpecialNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsSpecialObj("ClassEName") & "/" & RsSpecialObj("FileName") & "." & RsSpecialObj("NewsFileExtName") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
					end if
				end if
				RsSpecialObj.MoveNext
				if RsSpecialObj.Eof then Exit For 
			Next
			SpecialNewsList = SpecialNewsList & "</tr>" & Chr(13) & Chr(10)
			SpecialNewsList = SpecialNewsList & CompatPicStr & Chr(13) & Chr(10)
		Loop
		if MoreLinkContentStr <> "" then
			SpecialNewsList = SpecialNewsList & "<tr><td align=""right"" " & TempRowNumberStr & ">" & MoreLinkContentStr & "</td></tr>" & Chr(13) & Chr(10)
		end if
		SpecialNewsList = SpecialNewsList & "</table>"
		Set RsSpecialObj = Nothing
	else
		SpecialNewsList = ""
	end if
	Set RsTempObj = Nothing
End Function
'专题终极分类
Function SpecialLastNewsList(NewsNumberStr,RowNumberStr,NaviPicStr,BGPicStr,RowHeightStr,CssFileStr,OpenModeStr,DetachPageStr,TitleNumberStr,DateRuleStr,DateRightStr,DateCSSStyleStr,TxtNaviStr)
	Dim SpecialSql,RsSpecialObj,RsTempObj,i,ClassSaveFilePath
	Dim PageNum,PageIndex,LoopVar,TempSpecialNewsList,SpecialNewsPageStr,TempClassSaveFilePath,ClassSaveExtName,j
	Dim TempRowNumberStr,TempDateShowStr
	if RefreshType = "Special" then
		if TxtNaviStr <> "" then
			NaviPicStr = TxtNaviStr
		else
			if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
		end if
		if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
		if DateRuleStr <> "" then
			if DateRightStr = "Left" then
				TempRowNumberStr = "colspan=""" & RowNumberStr & """"
			elseif DateRightStr = "Center" then
				TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
			elseif DateRightStr = "Right" then
				TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
			else
				TempRowNumberStr = "colspan=""" & RowNumberStr & """"
			end if
		else
			TempRowNumberStr = "colspan=""" & RowNumberStr & """"
		end if
		BGPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 " & TempRowNumberStr & "><table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & BGPicStr & """></td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table></td>" & Chr(13) & Chr(10) & "</tr>"
		if OpenModeStr = "1" then
			 OpenModeStr = "target=""_blank"""
		else
			OpenModeStr = ""
		end if
		SpecialSql = "Select * from Special where SpecialID ='" & RefreshID & "'"
		Set RsTempObj = Conn.Execute(SpecialSql)
		if Not RsTempObj.Eof then
			if RsTempObj("SaveFilePath") = "/" then
				TempClassSaveFilePath = AvailableDoMain & RsTempObj("SaveFilePath") & RsTempObj("EName")
				ClassSaveExtName = RsTempObj("FileExtName")
			else
				TempClassSaveFilePath = AvailableDoMain & RsTempObj("SaveFilePath") & "/" & RsTempObj("EName")
				ClassSaveExtName = RsTempObj("FileExtName")
			end if
			SpecialSql = "Select *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.ClassID=NewsClass.ClassID  and News.SpecialID like '%" & RefreshID & "%' and News.AuditTF=1 and News.DelTF=0 order by AddDate Desc"
			Set RsSpecialObj = Server.CreateObject("ADODB.RecordSet")
			RsSpecialObj.Open SpecialSql,Conn,1,1
			if Not RsSpecialObj.Eof then
				RsSpecialObj.PageSize = NewsNumberStr
				PageNum = RsSpecialObj.PageCount
			else
				PageNum = 0
			end if
			if (DetachPageStr = "1") and (PageNum > 1) then
				for PageIndex = 1 to PageNum
					SpecialNewsPageStr = "<tr><td " & TempRowNumberStr & "><table border=""0"" width=""100%""><tr><td width=""50%"" align=""right""><br>第<font color=red>" & PageIndex&"</font>页,共<font color=red>"&PageNum & "</font>页 "
					if PageIndex = 1 then
						SpecialNewsPageStr = SpecialNewsPageStr & "<font face=webdings>9</font> "
						SpecialNewsPageStr = SpecialNewsPageStr & "<font face=webdings>7</font> "
					elseif PageIndex=2 then
						SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=首页><font face=webdings>9</font></a> "
						SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=上一页><font face=webdings>7</font></a> "
					else
						SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=首页><font face=webdings>9</font></a> "
						SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index_"&PageIndex-1&"." & ClassSaveExtName & """　title=上一页><font face=webdings>7</font></a> "
					end if
					dim G
					G=0
					for j = PageIndex to PageNum
						if j = 1 then
							if j=PageIndex then
								SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "." & ClassSaveExtName & """><font color=red>[" & j & "]</font></a> "
							else
								SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "." & ClassSaveExtName & """>[" & j & "]</a> "
							end if
						else
							if j=PageIndex then
								SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & j & "." & ClassSaveExtName & """><font color=red>[" & j & "]</font></a> "
							else
								SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & j & "." & ClassSaveExtName & """>[" & j & "]</a> "
							end if
						end if
						G=G+1
						if G mod 10 = 0 then
					     exit for
						End if
					Next
					if PageIndex=PageNum then
						SpecialNewsPageStr = SpecialNewsPageStr & "<font face=webdings>8</font> "
					else
						SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & PageIndex+1 & "." & ClassSaveExtName & """  title=下一页><font face=webdings>8</font></a> "
					end if
					if PageIndex=PageNum then
						SpecialNewsPageStr = SpecialNewsPageStr & "<font face=webdings>:</font> "
					else
						SpecialNewsPageStr = SpecialNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index_"&PageNum&"." & ClassSaveExtName & """ title=最后一页><font face=webdings>:</font></a> "
					end if
					SpecialNewsPageStr = SpecialNewsPageStr & "</td></tr></table></td></tr>"
					RsSpecialObj.AbsolutePage = PageIndex
					Dim TempAlreadyShow
					TempAlreadyShow = 1
					TempSpecialNewsList = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
					for LoopVar = 1 to RsSpecialObj.PageSize
						if TempAlreadyShow > RsSpecialObj.PageSize then Exit For
						if RsSpecialObj.Eof then Exit For
						TempSpecialNewsList = TempSpecialNewsList & "<tr>" & Chr(13) & Chr(10)
						for i = 1 to RowNumberStr
							TempAlreadyShow = TempAlreadyShow + 1
							if DateRuleStr <> "" then
								if DateRightStr = "Left" then
									TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>"
								elseif DateRightStr = "Center" then
									TempDateShowStr = "<td align=""center""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
								elseif DateRightStr = "Right" then
									TempDateShowStr = "<td align=""Right""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
								else
									TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>"
								end if
							else
								TempDateShowStr = ""
							end if
							if RsSpecialObj("SaveFilePath") = "/" then
								ClassSaveFilePath = RsSpecialObj("SaveFilePath")
							else
								ClassSaveFilePath = RsSpecialObj("SaveFilePath") & "/"
							end if
							if RsSpecialObj("HeadNewsTF") = 1 then
								if DateRightStr = "Center" OR DateRightStr = "Right" then
									TempSpecialNewsList = TempSpecialNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & RsSpecialObj("HeadNewsPath") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
								else
									TempSpecialNewsList = TempSpecialNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & RsSpecialObj("HeadNewsPath") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
								end if
							else
								if DateRightStr = "Center" OR DateRightStr = "Right" then
									TempSpecialNewsList = TempSpecialNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsSpecialObj("ClassEName") & "/" & RsSpecialObj("FileName") & "." & RsSpecialObj("NewsFileExtName") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
								else
									TempSpecialNewsList = TempSpecialNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsSpecialObj("ClassEName") & "/" & RsSpecialObj("FileName") & "." & RsSpecialObj("NewsFileExtName") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
								end if
							end if
							RsSpecialObj.MoveNext
							if RsSpecialObj.Eof then Exit For
							if TempAlreadyShow > RsSpecialObj.PageSize then Exit For
						Next
						TempSpecialNewsList = TempSpecialNewsList & "</tr>" & Chr(13) & Chr(10)
						TempSpecialNewsList = TempSpecialNewsList & BGPicStr & Chr(13) & Chr(10)
					Next
					TempSpecialNewsList = TempSpecialNewsList & SpecialNewsPageStr & Chr(13) & Chr(10)
					TempSpecialNewsList = TempSpecialNewsList & "</table>"
					if SpecialLastNewsList = "" then
						SpecialLastNewsList = TempSpecialNewsList
					else
						SpecialLastNewsList = SpecialLastNewsList & "$$$" & TempSpecialNewsList
					end if
				Next
			else
				SpecialLastNewsList = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">"
				do while Not RsSpecialObj.Eof
					SpecialLastNewsList = SpecialLastNewsList & "<tr>" & Chr(13) & Chr(10)
					for i = 1 to RowNumberStr
						if DateRuleStr <> "" then
							if DateRightStr = "Left" then
								TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>"
							elseif DateRightStr = "Center" then
								TempDateShowStr = "<td align=""center""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
							elseif DateRightStr = "Right" then
								TempDateShowStr = "<td align=""Right""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr)& "</span>" & "</td>"  & Chr(13) & Chr(10)
							else
								TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsSpecialObj("AddDate"),DateRuleStr) & "</span>"
							end if
						else
							TempDateShowStr = ""
						end if
						if RsSpecialObj("SaveFilePath") = "/" then
							ClassSaveFilePath = RsSpecialObj("SaveFilePath")
						else
							ClassSaveFilePath = RsSpecialObj("SaveFilePath") & "/"
						end if
						if RsSpecialObj("HeadNewsTF") = 1 then
							if DateRightStr = "Center" OR DateRightStr = "Right" then
								SpecialLastNewsList = SpecialLastNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & RsSpecialObj("HeadNewsPath") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
							else
								SpecialLastNewsList = SpecialLastNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & RsSpecialObj("HeadNewsPath") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
							end if
						else
							if DateRightStr = "Center" OR DateRightStr = "Right" then
								SpecialLastNewsList = SpecialLastNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsSpecialObj("ClassEName") & "/" & RsSpecialObj("FileName") & "." & RsSpecialObj("NewsFileExtName") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
							else
								SpecialLastNewsList = SpecialLastNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsSpecialObj("ClassEName") & "/" & RsSpecialObj("FileName") & "." & RsSpecialObj("NewsFileExtName") & """  title="""& RsSpecialObj("Title")&""">" & GetHTMLTitle(RsSpecialObj("TitleStyle"),GotTopic(RsSpecialObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
							end if
						end if
						RsSpecialObj.MoveNext
						if RsSpecialObj.Eof then Exit For
					Next
					SpecialLastNewsList = SpecialLastNewsList & "</tr>"
					SpecialLastNewsList = SpecialLastNewsList & BGPicStr
				Loop
				SpecialLastNewsList = SpecialLastNewsList & "</table>"
			end if
			Set RsSpecialObj = Nothing
			SpecialLastNewsList = Split(SpecialLastNewsList,"$$$")
		else
			SpecialLastNewsList = Array("")
		end if
	else
		SpecialLastNewsList = Array("")
	end if
End Function
'专题图片导航
Function SpecialNavi(PicTF,SpecialClassID,PicHeight,PicWidth,Dhang,SpecialCss,SpecialMore)
	Dim SpecialNaviObj,ClassSaveFilePath
	Set SpecialNaviObj=conn.execute("select * from special where EName='"&SpecialClassID&"'")
	if SpecialNaviObj.eof then
		SpecialNavi=""
	else
		if SpecialNaviObj("SaveFilePath") = "/" then
			ClassSaveFilePath = SpecialNaviObj("SaveFilePath")
		else
			ClassSaveFilePath = SpecialNaviObj("SaveFilePath") & "/"
		end if
		SpecialNavi=""
		if PicTF = "1" then 
			SpecialNavi=SpecialNavi&"<table><tr><td><img src="& Dummy_Riker & SpecialNaviObj("NaviPic")&" height="&PicHeight&" width="&PicWidth&"></td><td><a href="& Dummy_Riker & ClassSaveFilePath & SpecialNaviObj("EName")&" target=_blank><b>"&SpecialNaviObj("CName")&"</b></a><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="&SpecialCss&">"&left(SpecialNaviObj("IndexNaviWord"),Dhang)&"</span></td></tr>"
		else
			SpecialNavi=SpecialNavi&"<table><tr><td><a href="& Dummy_Riker & ClassSaveFilePath & SpecialNaviObj("EName")&" target=_blank><b>"&SpecialNaviObj("CName")&"</b></a><br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="&SpecialCss&">"&left(SpecialNaviObj("IndexNaviWord"),Dhang)&"</span></td></tr>"
		end if
			SpecialNavi=SpecialNavi&"</table>"
	end if
	Set SpecialNaviObj = Nothing
	
End Function
'当前位置
Function Location(NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	Select Case RefreshType
		Case "Index"
			Location = "<a Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & "/Index."&confimsn("IndexExtName")&"""><font color=red>首页</font></a>"
		Case "Class"
			Location = GetClassLocationStr(RefreshID,NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
		Case "News"
			Location = GetNewsLocationStr(RefreshID,NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
		Case "Special"
			Location = GetSpecialLocationStr(RefreshID,NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
		Case "DownLoad"
			Location = GetDownLoadLocationStr(RefreshID,NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
		Case Else
			Location = ""
	End Select
End Function
'栏目当前位置
Function GetClassLocationStr(ClassID,NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
	Dim SqlClass,RsClassObj
	if ClassID = "" then Exit Function
	if NaviType = "1" then
		CompatStr = "<img src=""" & CompatStr & """>"
	end if
	Set RsClassObj = Conn.Execute("Select FileExtName,SaveFilePath,ParentID,ClassID,ClassEName,ClassCName from NewsClass where ClassID='" & ClassID & "'")
	if Not RsClassObj.Eof then
		if RsClassObj("SaveFilePath") = "/" then
			GetClassLocationStr = GetClassLocationStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>"
		else
			GetClassLocationStr = GetClassLocationStr & "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>"
		end if
		do while RsClassObj("ParentID") <> 0
			Set RsClassObj = Conn.Execute("Select FileExtName,SaveFilePath,ParentID,ClassID,ClassEName,ClassCName from NewsClass where ClassID='" & RsClassObj("ParentID") & "'")
			if RsClassObj.Eof then Exit do
			if RsClassObj("SaveFilePath") = "/" then
				GetClassLocationStr = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>" & CompatStr & GetClassLocationStr
			else
				GetClassLocationStr = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>" & CompatStr & GetClassLocationStr
			end if
		loop
	end if
	GetClassLocationStr = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & "/Index."&confimsn("IndexExtName")&"""><font color=red>首页</font></a>" & CompatStr & GetClassLocationStr
	RsClassObj.Close
	Set RsClassObj = Nothing
End Function
'新闻当前位置
Function GetNewsLocationStr(NewsID,NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
	Dim RsNewsObj
	if NaviType = "1" then
		CompatStr = "<img src=""" & CompatStr & """>"
	end if
	Set RsNewsObj = Conn.Execute("Select ClassID from News where NewsID='" & NewsID & "'")
	if Not RsNewsObj.Eof then
		GetNewsLocationStr = GetClassLocationStr(RsNewsObj("ClassID"),NaviType,CompatStr,OpenTypeStr,CSSStyleStr) & CompatStr & "新闻"
	else
		GetNewsLocationStr = ""
	end if
	Set RsNewsObj = Nothing
End Function
'下载当前位置
Function GetDownLoadLocationStr(DownLoadID,NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
	Dim RsDownLoadObj
	if NaviType = "1" then
		CompatStr = "<img src=""" & CompatStr & """>"
	end if
	Set RsDownLoadObj = Conn.Execute("Select ClassID from DownLoad where DownLoadID='" & DownLoadID & "'")
	if Not RsDownLoadObj.Eof then
		GetDownLoadLocationStr = GetClassLocationStr(RsDownLoadObj("ClassID"),NaviType,CompatStr,OpenTypeStr,CSSStyleStr) & CompatStr & "新闻"
	else
		GetDownLoadLocationStr = ""
	end if
	Set RsDownLoadObj = Nothing
End Function
'专题当前位置
Function GetSpecialLocationStr(SpecialID,NaviType,CompatStr,OpenTypeStr,CSSStyleStr)
	Dim SpecialSql,RsSpecialObj
	if NaviType = "1" then
		CompatStr = "<img src=""" & CompatStr & """>"
	end if
	SpecialSql = "Select * from Special where SpecialID='" & SpecialID & "'"
	Set RsSpecialObj = Conn.Execute(SpecialSql)
	if RsSpecialObj.Eof then
		GetSpecialLocationStr = ""
	else
		GetSpecialLocationStr = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & "/Index."&confimsn("IndexExtName")&"""><font color=red>首页</font></a>" & CompatStr & RsSpecialObj("CName")
	end if
	Set RsSpecialObj = Nothing
End Function
'总站导航
Function LocationNavi(NaviType,RowNumber,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,TxtNaviStr)
	Dim NaviArray,i,TempStr
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then 
			NaviPicStr = "<img src=""" & NaviPicStr & """ border=""0"">"
		else
			NaviPicStr = ""
		end if
	end if
	if CompatPicStr <> "" then
		CompatPicStr = "background=""" & CompatPicStr & """"
	else
		CompatPicStr = ""
	end if
	RowNumber = RowNumber
	LocationNavi = "<table border=""0"" width=""100%;"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10)
	Select Case NaviType
		Case "1"
			TempStr = GetRootClassNavi(OpenTypeStr,CSSStyleStr)
		Case "2"
			TempStr = GetSpecialNavi(OpenTypeStr,CSSStyleStr)
		Case "3"
			TempStr = GetPlusNavi(OpenTypeStr,CSSStyleStr)
		Case "4"
			TempStr = GetRootClassNavi(OpenTypeStr,CSSStyleStr) & "{$$$}" & GetSpecialNavi(OpenTypeStr,CSSStyleStr)
		Case "5"
			TempStr = GetRootClassNavi(OpenTypeStr,CSSStyleStr) & "{$$$}" & GetPlusNavi(OpenTypeStr,CSSStyleStr)
		Case "6"
			TempStr = GetSpecialNavi(OpenTypeStr,CSSStyleStr) & "{$$$}" & GetPlusNavi(OpenTypeStr,CSSStyleStr)
		Case "7"
			TempStr = GetRootClassNavi(OpenTypeStr,CSSStyleStr) & "{$$$}" & GetSpecialNavi(OpenTypeStr,CSSStyleStr) & "{$$$}" & GetPlusNavi(OpenTypeStr,CSSStyleStr)
		Case Else
			LocationNavi = ""
			Exit Function
	End Select
	NaviArray = Split(TempStr,"{$$$}")
	for i = LBound(NaviArray) to UBound(NaviArray)
		LocationNavi = LocationNavi & "<td " & CompatPicStr & ">" & NaviPicStr & NaviArray(i) & "</td>" & Chr(13) & Chr(10)
		if ((i + 1) Mod RowNumber) = 0 then
			LocationNavi = LocationNavi & "</tr>" & Chr(13) & Chr(10) & "<tr>"
		end if
	Next
	LocationNavi = LocationNavi & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10)
End Function
'专题导航
Function GetSpecialNavi(OpenTypeStr,CSSStyleStr)
	Dim SpecialSql,RsSpecialObj
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	SpecialSql = "Select * from Special where ShowNaviTF=1 order by ID desc"
	Set RsSpecialObj = Conn.Execute(SpecialSql)
	do while Not RsSpecialObj.Eof
		if GetSpecialNavi = "" then
			if RsSpecialObj("SaveFilePath") = "/" then
				GetSpecialNavi = "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & AvailableDoMain & RsSpecialObj("SaveFilePath") & RsSpecialObj("EName") & "/" & "index." & RsSpecialObj("FileExtName") & """ >" & RsSpecialObj("CName") & "</a>"
			else
				GetSpecialNavi = "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & AvailableDoMain & RsSpecialObj("SaveFilePath") & "/" & RsSpecialObj("EName") & "/" & "index." & RsSpecialObj("FileExtName") & """ >" & RsSpecialObj("CName") & "</a>"
			end if
		else
			if RsSpecialObj("SaveFilePath") = "/" then
				GetSpecialNavi = GetSpecialNavi & "{$$$}" & "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & AvailableDoMain & RsSpecialObj("SaveFilePath") & RsSpecialObj("EName") & "/" & "index." & RsSpecialObj("FileExtName") & """ >" & RsSpecialObj("CName") & "</a>"
			else
				GetSpecialNavi = GetSpecialNavi & "{$$$}" & "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & AvailableDoMain & RsSpecialObj("SaveFilePath") & "/" & RsSpecialObj("EName") & "/" & "index." & RsSpecialObj("FileExtName") & """ >" & RsSpecialObj("CName") & "</a>"
			end if
		end if
		RsSpecialObj.MoveNext
	Loop
End Function
'栏目导航
Function GetRootClassNavi(OpenTypeStr,CSSStyleStr)
	Dim ClassSql,RsClassObj
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	ClassSql = "Select SaveFilePath,ClassEName,ClassCName,FileExtName from NewsClass where ParentID='0' and DelFlag=0  order by ID asc"
	Set RsClassObj = Conn.Execute(ClassSql)
	do while Not RsClassObj.Eof
		if GetRootClassNavi = "" then
			if RsClassObj("SaveFilePath") = "/" then
				GetRootClassNavi = "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & Dummy_Riker & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>"
			else
				GetRootClassNavi = "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & Dummy_Riker & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>"
			end if
		else
			if RsClassObj("SaveFilePath") = "/" then
				GetRootClassNavi = GetRootClassNavi & "{$$$}" & "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & Dummy_Riker & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>"
			else
				GetRootClassNavi = GetRootClassNavi & "{$$$}" & "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & Dummy_Riker & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>"
			end if
		end if
		RsClassObj.MoveNext
	loop
	Set RsClassObj = Nothing
End Function
'插件导航
Function GetPlusNavi(OpenTypeStr,CSSStyleStr)
	Dim PlusSql,RsPlusObj,OpenType
	PlusSql = "Select Name,Link,OpenType from Plus where ShowTF=1  order by ID asc"
	Set RsPlusObj = Conn.Execute(PlusSql)
	do while Not RsPlusObj.Eof
		if RsPlusObj("OpenType") = 1 then
			OpenType = " target=""_blank"""
		else
			OpenType = ""
		end if
		if GetPlusNavi = "" then
			GetPlusNavi = "<a class=""" & CSSStyleStr & """ " & OpenType & " href=""" & RsPlusObj("Link") & """ >" & RsPlusObj("Name") & "</a>"
		else
			GetPlusNavi = GetPlusNavi & "{$$$}" & "<a class=""" & CSSStyleStr & """ " & OpenType & " href=""" & RsPlusObj("Link") & """ >" & RsPlusObj("Name") & "</a>"
		end if
		RsPlusObj.MoveNext
	loop
	Set RsPlusObj = Nothing
End Function
'栏目导航
Function ClassNavi(NaviPicStr,CompatPicStr,RowNumberStr,OpenTypeStr,CSSStyleStr,TxtNaviStr)
	Dim ClassSql,RsClassObj,i
	if RefreshType = "Class" then
		if CompatPicStr <> "" then
			CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
		end if
		if OpenTypeStr = "1" then
			 OpenTypeStr = "target=""_blank"""
		else
			OpenTypeStr = ""
		end if
		if TxtNaviStr <> "" then
			NaviPicStr = TxtNaviStr
		else
			If NaviPicStr <> "" then
				NaviPicStr = "<img src=""" & NaviPicStr & """ border=""0"">"
			Else
				NaviPicStr = ""
			End If
		end if
		ClassSql = "Select SaveFilePath,ClassEName,ClassCName,FileExtName from NewsClass where ParentID='" & RefreshID & "'"
		Set RsClassObj = Conn.Execute(ClassSql)
		ClassNavi = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RsClassObj.Eof
			ClassNavi = ClassNavi & "<tr>" & Chr(13) & Chr(10)
			for i = 1 to RowNumberStr
				if RsClassObj("SaveFilePath") = "/" then
					ClassNavi = ClassNavi & "<td>" & NaviPicStr & "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a></td>" & Chr(13) & Chr(10)
				else
					ClassNavi = ClassNavi & "<td>" & NaviPicStr & "<a class=""" & CSSStyleStr & """  " & OpenTypeStr & " href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a></td>" & Chr(13) & Chr(10)
				end if
				RsClassObj.MoveNext
				if RsClassObj.Eof then
					Exit For
				end if
			Next
			ClassNavi = ClassNavi & "</tr>" & Chr(13) & Chr(10)
		loop
		ClassNavi = ClassNavi & "</table>" & Chr(13) & Chr(10)
		Set RsClassObj = Nothing
	else
		ClassNavi = ""
	end if
End Function
'热点新闻
Function HotNews(NewNumberStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,RowHeightStr,TxtNaviStr)
	Dim HotNewsSql,RsHotNewsObj,i,AlreadyNewsCount
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	NewNumberStr = CInt(NewNumberStr)
	AlreadyNewsCount = 1
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if CompatPicStr <> "" then
		CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	HotNewsSql = "Select *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.ClassID=NewsClass.ClassID and DelTF=0 and News.AuditTF=1 order by News.ClickNum Desc" 
	Set RsHotNewsObj = Conn.Execute(HotNewsSql)
	HotNews = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	do while Not RsHotNewsObj.Eof
		if AlreadyNewsCount > NewNumberStr then
			Exit Do
		end if
		HotNews = HotNews & "<tr>" & Chr(13) & Chr(10)
		for i = 1 to RowNumberStr
			if AlreadyNewsCount > NewNumberStr then
				Exit For
			end if
			if RsHotNewsObj("HeadNewsTF") = 1 then
				HotNews = HotNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & RsHotNewsObj("HeadNewsPath") & """  title="""& RsHotNewsObj("Title")&""">" & GetHTMLTitle(RsHotNewsObj("TitleStyle"),GotTopic(RsHotNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
			else
				if RsHotNewsObj("SaveFilePath") = "/" then
					HotNews = HotNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & AvailableDoMain & RsHotNewsObj("SaveFilePath") & RsHotNewsObj("ClassEName") & "/" & RsHotNewsObj("FileName") & "." & RsHotNewsObj("NewsFileExtName") & """ title="""& RsHotNewsObj("Title")&""">" & GetHTMLTitle(RsHotNewsObj("TitleStyle"),GotTopic(RsHotNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
				else
					HotNews = HotNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & AvailableDoMain & RsHotNewsObj("SaveFilePath") & "/" & RsHotNewsObj("ClassEName") & "/" & RsHotNewsObj("FileName") & "." & RsHotNewsObj("NewsFileExtName") & """ title="""& RsHotNewsObj("Title")&""">" & GetHTMLTitle(RsHotNewsObj("TitleStyle"),GotTopic(RsHotNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
				end if
			end if
			AlreadyNewsCount = AlreadyNewsCount + 1
			RsHotNewsObj.MoveNext
			if RsHotNewsObj.Eof then
				Exit For
			end if
		Next
		HotNews = HotNews & "</tr>" & Chr(13) & Chr(10)
		HotNews = HotNews & CompatPicStr & Chr(13) & Chr(10)
	loop
	Set RsHotNewsObj = Nothing
	HotNews = HotNews & "</table>"
End Function 
'最新新闻 
Function LastNews(NewNumberStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,RowHeightStr,TxtNaviStr) 
	Dim LastNewsSql,RsLastNewsObj,i
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if CompatPicStr <> "" then
		CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	LastNewsSql = "Select Top " & NewNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.ClassID=NewsClass.ClassID and DelTF=0 and News.AuditTF=1 order by AddDate Desc"
	Set RsLastNewsObj = Conn.Execute(LastNewsSql)
	LastNews = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	do while Not RsLastNewsObj.Eof
		LastNews = LastNews & "<tr>" & Chr(13) & Chr(10)
		for i = 1 to RowNumberStr
			if RsLastNewsObj("HeadNewsTF") = 1 then
				LastNews = LastNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & RsLastNewsObj("HeadNewsPath") & """ title="""& RsLastNewsObj("Title")&""">" & GetHTMLTitle(RsLastNewsObj("TitleStyle"),GotTopic(RsLastNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
			else
				if RsLastNewsObj("SaveFilePath") = "/" then
					LastNews = LastNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & AvailableDoMain & RsLastNewsObj("SaveFilePath") & RsLastNewsObj("ClassEName") & "/" & RsLastNewsObj("FileName") & "." & RsLastNewsObj("NewsFileExtName") & """ title="""& RsLastNewsObj("Title")&""">" & GetHTMLTitle(RsLastNewsObj("TitleStyle"),GotTopic(RsLastNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
				else
					LastNews = LastNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & AvailableDoMain & RsLastNewsObj("SaveFilePath") & "/" & RsLastNewsObj("ClassEName") & "/" & RsLastNewsObj("FileName") & "." & RsLastNewsObj("NewsFileExtName") & """ title="""& RsLastNewsObj("Title")&""">" & GetHTMLTitle(RsLastNewsObj("TitleStyle"),GotTopic(RsLastNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
				end if
			end if
			RsLastNewsObj.MoveNext
			if RsLastNewsObj.Eof then
				Exit For
			end if
		Next
		LastNews = LastNews & "</tr>" & Chr(13) & Chr(10)
		LastNews = LastNews & CompatPicStr & Chr(13) & Chr(10)
	loop
	Set RsLastNewsObj = Nothing
	LastNews = LastNews & "</table>"
End Function
'推荐新闻
Function RecNews(NewNumberStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,RowHeightStr,TxtNaviStr)
	Dim RecNewsSql,RsRecNewsObj,i
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if CompatPicStr <> "" then
		CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	RecNewsSql = "Select Top " & NewNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.RecTF=1 and News.AuditTF=1 order by AddDate Desc"
	Set RsRecNewsObj = Conn.Execute(RecNewsSql)
	RecNews = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	do while Not RsRecNewsObj.Eof
		RecNews = RecNews & "<tr>" & Chr(13) & Chr(10)
		for i = 1 to RowNumberStr
			if RsRecNewsObj("HeadNewsTF") = 1 then
				RecNews = RecNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """" & OpenTypeStr & "  href=""" & RsRecNewsObj("HeadNewsPath") & """ title="""& RsRecNewsObj("Title")&""">" & GetHTMLTitle(RsRecNewsObj("TitleStyle"),GotTopic(RsRecNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
			else
				if RsRecNewsObj("SaveFilePath") = "/" then
					RecNews = RecNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """" & OpenTypeStr & "  href=""" & AvailableDoMain & RsRecNewsObj("SaveFilePath") & RsRecNewsObj("ClassEName") & "/" & RsRecNewsObj("FileName") & "." & RsRecNewsObj("NewsFileExtName") & """ title="""& RsRecNewsObj("Title")&""">" & GetHTMLTitle(RsRecNewsObj("TitleStyle"),GotTopic(RsRecNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
				else
					RecNews = RecNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """" & OpenTypeStr & "  href=""" & AvailableDoMain & RsRecNewsObj("SaveFilePath") & "/" & RsRecNewsObj("ClassEName") & "/" & RsRecNewsObj("FileName") & "." & RsRecNewsObj("NewsFileExtName") & """ title="""& RsRecNewsObj("Title")&""">" & GetHTMLTitle(RsRecNewsObj("TitleStyle"),GotTopic(RsRecNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
				end if
			end if
			RsRecNewsObj.MoveNext
			if RsRecNewsObj.Eof then
				Exit For
			end if
		Next
		RecNews = RecNews & "</tr>" & Chr(13) & Chr(10)
		RecNews = RecNews & CompatPicStr & Chr(13) & Chr(10)
	loop
	Set RsRecNewsObj = Nothing
	RecNews = RecNews & "</table>"
End Function
'滚动新闻
Function MarqueeNews(MarqueeNumberStr,TitleNumberStr,RowNumberStr,MarqueeWidthStr,MarqueeHeightStr,MarqueeSpeedStr,MarqueeTypeStr,DateRuleStr,OpenTypeStr,CSSStyleStr)
	Dim MarqueeSql,RsMarqueeObj,i,RikerDirection
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	If MarqueeTypeStr <> "" and isnull(MarqueeTypeStr)=false then
		RikerDirection = LCase(Cstr(MarqueeTypeStr))
	Else
		RikerDirection = "left"
	End If
	if MarqueeSpeedStr <> "" then MarqueeSpeedStr = " scrollamount=""" & MarqueeSpeedStr & """"
	if MarqueeTypeStr <> "" then MarqueeTypeStr = " direction=""" & MarqueeTypeStr & """"
	if MarqueeWidthStr <> "" then MarqueeWidthStr = " width=""" & MarqueeWidthStr & """"
	if MarqueeHeightStr <> "" then MarqueeHeightStr = " Height=""" & MarqueeHeightStr & """"
	if OpenTypeStr = "1" then
		 OpenTypeStr = " target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	MarqueeSql = "Select Top " & MarqueeNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.ClassID=NewsClass.ClassID and News.MarqueeNews=1 and News.DelTF=0 and News.AuditTF=1 order by AddDate Desc"
	Set RsMarqueeObj = Conn.Execute(MarqueeSql)
	MarqueeNews = "<MARQUEE" & MarqueeSpeedStr & MarqueeTypeStr & MarqueeWidthStr & MarqueeHeightStr & " onmouseover=""this.stop();"" onmouseout=""this.start();"">"
	If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
		MarqueeNews = MarqueeNews & "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	End If
	do while Not RsMarqueeObj.Eof
		If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
			MarqueeNews = MarqueeNews & "<tr>" & Chr(13) & Chr(10)
		End If
		for i = 1 to RowNumberStr
			if DateRuleStr = "" then
				if RsMarqueeObj("HeadNewsTF") = 1 then
					If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
						MarqueeNews = MarqueeNews & "<td><a class=""" & CSSStyleStr & """ href=""" & RsMarqueeObj("HeadNewsPath") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
					Else
						MarqueeNews = MarqueeNews & "<a class=""" & CSSStyleStr & """ href=""" & RsMarqueeObj("HeadNewsPath") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;&nbsp;"
					End If
				else
					if RsMarqueeObj("SaveFilePath") = "/" then
						If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
							MarqueeNews = MarqueeNews & "<td><a class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsMarqueeObj("SaveFilePath") & RsMarqueeObj("ClassEName") & "/" & RsMarqueeObj("FileName") & "." & RsMarqueeObj("NewsFileExtName") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
						Else
							MarqueeNews = MarqueeNews & "<a class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsMarqueeObj("SaveFilePath") & RsMarqueeObj("ClassEName") & "/" & RsMarqueeObj("FileName") & "." & RsMarqueeObj("NewsFileExtName") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;&nbsp;"
						End If
					else
						If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
							MarqueeNews = MarqueeNews & "<td><a class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsMarqueeObj("SaveFilePath") & "/" & RsMarqueeObj("ClassEName") & "/" & RsMarqueeObj("FileName") & "." & RsMarqueeObj("NewsFileExtName") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
						Else
							MarqueeNews = MarqueeNews & "<a class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsMarqueeObj("SaveFilePath") & "/" & RsMarqueeObj("ClassEName") & "/" & RsMarqueeObj("FileName") & "." & RsMarqueeObj("NewsFileExtName") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;&nbsp;"
						End If
					end if
				end if
			else
				if RsMarqueeObj("HeadNewsTF") = 1 then
					If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
						MarqueeNews = MarqueeNews & "<td><a class=""" & CSSStyleStr & """" & OpenTypeStr & " href=""" & RsMarqueeObj("HeadNewsPath") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;" & "<span class=""" & CSSStyleStr & """>" & DateFormat(RsMarqueeObj("AddDate"),DateRuleStr) & "</span>" & "</td>" & Chr(13) & Chr(10)
					Else
						MarqueeNews = MarqueeNews & "<a class=""" & CSSStyleStr & """" & OpenTypeStr & " href=""" & RsMarqueeObj("HeadNewsPath") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;" & "<span class=""" & CSSStyleStr & """>" & DateFormat(RsMarqueeObj("AddDate"),DateRuleStr) & "</span>" & "&nbsp;&nbsp;&nbsp;"
					End If
				else
					if RsMarqueeObj("SaveFilePath") = "/" then
						If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
							MarqueeNews = MarqueeNews & "<td><a class=""" & CSSStyleStr & """" & OpenTypeStr & " href=""" & AvailableDoMain & RsMarqueeObj("SaveFilePath") & RsMarqueeObj("ClassEName") & "/" & RsMarqueeObj("FileName") & "." & RsMarqueeObj("NewsFileExtName") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;" & "<span class=""" & CSSStyleStr & """>" & DateFormat(RsMarqueeObj("AddDate"),DateRuleStr) & "</span>" & "</td>" & Chr(13) & Chr(10)
						Else
							MarqueeNews = MarqueeNews & "<a class=""" & CSSStyleStr & """" & OpenTypeStr & " href=""" & AvailableDoMain & RsMarqueeObj("SaveFilePath") & RsMarqueeObj("ClassEName") & "/" & RsMarqueeObj("FileName") & "." & RsMarqueeObj("NewsFileExtName") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;" & "<span class=""" & CSSStyleStr & """>" & DateFormat(RsMarqueeObj("AddDate"),DateRuleStr) & "</span>" & "&nbsp;&nbsp;&nbsp;"
						End If
					else
						If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
							MarqueeNews = MarqueeNews & "<td><a class=""" & CSSStyleStr & """" & OpenTypeStr & " href=""" & AvailableDoMain & RsMarqueeObj("SaveFilePath") & "/" & RsMarqueeObj("ClassEName") & "/" & RsMarqueeObj("FileName") & "." & RsMarqueeObj("NewsFileExtName") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;" & "<span class=""" & CSSStyleStr & """>" & DateFormat(RsMarqueeObj("AddDate"),DateRuleStr) & "</span>" & "</td>" & Chr(13) & Chr(10)
						Else
							MarqueeNews = MarqueeNews & "<a class=""" & CSSStyleStr & """" & OpenTypeStr & " href=""" & AvailableDoMain & RsMarqueeObj("SaveFilePath") & "/" & RsMarqueeObj("ClassEName") & "/" & RsMarqueeObj("FileName") & "." & RsMarqueeObj("NewsFileExtName") & """ title="""& RsMarqueeObj("Title")&""""&OpenTypeStr&">" & GetHTMLTitle(RsMarqueeObj("TitleStyle"),GotTopic(RsMarqueeObj("Title"),TitleNumberStr)) & "</a>&nbsp;&nbsp;" & "<span class=""" & CSSStyleStr & """>" & DateFormat(RsMarqueeObj("AddDate"),DateRuleStr) & "</span>" & "&nbsp;&nbsp;&nbsp;"
						End If
					end if
				end if
			end if
			RsMarqueeObj.MoveNext
			if RsMarqueeObj.Eof then
				Exit For
			end if
		Next
		If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
			MarqueeNews = MarqueeNews & "</tr>" & Chr(13) & Chr(10)
		End If
	loop
	Set RsMarqueeObj = Nothing
	If Cstr(RikerDirection)<>"left" and Cstr(RikerDirection)<>"right" then
		MarqueeNews = MarqueeNews & "</table>" & Chr(13) & Chr(10)
	End If
	MarqueeNews = MarqueeNews & "</MARQUEE>" & Chr(13) & Chr(10)
End Function
'栏目新闻列表
Function ClassNewsList(ClassListStr,NewsNumberStr,RowNumberStr,NaviPicStr,BGPicStr,RowHeightStr,CssFileStr,OpenModeStr,DetachPageStr,TitleNumberStr,DateRuleStr,DateRightStr,DateCSSStyleStr,TxtNaviStr)
	Dim ClassSql,RsClassObj,NewsSql,RsNewsObj,i
	Dim PageNum,PageIndex,LoopVar,TempClassNewsList,ClassNewsPageStr,TempClassSaveFilePath,ClassSaveExtName,j
	Dim TempRowNumberStr,TempDateShowStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	ClassListStr = ""
	if ClassListStr <> "" then
		ClassSql = "Select * from NewsClass where ClassEName='" & ClassListStr & "'"
	else
		if RefreshType = "Class" then
			ClassSql = "Select * from NewsClass where ClassID='" & RefreshID & "'"
		else
			ClassSql = ""
		end if
	end if
	if ClassSql <> "" then
		if OpenModeStr = "1" then
			 OpenModeStr = "target=""_blank"""
		else
			OpenModeStr = ""
		end if
		if DateRuleStr <> "" then
			if DateRightStr = "Left" then
				TempRowNumberStr = "colspan=""" & RowNumberStr & """"
			elseif DateRightStr = "Center" then
				TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
			elseif DateRightStr = "Right" then
				TempRowNumberStr = "colspan=""" & RowNumberStr * 2 & """"
			else
				TempRowNumberStr = "colspan=""" & RowNumberStr & """"
			end if
		else
			TempRowNumberStr = "colspan=""" & RowNumberStr & """"
		end if
		if BGPicStr <> "" then
			BGPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 " & TempRowNumberStr & ">" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & BGPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
		end if
		if TxtNaviStr <> "" then
			NaviPicStr = TxtNaviStr
		else
			if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
		end if
		if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
		Set RsClassObj = Conn.Execute(ClassSql)
		if Not RsClassObj.Eof then
			if NewsNumberStr = "" then
				NewsNumberStr = 10
			else
				NewsNumberStr = CInt(NewsNumberStr)
			end if
			if RsClassObj("SaveFilePath") = "/" then
				TempClassSaveFilePath = AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName")
				ClassSaveExtName = RsClassObj("FileExtName")
			else
				TempClassSaveFilePath = AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName")
				ClassSaveExtName = RsClassObj("FileExtName")
			end if
			NewsSql = "Select * from News Where ClassID='" & RsClassObj("ClassID") & "' and DelTF=0 and AuditTF=1 order by ID desc"
			Set RsNewsObj = Server.CreateObject("ADODB.RecordSet")
			RsNewsObj.Open NewsSql,Conn,1,1
			if Not RsNewsObj.Eof then
				RsNewsObj.PageSize = NewsNumberStr
				PageNum = RsNewsObj.PageCount
			else
				PageNum = 0
			end if
			'Response.Write(PageNum & "--" & RsNewsObj.RecordCount & "---" & RsNewsObj.PageSize)
			'Response.End
			if (DetachPageStr = "1") and (PageNum > 1) then
				for PageIndex = 1 to PageNum
						ClassNewsPageStr = "<tr><td " & TempRowNumberStr & "><table border=""0"" width=""100%""><tr><td width=""50%"" align=""right""><br>第<font color=red>" & PageIndex&"</font>页,共<font color=red>"&PageNum & "</font>页 "
					if PageIndex = 1 then
						ClassNewsPageStr = ClassNewsPageStr & "<font face=webdings>9</font> "
						ClassNewsPageStr = ClassNewsPageStr & "<font face=webdings>7</font> "
					elseif PageIndex=2 then
						ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=首页><font face=webdings>9</font></a> "
						ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=上一页><font face=webdings>7</font></a> "
					else
						ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=首页><font face=webdings>9</font></a> "
						ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index_"&PageIndex-1&"." & ClassSaveExtName & """　title=上一页><font face=webdings>7</font></a> "
					end if
					dim G
					G=0
					for j = PageIndex to PageNum
						if j = 1 then
							if j=PageIndex then
								ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "." & ClassSaveExtName & """><font color=red>[" & j & "]</font></a> "
							else
								ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "." & ClassSaveExtName & """>[" & j & "]</a> "
							end if
						else
							if j=PageIndex then
								ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & j & "." & ClassSaveExtName & """><font color=red>[" & j & "]</font></a> "
							else
								ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & j & "." & ClassSaveExtName & """>[" & j & "]</a> "
							end if
						end if
						G=G+1
						if G mod 10 = 0 then
					     exit for
						End if
					Next
					if PageIndex=PageNum then
						ClassNewsPageStr = ClassNewsPageStr & "<font face=webdings>8</font> "
					else
						ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & PageIndex+1 & "." & ClassSaveExtName & """  title=下一页><font face=webdings>8</font></a> "
					end if
					if PageIndex=PageNum then
						ClassNewsPageStr = ClassNewsPageStr & "<font face=webdings>:</font> "
					else
						ClassNewsPageStr = ClassNewsPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index_"&PageNum&"." & ClassSaveExtName & """ title=最后一页><font face=webdings>:</font></a> "
					end if
					ClassNewsPageStr = ClassNewsPageStr & "</td></tr></table></td></tr>"
					RsNewsObj.AbsolutePage = PageIndex
					TempClassNewsList = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
					Dim TempAlreadyShow
					TempAlreadyShow = 1
					for LoopVar = 1 to RsNewsObj.PageSize
						if TempAlreadyShow > RsNewsObj.PageSize then Exit For
						if RsNewsObj.Eof then Exit For
						TempClassNewsList = TempClassNewsList & "<tr>" & Chr(13) & Chr(10)
						for i = 1 to RowNumberStr
							TempAlreadyShow = TempAlreadyShow + 1
							if DateRuleStr <> "" then
								if DateRightStr = "Left" then
									TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>"
								elseif DateRightStr = "Center" then
									TempDateShowStr = "<td align=""center""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
								elseif DateRightStr = "Right" then
									TempDateShowStr = "<td align=""Right""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
								else
									TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>"
								end if
							else
								TempDateShowStr = ""
							end if
							if RsNewsObj("HeadNewsTF") = 1 then
								if DateRightStr = "Center" OR  DateRightStr = "Right" then 
									TempClassNewsList = TempClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & RsNewsObj("HeadNewsPath") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
								else
									TempClassNewsList = TempClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & RsNewsObj("HeadNewsPath") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
								end if
							else
								if RsClassObj("SaveFilePath") = "/" then
									if DateRightStr = "Center" OR  DateRightStr = "Right" then 
										TempClassNewsList = TempClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
									else
										TempClassNewsList = TempClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
									end if
								else
									if DateRightStr = "Center" OR  DateRightStr = "Right" then 
										TempClassNewsList = TempClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
									else
										TempClassNewsList = TempClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
									end if
								end if
							end if
							RsNewsObj.MoveNext
							if TempAlreadyShow > RsNewsObj.PageSize then Exit For
							if RsNewsObj.Eof then Exit For
						Next
						TempClassNewsList = TempClassNewsList & "</tr>" & Chr(13) & Chr(10)
						TempClassNewsList = TempClassNewsList & BGPicStr & Chr(13) & Chr(10)
					Next
					TempClassNewsList = TempClassNewsList & ClassNewsPageStr & Chr(13) & Chr(10)
					TempClassNewsList = TempClassNewsList & "</table>"
					if ClassNewsList = "" then
						ClassNewsList = TempClassNewsList
					else
						ClassNewsList = ClassNewsList & "$$$" & TempClassNewsList
					end if
				Next
			else
				ClassNewsList = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
				do while Not RsNewsObj.Eof
					ClassNewsList = ClassNewsList & "<tr>" & Chr(13) & Chr(10)
					for i = 1 to RowNumberStr
						if DateRuleStr <> "" then
							if DateRightStr = "Left" then
								TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>"
							elseif DateRightStr = "Center" then
								TempDateShowStr = "<td align=""center""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
							elseif DateRightStr = "Right" then
								TempDateShowStr = "<td align=""Right""><span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>" & "</td>"& Chr(13) & Chr(10)
							else
								TempDateShowStr = "&nbsp;&nbsp;<span class=""" & DateCSSStyleStr & """>" & DateFormat(RsNewsObj("AddDate"),DateRuleStr) & "</span>"
							end if
						else
							TempDateShowStr = ""
						end if
						if RsNewsObj("HeadNewsTF") = 1 then
							if DateRightStr = "Center" OR  DateRightStr = "Right" then 
								ClassNewsList = ClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & RsNewsObj("HeadNewsPath") & """>" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
							else
								ClassNewsList = ClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & RsNewsObj("HeadNewsPath") & """>" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
							end if
						else
							if RsClassObj("SaveFilePath") = "/" then
								if DateRightStr = "Center" OR  DateRightStr = "Right" then 
									ClassNewsList = ClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
								else
									ClassNewsList = ClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
								end if
							else
								if DateRightStr = "Center" OR  DateRightStr = "Right" then 
									ClassNewsList = ClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a></td>" & TempDateShowStr & Chr(13) & Chr(10)
								else
									ClassNewsList = ClassNewsList & "<td " & RowHeightStr & ">" & NaviPicStr & "<a Class=""" & CssFileStr & """ " & OpenModeStr & "  href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/" & RsNewsObj("FileName") & "." & RsNewsObj("FileExtName") & """ title="""& RsNewsObj("Title")&""">" & GetHTMLTitle(RsNewsObj("TitleStyle"),GotTopic(RsNewsObj("Title"),TitleNumberStr)) & "</a>" & TempDateShowStr & "</td>" & Chr(13) & Chr(10)
								end if
							end if
						end if
						RsNewsObj.MoveNext
						if RsNewsObj.Eof then
							Exit For
						end if
					Next
					ClassNewsList = ClassNewsList & "</tr>" & Chr(13) & Chr(10)
					ClassNewsList = ClassNewsList & BGPicStr & Chr(13) & Chr(10)
				Loop
				ClassNewsList = ClassNewsList & "</table>"
			end if
			'Response.Write(ClassNewsList)
			'Response.End
			ClassNewsList = Split(ClassNewsList,"$$$")
			Set RsNewsObj = Nothing
		else
			ClassNewsList = Array("")
		end if
		Set RsClassObj = Nothing
	else
		ClassNewsList = Array("")
	end if
End Function
'一般搜索
Function Search()
	Search = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	Search = Search & "<form method=""post"" action=""" & AvailableDoMain & "/" & "search.asp"">" & Chr(13) & Chr(10)
	Search = Search & "<tr><td>" & Chr(13) & Chr(10)
	Search = Search & "<input type=""text"" name=""keyword"" size=""10"">&nbsp;" & Chr(13) & Chr(10)
	Search = Search & "<select name=""condition""><option value=""title"">标题</option>&nbsp;&nbsp;<option value=""content"">全文</option><option value=""author"">作者</option></select>" & Chr(13) & Chr(10)
	Search = Search & "&nbsp;&nbsp;<input type=""submit"" name=""Submit"" value="" 搜 索 "">" & Chr(13) & Chr(10)
	Search = Search & "</td></tr>" & Chr(13) & Chr(10)
	Search = Search & "</form>" & Chr(13) & Chr(10)
	Search = Search & "</table>" & Chr(13) & Chr(10)
End Function
'高级搜索
Function AdvancedSearch()
	AdvancedSearch = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "<form method=""post"" action=""" & AvailableDoMain & "/AdvanceSearch.asp"">" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "<tr><td>" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "<input type=""text"" name=""keyword"" size=""10"">&nbsp;" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "<select name=""SClass"" id=""SClass""><option value="""" selected>选择类别</option>" & ClassList & "</select>" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "开始时间&nbsp;<input type=""text"" size=""5"" name=""BeginDate"">&nbsp;结束时间&nbsp;<input type=""text"" size=""5"" name=""EndDate"">" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "<select name=""condition""><option value=""title"">标题</option><option value=""content"">全文</option><option value=""author"">作者</option></select>" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "<input type=""submit"" name=""Submit"" value="" 搜 索 "">" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "</td></tr>" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "</form>" & Chr(13) & Chr(10)
	AdvancedSearch = AdvancedSearch & "</table>" & Chr(13) & Chr(10)
End Function
'用户登陆
Function UseLogin()
	UseLogin = "<iframe src=""" & AvailableDoMain & "/Users/UserIndex.asp"" frameborder=""0"" width=""100%"" scrollong=""no""></iframe>"
End Function
'信息统计
Function InfoStat(ClassListStr,ShowModeStr,CssFileStr)
	Dim ClassSql,RsClassObj,NewsSql,RsNewsObj,TempClassID,TempClassIDArray,AllClassID
	Dim UserSql,RsUserObj
	Dim ClassNum,NewsNum,UserNum
	if ClassListStr = "" then
		if RefreshType = "Class" then
			TempClassID = ChildClassIDList(RefreshID)
			AllClassID = "'" & RefreshID & "'" & TempClassID
			TempClassIDArray = Split(AllClassID,",")
			ClassNum = UBound(TempClassIDArray)
			NewsSql = "Select Count(ID) from News where ClassID in (" & AllClassID & ")"
			Set RsNewsObj = Conn.Execute(NewsSql)
			NewsNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
		elseif RefreshType = "Index" then
			ClassSql = "Select Count(ID) from NewsClass"
			Set RsClassObj = Conn.Execute(ClassSql)
			ClassNum = RsClassObj(0)
			Set RsClassObj = Nothing
			NewsSql = "Select Count(ID) from News"
			Set RsNewsObj = Conn.Execute(NewsSql)
			NewsNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
		elseif RefreshType = "News" then
			ClassSql = "Select ClassID from News where ClassID='" & RefreshID & "' order by ID desc"
			Set RsClassObj = Conn.Execute(ClassSql)
			if Not RsClassObj.Eof then
				TempClassID = ChildClassIDList(RsClassObj("ClassID"))
				AllClassID = "'" & RsClassObj("ClassID") & "'" & TempClassID
				TempClassIDArray = Split(AllClassID,",")
				ClassNum = UBound(TempClassIDArray)
				NewsSql = "Select Count(ID) from News where ClassID in (" & AllClassID & ")"
				Set RsNewsObj = Conn.Execute(NewsSql)
				NewsNum = RsNewsObj(0)
				Set RsNewsObj = Nothing
			else
				ClassNum = 0
				NewsNum = 0
			end if
			Set RsClassObj = Nothing
		elseif RefreshType = "DownLoad" then
			ClassSql = "Select ClassID from DownLoad where ClassID='" & RefreshID & "' order by ID desc"
			Set RsClassObj = Conn.Execute(ClassSql)
			if Not RsClassObj.Eof then
				TempClassID = ChildClassIDList(RsClassObj("ClassID"))
				AllClassID = "'" & RsClassObj("ClassID") & "'" & TempClassID
				TempClassIDArray = Split(AllClassID,",")
				ClassNum = UBound(TempClassIDArray)
				NewsSql = "Select Count(ID) from News where ClassID in (" & AllClassID & ")"
				Set RsNewsObj = Conn.Execute(NewsSql)
				NewsNum = RsNewsObj(0)
				Set RsNewsObj = Nothing
			else
				ClassNum = 0
				NewsNum = 0
			end if
			Set RsClassObj = Nothing
		else
			ClassSql = ""
		end if
	else
		ClassSql = "Select ClassID from NewsClass where ClassEName='" & ClassListStr & "' order by AddTime,id desc"
		Set RsClassObj = Conn.Execute(ClassSql)
		if Not RsClassObj.Eof then
			TempClassID = ChildClassIDList(RsClassObj("ClassID"))
			AllClassID = "'" & RsClassObj("ClassID") & "'" & TempClassID
			TempClassIDArray = Split(AllClassID,",")
			ClassNum = UBound(TempClassIDArray)
			NewsSql = "Select Count(ID) from News where ClassID in (" & AllClassID & ")"
			Set RsNewsObj = Conn.Execute(NewsSql)
			NewsNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
		else
			ClassNum = 0
			NewsNum = 0
		end if
		Set RsClassObj = Nothing
	end if
	UserSql = "Select Count(ID) from Members"
	Set RsUserObj = Conn.Execute(UserSql)
	UserNum = RsUserObj(0)
	Set RsUserObj = Nothing
	InfoStat = "<table Class=""" & CssFileStr & """ cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	if ShowModeStr = "1" then
		InfoStat = InfoStat & "<tr>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "<td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "栏目数量&nbsp;&nbsp;" & ClassNum  & Chr(13) & Chr(10)
		InfoStat = InfoStat & "</td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "<td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "新闻数量&nbsp;&nbsp;" & NewsNum  & Chr(13) & Chr(10)
		InfoStat = InfoStat & "</td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "<td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "会员数量&nbsp;&nbsp;" & UserNum  & Chr(13) & Chr(10)
		InfoStat = InfoStat & "</td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "</tr>" & Chr(13) & Chr(10)
	else
		InfoStat = InfoStat & "<tr>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "<td>" & "栏目数量&nbsp;&nbsp;" & ClassNum & "</td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "</tr>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "<tr>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "<td>" & "新闻数量&nbsp;&nbsp;" & NewsNum & "</td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "</tr>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "<tr>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "<td>" & "会员数量&nbsp;&nbsp;" & UserNum & "</td>" & Chr(13) & Chr(10)
		InfoStat = InfoStat & "</tr>" & Chr(13) & Chr(10)
	end if
	InfoStat = InfoStat & "</table>"
End Function
'相关新闻
Function RelateNews(NewsNumberStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,CSSStyleStr,TxtNaviStr) 
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if RefreshType = "News" then 
		Dim RsRelateNewsObj,RsSearchObj,RelateNewsSql,SpecialID,RSpecialIDArray,i,OldSpecialID
		if CompatPicStr <> "" then
			CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
		end if
		if TxtNaviStr <> "" then
			NaviPicStr = TxtNaviStr
		else
			if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
		end if
		RelateNewsSql = "Select SpecialID,KeyWords from News where NewsID='" & RefreshID & "' order by ID desc"
		Set RsSearchObj = Conn.Execute(RelateNewsSql)
		if Not RsSearchObj.Eof then
			OldSpecialID = RsSearchObj("SpecialID")
			If RsSearchObj("KeyWords") <> "" and isnull(RsSearchObj("KeyWords"))=false then
				Dim KeyWordsStr,KeyWordsArray,SqlKeyWordStr,TRiker_j
				SqlKeyWordStr = ""
				KeyWordsStr = RsSearchObj("KeyWords")
				If KeyWordsStr<>"" and isnull(KeyWordsStr)=false then
					KeyWordsArray = split(KeyWordsStr,",")
					For TRiker_j = 0 to UBound(KeyWordsArray)
						If SqlKeyWordStr = "" then
							SqlKeyWordStr = "KeyWords like '%"&KeyWordsArray(TRiker_j)&"%' "
						Else
							SqlKeyWordStr = SqlKeyWordStr & "or KeyWords like '%"&KeyWordsArray(TRiker_j)&"%' "
						End If
					Next
				Else
					SqlKeyWordStr = "1=0"
				End If
				'-------------------------------------------
				RelateNewsSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and (" & SqlKeyWordStr & ") and News.DelTF=0 and News.AuditTF=1 order by AddDate Desc"
				Set RsRelateNewsObj = Conn.Execute(RelateNewsSql)
				if Not RsRelateNewsObj.Eof then
					RelateNews = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
					do while Not RsRelateNewsObj.Eof
						RelateNews = RelateNews & "<tr>" & Chr(13) & Chr(10)
						for i =1 to RowNumberStr
							if RsRelateNewsObj("NewsID") <> RefreshID then
								if RsRelateNewsObj("HeadNewsTF") then
									RelateNews = RelateNews & "<td>" & NaviPicStr & "<a Class=""" & CSSStyleStr & """ href= "& RsRelateNewsObj("HeadNewsPath") & " title="""& RsRelateNewsObj("Title")&""">"& GetHTMLTitle(RsRelateNewsObj("TitleStyle"),GotTopic(RsRelateNewsObj("Title"),TitleNumberStr)) & "</a></td>"
								else
									if RsRelateNewsObj("SaveFilePath") = "/" then
										RelateNews = RelateNews & "<td>" & NaviPicStr & "<a Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsRelateNewsObj("SaveFilePath") & RsRelateNewsObj("ClassEName") & "/" & RsRelateNewsObj("FileName") & "." & RsRelateNewsObj("NewsFileExtName") & """ title="""& RsRelateNewsObj("Title")&""">" & GetHTMLTitle(RsRelateNewsObj("TitleStyle"),GotTopic(RsRelateNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
									else
										RelateNews = RelateNews & "<td>" & NaviPicStr & "<a Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsRelateNewsObj("SaveFilePath") & "/" & RsRelateNewsObj("ClassEName") & "/" & RsRelateNewsObj("FileName") & "." & RsRelateNewsObj("NewsFileExtName") & """ title="""& RsRelateNewsObj("Title")&""">" & GetHTMLTitle(RsRelateNewsObj("TitleStyle"),GotTopic(RsRelateNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
									end if
								end if
							end if
							RsRelateNewsObj.MoveNext
							if RsRelateNewsObj.Eof then Exit For
						next
						RelateNews = RelateNews & "</tr>" & Chr(13) & Chr(10)
						RelateNews = RelateNews & CompatPicStr & Chr(13) & Chr(10)
					Loop
					RelateNews = RelateNews & "</table>"
				else
					RelateNews = ""
				end if
				RsRelateNewsObj.Close
				Set RsRelateNewsObj = Nothing
			else
				RelateNews = ""
			end if
		else
			RelateNews = ""
		end if
		Set RsSearchObj = Nothing
	else
		RelateNews = ""
	end if
End Function
'图片新闻
Function PicNews(ClassListStr,NewsNumberStr,ShowTitleStr,OpenModeStr,TitleNumberStr,RowNumStr,PicWidthStr,PicHeightStr,CssFileStr,RowSpaceStr)
	Dim PicSql,RsPicObj,TempSql,RsTempObj,i,TitleHTMLStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if ClassListStr = "" then
		if RefreshType = "Index" then
			PicSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "Class" then
			PicSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RefreshID & "' and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "News" then
			TempSql = "Select ClassID from News where NewsID='" & RefreshID & "' order by ID desc"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempobj.Eof then
				PicSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RsTempobj("ClassID") & "' and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			else
				PicSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			end if
		else
			PicSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		end if
	else
		PicSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and NewsClass.ClassEName='" & ClassListStr & "' and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
	end if
	Set RsPicObj = Conn.Execute(PicSql)
	if Not RsPicObj.Eof then
		if OpenModeStr = "1" then
			 OpenModeStr = "target=""_blank"""
		else
			OpenModeStr = ""
		end if
		PicNews = "<table cellpadding=""0"" cellspacing="""&RowSpaceStr&""" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RsPicObj.Eof
			PicNews = PicNews & "<tr>" & Chr(13) & Chr(10)
			TitleHTMLStr = "<tr>"
			for i =1 to RowNumStr
				if ShowTitleStr = "1" then
					if RsPicObj("SaveFilePath") = "/" then
						TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					else
						TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					end if
				else
					TitleHTMLStr = ""
				end if
				if RsPicObj("SaveFilePath") = "/" then
					PicNews = PicNews & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				else
					PicNews = PicNews & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				end if
				RsPicObj.MoveNext
				if RsPicObj.Eof then Exit For
			next
			PicNews = PicNews & "</tr>" & Chr(13) & Chr(10)
			PicNews = PicNews & TitleHTMLStr & "</tr>" & Chr(13) & Chr(10)
		Loop
		PicNews = PicNews & "</table>"
	else
		PicNews = ""
	end if
End Function
'??ID???
Function ChirldClassID(ClassEnameStr)
	Dim RsChirldFunObj,ChirldClassObj
	ChirldClassID = ""
	Set RsChirldFunObj = Conn.Execute("Select ClassID from NewsClass where ParentID=(Select ClassID from NewsClass where ClassEName='"&ClassEnameStr&"') order by AddTime,id desc")
	Set ChirldClassObj = Conn.Execute("Select ClassID from NewsClass where ClassEName='"&ClassEnameStr&"' order by ID desc")
	If Not ChirldClassObj.eof then
		ChirldClassID = ChirldClassObj("ClassID")
		If Not RsChirldFunObj.eof then
			ChirldClassID = RsChirldFunObj("ClassID")
		End If
		Do while Not RsChirldFunObj.eof
			ChirldClassID = ChirldClassID &"','"& RsChirldFunObj("ClassID")
		RsChirldFunObj.MoveNext
		Loop
		RsChirldFunObj.Close
		Set RsChirldFunObj = Nothing
	Else
		ChirldClassID = ""
	End If
	ChirldClassObj.Close
	Set ChirldClassObj = Nothing
	ChirldClassID = ChirldClassID
End Function
'????
Function FocusPic(ClassListStr,NewsNumberStr,HaveChildStr,ShowTitleStr,TitleNumberStr,OpenModeStr,RowNumStr,PicWidthStr,PicHeightStr,CssFileStr,RowSpaceStr)
	Dim PicSql,RsPicObj,TempSql,RsTempObj,i,TitleHTMLStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	If NewsNumberStr = "" or Isnull(NewsNumberStr) then
		NewsNumberStr = 10
	End If
	If HaveChildStr <> "" and ClassListStr <> "" then
		ClassListStr = ChirldClassID(ClassListStr)
	End If
	if ClassListStr = "" then
		if RefreshType = "Index" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.FocusNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "Class" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RefreshID & "' and News.DelTF=0 and News.FocusNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "News" then
			TempSql = "Select ClassID from News where NewsID='" & RefreshID & "'"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempobj.Eof then
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RsTempobj("ClassID") & "' and News.DelTF=0 and News.FocusNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			else
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.FocusNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			end if
		else
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.FocusNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		end if
	else
		PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID in ('" & ClassListStr & "') and News.DelTF=0 and News.FocusNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
	end if
	Set RsPicObj = Conn.Execute(PicSql)
	if Not RsPicObj.Eof then
		if OpenModeStr = "1" then
			 OpenModeStr = "target=""_blank"""
		else
			OpenModeStr = ""
		end if
		FocusPic = "<table cellpadding=""0"" cellspacing="""&RowSpaceStr&""" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RsPicObj.Eof
			FocusPic = FocusPic & "<tr>" & Chr(13) & Chr(10)
			TitleHTMLStr = "<tr>"
			for i =1 to RowNumStr
				if ShowTitleStr = "1" then
					if RsPicObj("SaveFilePath") = "/" then
						TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					else
						TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					end if
				else
					TitleHTMLStr = ""
				end if
				if RsPicObj("SaveFilePath") = "/" then
					FocusPic = FocusPic & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				else
					FocusPic = FocusPic & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				end if
				RsPicObj.MoveNext
				if RsPicObj.Eof then Exit For
			next
			FocusPic = FocusPic & "</tr>" & Chr(13) & Chr(10)
			FocusPic = FocusPic & TitleHTMLStr & "</tr>" & Chr(13) & Chr(10)
		Loop
		FocusPic = FocusPic & "</table>"
	else
		FocusPic = ""
	end if
End Function
'????
Function RecPic(ClassListStr,NewsNumberStr,HaveChildStr,ShowTitleStr,TitleNumberStr,OpenModeStr,RowNumStr,PicWidthStr,PicHeightStr,CssFileStr,RowSpaceStr)
	Dim PicSql,RsPicObj,TempSql,RsTempObj,i,TitleHTMLStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	If NewsNumberStr = "" or Isnull(NewsNumberStr) then
		NewsNumberStr = 10
	End If
	If HaveChildStr <> "" and ClassListStr <> "" then
		ClassListStr = ChirldClassID(ClassListStr)
	End If
	if ClassListStr = "" then
		if RefreshType = "Index" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.RecTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "Class" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RefreshID & "' and News.DelTF=0 and News.RecTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "News" then
			TempSql = "Select ClassID from News where NewsID='" & RefreshID & "' order by AddDate Desc"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempobj.Eof then
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RsTempobj("ClassID") & "' and News.DelTF=0 and News.RecTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			else
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.RecTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			end if
		else
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.RecTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		end if
	else
		PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID in ('" & ClassListStr & "') and News.DelTF=0 and News.RecTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
	end if
	Set RsPicObj = Conn.Execute(PicSql)
	if Not RsPicObj.Eof then
		if OpenModeStr = "1" then
			 OpenModeStr = "target=""_blank"""
		else
			OpenModeStr = ""
		end if
		RecPic = "<table cellpadding=""0"" cellspacing="""&RowSpaceStr&""" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RsPicObj.Eof
			RecPic = RecPic & "<tr>" & Chr(13) & Chr(10)
			TitleHTMLStr = "<tr>"
			for i =1 to RowNumStr
				if ShowTitleStr = "1" then
					if RsPicObj("SaveFilePath") = "/" then
						TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					else
						TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					end if
				else
					TitleHTMLStr = ""
				end if
				if RsPicObj("SaveFilePath") = "/" then
					RecPic = RecPic & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				else
					RecPic = RecPic & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				end if
				RsPicObj.MoveNext
				if RsPicObj.Eof then Exit For
			next
			RecPic = RecPic & "</tr>" & Chr(13) & Chr(10)
			RecPic = RecPic & TitleHTMLStr & "</tr>" & Chr(13) & Chr(10)
		Loop
		RecPic = RecPic & "</table>"
	else
		RecPic = ""
	end if
End Function
'????
Function ClassicalNews(ClassListStr,NewsNumberStr,HaveChildStr,ShowTitleStr,TitleNumberStr,OpenModeStr,RowNumStr,PicWidthStr,PicHeightStr,CssFileStr,RowSpaceStr)
	Dim PicSql,RsPicObj,TempSql,RsTempObj,i,TitleHTMLStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	If NewsNumberStr = "" or Isnull(NewsNumberStr) then
		NewsNumberStr = 10
	End If
	If HaveChildStr <> "" and ClassListStr <> "" then
		ClassListStr = ChirldClassID(ClassListStr)
	End If
	if ClassListStr = "" then
		if RefreshType = "Index" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.ClassicalNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "Class" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RefreshID & "' and News.DelTF=0 and News.ClassicalNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "News" then
			TempSql = "Select ClassID from News where NewsID='" & RefreshID & "'"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempobj.Eof then
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RsTempobj("ClassID") & "' and News.DelTF=0 and News.ClassicalNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			else
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.ClassicalNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			end if
		else
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.ClassicalNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		end if
	else
		PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID in ('" & ClassListStr & "') and News.DelTF=0 and News.ClassicalNewsTF=1 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
	end if
	Set RsPicObj = Conn.Execute(PicSql)
	if Not RsPicObj.Eof then
		if OpenModeStr = "1" then
			 OpenModeStr = "target=""_blank"""
		else
			OpenModeStr = ""
		end if
		ClassicalNews = "<table cellpadding=""0"" cellspacing="""&RowSpaceStr&""" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RsPicObj.Eof
			ClassicalNews = ClassicalNews & "<tr>" & Chr(13) & Chr(10)
			TitleHTMLStr = "<tr>"
			for i =1 to RowNumStr
				if ShowTitleStr = "1" then
					if RsPicObj("SaveFilePath") = "/" then
						TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					else
						TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					end if
				else
					TitleHTMLStr = ""
				end if
				if RsPicObj("SaveFilePath") = "/" then
					ClassicalNews = ClassicalNews & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				else
					ClassicalNews = ClassicalNews & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				end if
				RsPicObj.MoveNext
				if RsPicObj.Eof then Exit For
			next
			ClassicalNews = ClassicalNews & "</tr>" & Chr(13) & Chr(10)
			ClassicalNews = ClassicalNews & TitleHTMLStr & "</tr>" & Chr(13) & Chr(10)
		Loop
		ClassicalNews = ClassicalNews & "</table>"
	else
		ClassicalNews = ""
	end if
End Function
'????
Function ClassicalPic(ClassListStr,NewsNumberStr,HaveChildStr,ShowTitleStr,TitleNumberStr,OpenModeStr,RowNumStr,PicWidthStr,PicHeightStr,CssFileStr,RowSpaceStr)
	Dim PicSql,RsPicObj,TempSql,RsTempObj,i,TitleHTMLStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	If NewsNumberStr = "" or Isnull(NewsNumberStr) then
		NewsNumberStr = 10
	End If
	If HaveChildStr <> "" and ClassListStr <> "" then
		ClassListStr = ChirldClassID(ClassListStr)
	End If
	if ClassListStr = "" then
		if RefreshType = "Index" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by News.ClickNum,News.ID Desc"
		elseif RefreshType = "Class" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RefreshID & "' and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by News.ClickNum,News.ID Desc"
		elseif RefreshType = "News" then
			TempSql = "Select ClassID from News where NewsID='" & RefreshID & "' order by AddDate Desc"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempobj.Eof then
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RsTempobj("ClassID") & "' and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by News.ClickNum,News.ID Desc"
			else
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by News.ClickNum,News.ID Desc"
			end if
		else
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by News.ClickNum,News.ID Desc"
		end if
	else
		PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID in ('" & ClassListStr & "') and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by News.ClickNum,News.ID Desc"
	end if
	Set RsPicObj = Conn.Execute(PicSql)
	if Not RsPicObj.Eof then
		if OpenModeStr = "1" then
			 OpenModeStr = "target=""_blank"""
		else
			OpenModeStr = ""
		end if
		ClassicalPic = "<table cellpadding=""0"" cellspacing="""&RowSpaceStr&""" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RsPicObj.Eof
			ClassicalPic = ClassicalPic & "<tr>" & Chr(13) & Chr(10)
			TitleHTMLStr = "<tr>"
			for i =1 to RowNumStr
				if ShowTitleStr = "1" then
					if RsPicObj("SaveFilePath") = "/" then
						TitleHTMLStr = TitleHTMLStr & "<td><div align=""center"">" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></div></td>" & Chr(13) & Chr(10)
					else
						TitleHTMLStr = TitleHTMLStr & "<td><div align=""center"">" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></div></td>" & Chr(13) & Chr(10)
					end if
				else
					TitleHTMLStr = ""
				end if
				if RsPicObj("SaveFilePath") = "/" then
					ClassicalPic = ClassicalPic & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				else
					ClassicalPic = ClassicalPic & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
				end if
				RsPicObj.MoveNext
				if RsPicObj.Eof then Exit For
			next
			ClassicalPic = ClassicalPic & "</tr>" & Chr(13) & Chr(10)
			ClassicalPic = ClassicalPic & TitleHTMLStr & "</tr>" & Chr(13) & Chr(10)
		Loop
		ClassicalPic = ClassicalPic & "</table>"
	else
		ClassicalPic = ""
	end if
End Function
'图片终极分类
Function LastClassPic(CutPageStr,NewsNumberStr,ShowTitleStr,TitleNumberStr,OpenModeStr,RowNumStr,PicWidthStr,PicHeightStr,CssFileStr,RowSpaceStr)
	Dim PicSql,RsPicObj,TempSql,RsTempObj,i,TitleHTMLStr
	Dim PageNum,PageIndex,LoopVar,TempClassPicList,ClassPicPageStr,TempClassSaveFilePath,ClassSaveExtName,j
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	If NewsNumberStr = "" or Isnull(NewsNumberStr) then
		NewsNumberStr = 10
	End If
	if RefreshType = "Class" then
		PicSql = "Select *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RefreshID & "' and News.DelTF=0 and News.PicNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
	else
		PicSql = ""
	end if
	'response.Write(PicSql)
	'response.end
	if PicSql <> "" then
		Set RsPicObj = Server.CreateObject("ADODB.RecordSet")
		RsPicObj.Open PicSql,Conn,1,1
		if Not RsPicObj.Eof then
			if RsPicObj("SaveFilePath") = "/" then
				TempClassSaveFilePath = AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName")
				ClassSaveExtName = RsPicObj("FileExtName")
			else
				TempClassSaveFilePath = AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName")
				ClassSaveExtName = RsPicObj("FileExtName")
			end if
			if OpenModeStr = "1" then
				 OpenModeStr = "target=""_blank"""
			else
				OpenModeStr = ""
			end if
			if NewsNumberStr = "" then
				NewsNumberStr = 10
			else
				NewsNumberStr = CInt(NewsNumberStr)
			end if
			RsPicObj.PageSize = NewsNumberStr
			PageNum = RsPicObj.PageCount
					'Response.Write(PageNum & "--" & RsPicObj.RecordCount & "--" & RsPicObj.PageSize)
					'Response.End
			if (CutPageStr = "1") and (PageNum > 1) then
				for PageIndex = 1 to PageNum
					ClassPicPageStr = "<tr><td colspan=""" & RowNumStr & """><table border=""0"" width=""100%""><tr><td width=""50%"" align=""right"">本栏目共<font color=red>" & PageNum & "</font>页,当前第<font color=red>" & PageIndex & "</font>页&nbsp;&nbsp;"
					if PageIndex = 1 then
						ClassPicPageStr = ClassPicPageStr & "<font face=webdings>9</font> "
						ClassPicPageStr = ClassPicPageStr & "<font face=webdings>7</font> "
					elseif PageIndex=2 then
						ClassPicPageStr = ClassPicPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=首页><font face=webdings>9</font></a> "
						ClassPicPageStr = ClassPicPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=上一页><font face=webdings>7</font></a> "
					else
						ClassPicPageStr = ClassPicPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=首页><font face=webdings>9</font></a> "
						ClassPicPageStr = ClassPicPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index_"&PageIndex-1&"." & ClassSaveExtName & """　title=上一页><font face=webdings>7</font></a> "
					end if
					dim G
					G=0
					for j = PageIndex to PageNum
						if j = 1 then
							ClassPicPageStr = ClassPicPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "." & ClassSaveExtName & """>[" & j & "]</a> "
						else
							ClassPicPageStr = ClassPicPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & j & "." & ClassSaveExtName & """>[" & j & "]</a> "
						end if
						G=G+1
						if G mod 10 = 0 then
					     exit for
						End if
					Next
					if PageIndex=PageNum then
						ClassPicPageStr = ClassPicPageStr & "<font face=webdings>8</font> "
					else
						ClassPicPageStr = ClassPicPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & PageIndex+1 & "." & ClassSaveExtName & """  title=下一页><font face=webdings>8</font></a> "
					end if
					if PageIndex=PageNum then
						ClassPicPageStr = ClassPicPageStr & "<font face=webdings>:</font> "
					else
						ClassPicPageStr = ClassPicPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index_"&PageNum&"." & ClassSaveExtName & """ title=最后一页><font face=webdings>:</font></a> "
					end if
					ClassPicPageStr = ClassPicPageStr & "</td></tr></table></td></tr>"
					RsPicObj.AbsolutePage = PageIndex
					TempClassPicList = "<table cellpadding=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
					Dim TempAlreadyShow
					TempAlreadyShow = 1
					for LoopVar = 1 to RsPicObj.PageSize
						if TempAlreadyShow > RsPicObj.PageSize then Exit For
						if RsPicObj.Eof then Exit For
						TempClassPicList = TempClassPicList & "<tr>" & Chr(13) & Chr(10)
						TitleHTMLStr = "<tr>"
						for i = 1 to RowNumStr
							TempAlreadyShow = TempAlreadyShow + 1
							if ShowTitleStr = "1" then
								if RsPicObj("SaveFilePath") = "/" then
									TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
								else
									TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
								end if
							else
								TitleHTMLStr = ""
							end if
							if RsPicObj("SaveFilePath") = "/" then
								TempClassPicList = TempClassPicList & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
							else
								TempClassPicList = TempClassPicList & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
							end if
							RsPicObj.MoveNext
							if RsPicObj.Eof then Exit For
							if TempAlreadyShow > RsPicObj.PageSize then Exit For
						next
						TempClassPicList = TempClassPicList & "</tr>" & Chr(13) & Chr(10)
						TempClassPicList = TempClassPicList & TitleHTMLStr & "</tr>" & Chr(13) & Chr(10)
						'LoopVar = LoopVar - 1
					Next
					TempClassPicList = TempClassPicList & ClassPicPageStr & Chr(13) & Chr(10)
					TempClassPicList = TempClassPicList & "</table>"
					if LastClassPic = "" then
						LastClassPic = TempClassPicList
					else
						LastClassPic = LastClassPic & "$$$" & TempClassPicList
					end if
				Next
			else
				LastClassPic = "<table cellpadding=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
				do while Not RsPicObj.Eof
					LastClassPic = LastClassPic & "<tr>" & Chr(13) & Chr(10)
					TitleHTMLStr = "<tr>"
					for i =1 to RowNumStr
						if ShowTitleStr = "1" then
							if RsPicObj("SaveFilePath") = "/" then
								TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
							else
								TitleHTMLStr = TitleHTMLStr & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & GotTopic(RsPicObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
							end if
						else
							TitleHTMLStr = ""
						end if
						if RsPicObj("SaveFilePath") = "/" then
							LastClassPic = LastClassPic & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
						else
							LastClassPic = LastClassPic & "<td>" & Chr(13) & Chr(10) & "<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsPicObj("SaveFilePath") & "/" & RsPicObj("ClassEName") & "/" & RsPicObj("FileName") & "." & RsPicObj("NewsFileExtName") & """ title="""& RsPicObj("Title")&""">" & "<img border=""0"" src=""" & AvailableDoMain & RsPicObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>" & "</a></td>" & Chr(13) & Chr(10)
						end if
						RsPicObj.MoveNext
						if RsPicObj.Eof then Exit For
					next
					LastClassPic = LastClassPic & "</tr>" & Chr(13) & Chr(10)
					LastClassPic = LastClassPic & TitleHTMLStr & "</tr>" & Chr(13) & Chr(10)
				Loop
				LastClassPic = LastClassPic & "</table>"
			end if
			'Response.Write(LastClassPic)
			'Response.End
			LastClassPic = Split(LastClassPic,"$$$")
			Set RsPicObj = Nothing
		else
			LastClassPic = Array("")
		end if
	else
		LastClassPic = Array("")
	end if
End Function
'????
Function TodayNews(ClassListStr,NewsNumberStr,HaveChildStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,RowHeightStr,TxtNaviStr) 
	Dim LastNewsSql,RsLastNewsObj,i,PicSql
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if CompatPicStr <> "" then
		CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	If NewsNumberStr = "" or Isnull(NewsNumberStr) then
		NewsNumberStr = 10
	End If
	If HaveChildStr <> "" and ClassListStr <> "" then
		ClassListStr = ChirldClassID(ClassListStr)
	End If
	if ClassListStr = "" then
		if RefreshType = "Index" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.TodayNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "Class" then
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RefreshID & "' and News.DelTF=0 and News.TodayNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		elseif RefreshType = "News" then
			TempSql = "Select ClassID from News where NewsID='" & RefreshID & "' order by AddDate Desc"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempobj.Eof then
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID='" & RsTempobj("ClassID") & "' and News.DelTF=0 and News.TodayNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			else
				PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.TodayNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
			end if
		else
			PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.DelTF=0 and News.TodayNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
		end if
	else
		PicSql = "Select Top " & NewsNumberStr & " *,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.ClassID in ('" & ClassListStr & "') and News.DelTF=0 and News.TodayNewsTF=1 and News.AuditTF=1 order by AddDate Desc"
	end if
	Set RsLastNewsObj = Conn.Execute(PicSql)
	TodayNews = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	do while Not RsLastNewsObj.Eof
		TodayNews = TodayNews & "<tr>" & Chr(13) & Chr(10)
		for i = 1 to RowNumberStr
			if RsLastNewsObj("HeadNewsTF") = 1 then
				TodayNews = TodayNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & RsLastNewsObj("HeadNewsPath") & """ title="""& RsLastNewsObj("Title")&""">" & GetHTMLTitle(RsLastNewsObj("TitleStyle"),GotTopic(RsLastNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
			else
				if RsLastNewsObj("SaveFilePath") = "/" then
					TodayNews = TodayNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & AvailableDoMain & RsLastNewsObj("SaveFilePath") & RsLastNewsObj("ClassEName") & "/" & RsLastNewsObj("FileName") & "." & RsLastNewsObj("NewsFileExtName") & """ title="""& RsLastNewsObj("Title")&""">" & GetHTMLTitle(RsLastNewsObj("TitleStyle"),GotTopic(RsLastNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
				else
					TodayNews = TodayNews & "<td " & RowHeightStr & ">" & NaviPicStr & "<a class=""" & CSSStyleStr & """ " & OpenTypeStr & " href=""" & AvailableDoMain & RsLastNewsObj("SaveFilePath") & "/" & RsLastNewsObj("ClassEName") & "/" & RsLastNewsObj("FileName") & "." & RsLastNewsObj("NewsFileExtName") & """ title="""& RsLastNewsObj("Title")&""">" & GetHTMLTitle(RsLastNewsObj("TitleStyle"),GotTopic(RsLastNewsObj("Title"),TitleNumberStr)) & "</a></td>" & Chr(13) & Chr(10)
				end if
			end if
			RsLastNewsObj.MoveNext
			if RsLastNewsObj.Eof then
				Exit For
			end if
		Next
		TodayNews = TodayNews & "</tr>" & Chr(13) & Chr(10)
		TodayNews = TodayNews & CompatPicStr & Chr(13) & Chr(10)
	loop
	Set RsLastNewsObj = Nothing
	TodayNews = TodayNews & "</table>"
End Function
'幻灯片
Function FilterNews(ClassListStr,NewsNumberStr,TitleNumberStr,CssFileStr,PicWidthStr,PicHeightStr,OpenModeStr,ShowTitleStr,RowSpaceStr)
	Dim FilterSql,RsFilterObj,FilterStr,ImagesStr,TxtStr,TxtFirst,ClassSaveFilePath,LinkStr
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if ClassListStr <> "" then
		FilterSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.Classid=NewsClass.Classid and News.DelTF=0 and News.FilterNews=1 and News.AuditTF=1 and NewsClass.ClassEName='" & ClassListStr & "' order by AddDate Desc"
	else
		FilterSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass where News.Classid=NewsClass.Classid and News.DelTF=0 and News.FilterNews=1 and News.AuditTF=1 order by AddDate Desc"
	end if
	Set RsFilterObj = Conn.Execute(FilterSql)
	TxtFirst=""
	if not RsFilterObj.Eof then
		Dim Temp_Num
		Temp_Num = 0
		Do While Not RsFilterObj.Eof
			Temp_Num = Temp_Num + 1
			RsFilterObj.MoveNext
		Loop
		RsFilterObj.MoveFirst
		If Temp_Num <=1 then
			FilterNews = "至少需要两条幻灯新闻才能正确显示幻灯效果"
			Set	RsFilterObj = Nothing
			Exit Function	
		End If
		if PicWidthStr <> "" then PicWidthStr = " Width=""" & PicWidthStr & """"
		if PicHeightStr <> "" then PicHeightStr = " Height=""" & PicHeightStr & """"
		if OpenModeStr <> "0" then OpenModeStr = " target=_blank"
		if CssFileStr <> "" then CssFileStr = " Class='" & CssFileStr & "'"
		do while Not RsFilterObj.Eof
			if RsFilterObj("SaveFilePath") = "/" then
				ClassSaveFilePath = RsFilterObj("SaveFilePath")
			else
				ClassSaveFilePath = RsFilterObj("SaveFilePath") & "/"
			end if
			if (Not IsNull(RsFilterObj("PicPath"))) And (RsFilterObj("PicPath") <> "") then
				if ImagesStr = "" then 
					If Instr(1,LCase(RsFilterObj("PicPath")),"http://") <> 0 then
						ImagesStr = RsFilterObj("PicPath")
					Else
						ImagesStr = Dummy_Riker & RsFilterObj("PicPath")
					End If
					TxtStr = "<a " & CssFileStr & " href=" & Dummy_Riker & ClassSaveFilePath & RsFilterObj("ClassEName") & "/" & RsFilterObj("FileName") & "." & RsFilterObj("NewsFileExtName") & " " & OpenModeStr & ">" & GotTopic(RsFilterObj("title"),TitleNumberStr)&"</a>"
					TxtFirst = "<a " & CssFileStr & " href=" & Dummy_Riker & ClassSaveFilePath & RsFilterObj("ClassEName") & "/" & RsFilterObj("FileName") & "." & RsFilterObj("NewsFileExtName") & " " & OpenModeStr & ">" & GotTopic(RsFilterObj("title"),TitleNumberStr)&"</a>"
					LinkStr =  Dummy_Riker & ClassSaveFilePath & RsFilterObj("ClassEName") & "/" & RsFilterObj("FileName") & "." & RsFilterObj("NewsFileExtName")
				else
					If Instr(1,LCase(RsFilterObj("PicPath")),"http://") <> 0 then
						ImagesStr = ImagesStr &","& RsFilterObj("PicPath")
					Else
						ImagesStr = ImagesStr &","& Dummy_Riker & RsFilterObj("PicPath")
					End If
					TxtStr = TxtStr &",<a " & CssFileStr & " href=" & Dummy_Riker & ClassSaveFilePath & RsFilterObj("ClassEName") & "/" & RsFilterObj("FileName") & "." & RsFilterObj("NewsFileExtName") & " " & OpenModeStr & ">" & GotTopic(RsFilterObj("title"),TitleNumberStr)&"</a>"
					LinkStr = LinkStr &","&Dummy_Riker & ClassSaveFilePath & RsFilterObj("ClassEName") & "/" & RsFilterObj("FileName") & "." & RsFilterObj("NewsFileExtName")
				end if
			end if
			RsFilterObj.MoveNext
		loop
		FilterStr="<SCRIPT language=""VBScript"">"& Chr(13)
		FilterStr = FilterStr & "Dim FileList,FileListArr,TxtList,TxtListArr,LinkList,LinkArr"& Chr(13)
		FilterStr = FilterStr & "FileList = """ & ImagesStr & """"& Chr(13)
		FilterStr = FilterStr & "LinkList = """ & LinkStr & """"& Chr(13)
		FilterStr = FilterStr & "TxtList = """ & TxtStr & """"& Chr(13)
		FilterStr = FilterStr & "FileListArr = Split(FileList,"","")"& Chr(13)
		FilterStr = FilterStr & "LinkArr = Split(LinkList,"","")"& Chr(13)
		FilterStr = FilterStr & "TxtListArr = Split(TxtList,"","")"& Chr(13)
		FilterStr = FilterStr & "Dim CanPlay"& Chr(13)
		FilterStr = FilterStr & "CanPlay = CInt(Split(Split(navigator.appVersion,"";"")(1),"" "")(2))>5"& Chr(13)
		FilterStr = FilterStr & "Dim FilterStr"& Chr(13)
		FilterStr = FilterStr & "FilterStr = ""RevealTrans(duration=2,transition=23)"""& Chr(13)
		FilterStr = FilterStr & "FilterStr = FilterStr + "";BlendTrans(duration=2)"""& Chr(13)
		FilterStr = FilterStr & "If CanPlay Then"& Chr(13)
		'FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.Pixelate(,enabled=false,duration=2,maxSquare=25)"""& Chr(13)
		FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.Fade(duration=2,overlap=0)"""& Chr(13)
		'FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.RandomDissolve(duration=2)"""& Chr(13)
		'FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.Pixelate(MaxSquare=15,Duration=1)"""& Chr(13)
		FilterStr = FilterStr & "FilterStr = FilterStr + "";progid:DXImageTransform.Microsoft.Wipe(duration=3,gradientsize=0.25,motion=reverse)"""& Chr(13)
		FilterStr = FilterStr & "Else"& Chr(13)
		FilterStr = FilterStr & "Msgbox ""幻灯片播放具有多种动态图片切换效果，但此功能需要您的浏览器为IE5.5或以上版本，否则您将只能看到部分的切换效果。"",64"& Chr(13)
		FilterStr = FilterStr & "End If"& Chr(13)
		FilterStr = FilterStr & "Dim FilterArr"& Chr(13)
		FilterStr = FilterStr & "FilterArr = Split(FilterStr,"";"")"& Chr(13)
		FilterStr = FilterStr & "Dim PlayImg_M"& Chr(13)
		FilterStr = FilterStr & "PlayImg_M = 5 * 1000  '切换时间（毫秒）"& Chr(13)
		FilterStr = FilterStr & "Dim I"& Chr(13)

		FilterStr = FilterStr & "I = 1"& Chr(13)
		FilterStr = FilterStr & "Sub ChangeImg"& Chr(13)
		FilterStr = FilterStr & "Do While FileListArr(I)="""""& Chr(13)
		FilterStr = FilterStr & "I = I + 1"& Chr(13)
		FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
		FilterStr = FilterStr & "Loop"& Chr(13)
		FilterStr = FilterStr & "Dim J"& Chr(13)
		FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
		FilterStr = FilterStr & "Randomize"& Chr(13)
		FilterStr = FilterStr & "J = Int(Rnd * (UBound(FilterArr)+1))"& Chr(13)
		FilterStr = FilterStr & "Img.style.filter = FilterArr(J)"& Chr(13)
		FilterStr = FilterStr & "Img.filters(0).Apply"& Chr(13)
		FilterStr = FilterStr & "Img.Src = FileListArr(I)"& Chr(13)
		FilterStr = FilterStr & "Img.filters(0).play"& Chr(13)
		FilterStr = FilterStr & "Link.Href = LinkArr(I)"& Chr(13)
		If ShowTitleStr = "1" Then
			FilterStr = FilterStr & "Txt.filters(0).Apply"& Chr(13)
			FilterStr = FilterStr & "Txt.innerHTML = TxtListArr(I)"& Chr(13)
			FilterStr = FilterStr & "Txt.filters(0).play"& Chr(13)
		End If
		FilterStr = FilterStr & "I = I + 1"& Chr(13)
		FilterStr = FilterStr & "If I>UBound(FileListArr) Then I = 0"& Chr(13)
		FilterStr = FilterStr & "TempImg.Src = FileListArr(I)"& Chr(13)
		FilterStr = FilterStr & "TempLink.Href = LinkArr(I)"& Chr(13)
		FilterStr = FilterStr & "SetTimeout ""ChangeImg"", PlayImg_M,""VBScript"""& Chr(13)
		FilterStr = FilterStr & "End Sub"& Chr(13)
		FilterStr = FilterStr & "</SCRIPT>"& Chr(13)
		FilterStr = FilterStr & "<TABLE WIDTH=""100%"" height=""100%"" BORDER=""0"" CELLSPACING="""&RowSpaceStr&""" CELLPADDING=""0"">"
		FilterStr = FilterStr & "<TR ID=""NoScript"">"
		FilterStr = FilterStr & "<TD Align=""Center"" Style=""Color:White"">对不起，图片浏览功能需脚本支持，但您的浏览器已经设置了禁止脚本运行。请您在浏览器设置中调整有关安全选项。</TD>"
		FilterStr = FilterStr & "</TR>"
		FilterStr = FilterStr & "<TR Style=""Display:none"" ID=""CanRunScript""><TD HEIGHT=""100%"" Align=""Center"" vAlign=""Center""><a id=""Link"" """&OpenModeStr&"""><Img ID=""Img"" "  & PicWidthStr & PicHeightStr & " Border=""0"" ></a>"
		FilterStr = FilterStr & "</TD></TR><TR Style=""Display:none""><TD><a id=TempLink """&OpenModeStr&"""><Img ID=""TempImg"" Border=""0""></a></TD></TR>"
		If ShowTitleStr = "1" then
			FilterStr = FilterStr & "<TR><TD HEIGHT=""100%"" Align=""Center"" vAlign=""Center"">"
			FilterStr = FilterStr & "<div ID=""Txt"" style=""PADDING-LEFT: 5px; Z-INDEX: 1; FILTER: progid:DXImageTransform.Microsoft.Fade(duration=1,overlap=0); POSITION:"">"&TxtFirst&"</div>"
			FilterStr = FilterStr & "</TD></TR>"
		End If
		FilterStr = FilterStr & "</TABLE>"& Chr(13)
		FilterStr = FilterStr & "<Script Language=""VBScript"">"& Chr(13)
		FilterStr = FilterStr & "NoScript.Style.Display = ""none"""& Chr(13)
		FilterStr = FilterStr & "CanRunScript.Style.Display = """""& Chr(13)
		FilterStr = FilterStr & "Img.Src = FileListArr(0)"& Chr(13)
		FilterStr = FilterStr & "Link.Href = LinkArr(0)"& Chr(13)
		FilterStr = FilterStr & "SetTimeout ""ChangeImg"", PlayImg_M,""VBScript"""& Chr(13)
		FilterStr = FilterStr & "</Script>"& Chr(13)
	else
		FilterStr="没有幻灯图片"
	End if
	RsFilterObj.Close
	Set RsFilterObj = Nothing
	FilterNews = FilterStr
End Function
'站点地图
Function SiteMap(ClassListStr,ShowModeStr,OpenModeStr,CssFileStr)
	Dim SiteMapSql,RsSiteMapObj,AllClassID ,ClassSql,RsClassObj
	if OpenModeStr = "1" then
		 OpenModeStr = "target=""_blank"""
	else
		OpenModeStr = ""
	end if
	if ClassListStr = "" then
		SiteMapSql = "Select * from NewsClass where ParentID='0' and DelFlag=0"
	else
		SiteMapSql = "Select * from NewsClass where ClassEName='" & ClassListStr & "' and DelFlag=0"
	end if
	Set RsSiteMapObj = Conn.Execute(SiteMapSql)
	if Not RsSiteMapObj.Eof then
		SiteMap = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RsSiteMapObj.Eof
			SiteMap = SiteMap & "<tr><td>" & Chr(13) & Chr(10)
			if RsSiteMapObj("SaveFilePath") = "/" then
				SiteMap = SiteMap & "【<b><a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsSiteMapObj("SaveFilePath") & RsSiteMapObj("ClassEName") & "/index." & RsSiteMapObj("FileExtName") & """ >" & RsSiteMapObj("ClassCName") & "</a></b>】&nbsp;&nbsp;"
			else
				SiteMap = SiteMap & "【<b><a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsSiteMapObj("SaveFilePath") & "/" & RsSiteMapObj("ClassEName") & "/index." & RsSiteMapObj("FileExtName") & """ >" & RsSiteMapObj("ClassCName") & "</a></b>】&nbsp;&nbsp;"
			end if
			AllClassID = ChildClassIDList(RsSiteMapObj("ClassID"))
			if AllClassID <> "" then
				if Left(AllClassID,1) = "," then
					AllClassID = Right(AllClassID,Len(AllClassID)-1)
				end if
				ClassSql = "Select * from NewsClass where ClassID in (" & AllClassID & ") and DelFlag=0"
				Set RsClassObj = Conn.Execute(ClassSql)
				do while Not RsClassObj.Eof
					if RsClassObj("SaveFilePath") = "" then
						SiteMap = SiteMap & "[<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>]&nbsp;&nbsp;"
					else
						SiteMap = SiteMap & "[<a " & OpenModeStr & " Class=""" & CssFileStr & """ href=""" & AvailableDoMain & RsClassObj("SaveFilePath") & "/" & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & RsClassObj("ClassCName") & "</a>]&nbsp;&nbsp;"
					end if
					RsClassObj.MoveNext
				Loop
				Set RsClassObj = Nothing
			end if
			RsSiteMapObj.MoveNext
		loop
		SiteMap = SiteMap & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10)
		SiteMap = SiteMap & "</table>" & Chr(13) & Chr(10)
	else
		SiteMap = ""
	end if
	Set RsSiteMapObj = Nothing
End Function
'版权信息
Function CopyRightStr()
	Dim ConfigSql,RsConfigObj
	ConfigSql = "Select CopyRight from Config"
	Set RsConfigObj = Conn.Execute(ConfigSql)
	if Not RsConfigObj.Eof then
		CopyRightStr = RsConfigObj("CopyRight")
	else
		CopyRightStr = ""
	end if
	Set RsConfigObj = Nothing
End Function
'页面标题
Function PageTitle(PageTitleBegin)
	Dim TempSql,RsTempObj
	Select Case RefreshType
		Case "Index"
			PageTitle = "首页--" & PageTitleBegin
		Case "Class"
			TempSql = "Select ClassCName from NewsClass where ClassID='" & RefreshID & "'"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempObj.Eof then
				PageTitle = RsTempObj("ClassCName") & "--" & PageTitleBegin
			else
				PageTitle = PageTitleBegin
			end if
			Set RsTempObj = Nothing
		Case "News"
			TempSql = "Select Title from News where NewsID='" & RefreshID & "' order by ID desc"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempObj.Eof then
				PageTitle = RsTempObj("Title") & "--" & PageTitleBegin
			else
				PageTitle = PageTitleBegin
			end if
			Set RsTempObj = Nothing
		Case "Special"
			TempSql = "Select CName from Special where SpecialID='" & RefreshID & "'"
			Set RsTempObj = Conn.Execute(TempSql)
			if Not RsTempObj.Eof then
				PageTitle = RsTempObj("CName") & "--" & PageTitleBegin
			else
				PageTitle = PageTitleBegin
			end if
			Set RsTempObj = Nothing
		Case Else
			PageTitle = ""
	End Select
End Function
'导读新闻
Function NaviReadNews(PicWidthStr,PicHeightStr,NaviPicStr,BGPicStr,TitleNumberStr,CSSStyleStr,NewsNumberStr,RowNumberStr,OpenTypeStr,RowHeightStr,TxtNaviStr)
	Dim NaviSql,RsNaviObj,i
	Dim HaveRecordTF '是否有记录
	HaveRecordTF = False
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if BGPicStr <> "" then
		BGPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & BGPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img border=0 src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	NaviSql = "Select *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.PicNewsTF=1 and News.RecTF=1 and News.AuditTF=1 and News.DelTF=0 order by AddDate Desc"
	Set RsNaviObj = Conn.Execute(NaviSql)
	NaviReadNews = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10) & "<tr>"
	if Not RsNaviObj.Eof then
		HaveRecordTF = True
		NaviReadNews = NaviReadNews & "<td width='"&PicWidthStr&"'>" & Chr(13) & Chr(10)
		if RsNaviObj("SaveFilePath") = "/" then
			NaviReadNews = NaviReadNews & "<a href=""" & AvailableDoMain & RsNaviObj("SaveFilePath") & RsNaviObj("ClassEName") & "/" & RsNaviObj("FileName") & "." & RsNaviObj("NewsFileExtName") & """>" & Chr(13) & Chr(10)
		else
			NaviReadNews = NaviReadNews & "<a href=""" & AvailableDoMain & RsNaviObj("SaveFilePath") & "/" & RsNaviObj("ClassEName") & "/" & RsNaviObj("FileName") & "." & RsNaviObj("NewsFileExtName") & """>" & Chr(13) & Chr(10)
		end if 
		NaviReadNews = NaviReadNews & "<img border=""0"" src=""" & AvailableDoMain & RsNaviObj("PicPath") & """ width=""" & PicWidthStr & """ height=""" & PicHeightStr & """>"
		NaviReadNews = NaviReadNews & "</a>" & Chr(13) & Chr(10)
		NaviReadNews = NaviReadNews & "</td>" & Chr(13) & Chr(10)
	end if
	NaviReadNews = NaviReadNews & "<td>" & Chr(13) & Chr(10)
	NaviSql = "Select Top " & NewsNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,News.FileExtName as NewsFileExtName from News,NewsClass Where News.ClassID=NewsClass.ClassID and News.RecTF=1 and News.PicNewsTF=1 and News.DelTF=0 and News.AuditTF=1 order by AddDate Desc"
	Set RsNaviObj = Conn.Execute(NaviSql)
	if Not RsNaviObj.Eof then
		HaveRecordTF = True
		NaviReadNews = NaviReadNews & "<td>" & Chr(13) & Chr(10)
		NaviReadNews = NaviReadNews & "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RsNaviObj.Eof
			NaviReadNews = NaviReadNews & "<tr>" & Chr(13) & Chr(10)
			for i =1 to RowNumberStr
				'===============================================================================
				'修改：2005-4-1 Olin
				'说明：1. 修正图片导读图片无连接的问题
				'      2. 将图片加上与文字相同的连接
				'      3. 定义NaviPicStr1 存储设置了连接的图片字串
				'-------------------------------------------------------------------------------
				Dim NaviPicStr1
				if RsNaviObj("HeadNewsTF") = 1 then
					NaviPicStr1 =  "<a Class=""" & CSSStyleStr & """ href= "& RsNaviObj("HeadNewsPath") & " " & OpenTypeStr & " title="""& RsNaviObj("Title")&""">" & NaviPicStr & "</a>"
				else
					if RsNaviObj("SaveFilePath") = "/" then
						NaviPicStr1 = "<a Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsNaviObj("SaveFilePath") & RsNaviObj("ClassEName") & "/" & RsNaviObj("FileName") & "." & RsNaviObj("NewsFileExtName") & """ " & OpenTypeStr & " title="""& RsNaviObj("Title")&""">" & NaviPicStr & "</a>" 
					else
						NaviPicStr1 = "<a Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsNaviObj("SaveFilePath") & "/" & RsNaviObj("ClassEName") & "/" & RsNaviObj("FileName") & "." & RsNaviObj("NewsFileExtName") & """ " & OpenTypeStr & " title="""& RsNaviObj("Title")&""">" & NaviPicStr & "</a>"
					end if
					NaviPicStr1 = "&nbsp;&nbsp;" & NaviPicStr1
				end if
				'===============================================================================修改结束
				if RsNaviObj("HeadNewsTF") = 1 then
					NaviReadNews = NaviReadNews & "<td " & RowHeightStr & ">" & NaviPicStr1 & "<a Class=""" & CSSStyleStr & """ href= "& RsNaviObj("HeadNewsPath") & " " & OpenTypeStr & " title="""& RsNaviObj("Title")&""">"& GotTopic(RsNaviObj("Title"),TitleNumberStr) & "</a></td>"
				else
					if RsNaviObj("SaveFilePath") = "/" then
						NaviReadNews = NaviReadNews & "<td " & RowHeightStr & ">" & NaviPicStr1 & "<a Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsNaviObj("SaveFilePath") & RsNaviObj("ClassEName") & "/" & RsNaviObj("FileName") & "." & RsNaviObj("NewsFileExtName") & """ " & OpenTypeStr & " title="""& RsNaviObj("Title")&""">" & GotTopic(RsNaviObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					else
						NaviReadNews = NaviReadNews & "<td " & RowHeightStr & ">" & NaviPicStr1 & "<a Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & RsNaviObj("SaveFilePath") & "/" & RsNaviObj("ClassEName") & "/" & RsNaviObj("FileName") & "." & RsNaviObj("NewsFileExtName") & """ " & OpenTypeStr & " title="""& RsNaviObj("Title")&""">" & GotTopic(RsNaviObj("Title"),TitleNumberStr) & "</a></td>" & Chr(13) & Chr(10)
					end if
				end if
				
				RsNaviObj.MoveNext
				if RsNaviObj.Eof then Exit For
			next
			NaviReadNews = NaviReadNews & "</tr>" & Chr(13) & Chr(10)
			NaviReadNews = NaviReadNews & BGPicStr & Chr(13) & Chr(10)
		Loop
		NaviReadNews = NaviReadNews & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10)
	end if
	NaviReadNews = NaviReadNews & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10)
	if HaveRecordTF = False then NaviReadNews = ""
End Function
'友情链接
Function FriendLink(LinkTypeStr,TitleNumberStr,PicWidthStr,PicHeightStr,LinkNumberStr,RowNumberStr,RowHeightStr,NewWindowTF)
	Dim FriendLinkSql,RsFriendLinkObj,i
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	IF NewWindowTF = "1" Then
		NewWindowTF = "target=""_blank"""
	Else
		NewWindowTF = ""
	End IF
	Select Case RefreshType
		Case "Index"
			FriendLinkSql = "Select Top " & LinkNumberStr & " * from FriendLink where Address like '%1%' and Type=" & LinkTypeStr
		Case "Class"
			FriendLinkSql = "Select Top " & LinkNumberStr & " * from FriendLink where Address like '%2%' and Type=" & LinkTypeStr
		Case "News"
			FriendLinkSql = "Select Top " & LinkNumberStr & " * from FriendLink where Address like '%3%' and Type=" & LinkTypeStr
		Case "Special"
			FriendLinkSql = "Select Top " & LinkNumberStr & " * from FriendLink where Address like '%4%' and Type=" & LinkTypeStr
		Case Else
			FriendLinkSql = ""
	End Select
	if FriendLinkSql <> "" then
		Dim TTTemp,Temp_Str
		Set RsFriendLinkObj = Conn.Execute(FriendLinkSql)
		if Not RsFriendLinkObj.Eof then
			if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
			FriendLink = "<table cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">"
			do while Not RsFriendLinkObj.Eof
				FriendLink = FriendLink & "</tr>"
				for i = 1 to RowNumberStr
					if LinkTypeStr = "0" then						
						'FriendLink = FriendLink & "<td " & RowHeightStr & " ><a href=""" & RsFriendLinkObj("Url") & "'"" "& NewWindowTF &">" & GotTopic(RsFriendLinkObj("name"),TitleNumberStr) & "</a>"
						FriendLink = FriendLink & "<td " & RowHeightStr & " ><a href=""" & RsFriendLinkObj("Url") & """ "& NewWindowTF &">" & left(RsFriendLinkObj("Content"),TitleNumberStr) & "</a>"
						'==================================================================
						'2005-4-4 Olin
						'修改显示内容和截取方式
						'==================================================================
					else
						TTTemp = RsFriendLinkObj("Content")
						If Instr(1,LCase(TTTemp),"http://",1)<>0 then
							Temp_Str = TTTemp
						Else
							Temp_Str = Dummy_Riker & TTTemp
						End If
						FriendLink = FriendLink & "<td " & RowHeightStr & " ><a href=""" & RsFriendLinkObj("Url") & """ "& NewWindowTF &"><img border=""0"" width=""" & PicWidthStr & """ Height=""" & PicHeightStr & """ src=""" &Temp_Str & """></a>"
					end if
					RsFriendLinkObj.MoveNext
					if RsFriendLinkObj.Eof then Exit For
				Next
				FriendLink = FriendLink & "</tr>"
			Loop
			FriendLink = FriendLink & "</table>"
		else
			FriendLink = ""
		end if
		Set RsFriendLinkObj = Nothing
	else
		FriendLink = ""
	end if
End Function
'新闻点击次数
Function NewsClickNum()
	if RefreshType = "News" then
		NewsClickNum = "<script src=" & AvailableDoMain & "/" & "Click.asp?NewsID="& RefreshID &"></script>"
	else
		NewsClickNum = ""
	end if
End Function
'子栏目ID列表
Function ChildClassIDList(ClassID)
	Dim TempRs,TempStr
	Set TempRs = Conn.Execute("Select ClassID from NewsClass where DelFlag=0 and ParentID = '" & ClassID & "'")
	do while Not TempRs.Eof
		ChildClassIDList = ChildClassIDList & ",'" & TempRs("ClassID") & "'"
		ChildClassIDList = ChildClassIDList & ChildClassIDList(TempRs("ClassID"))
		TempRs.MoveNext
	loop
	TempRs.Close
	Set TempRs = Nothing
End Function
'所有栏目的列表
Function ClassList()
	Dim Rs
	Set Rs = Conn.Execute("Select ClassID,ClassCName,ClassEName from newsclass where ParentID = '0' and DelFlag=0 order by AddTime desc")
	do while Not Rs.Eof
		ClassList = ClassList & "<option value=" & Rs("ClassID") & "" & ">" & Rs("ClassCName") & "</option>"& chr(10) & chr(13)
		ClassList = ClassList & AllChildClassList(Rs("ClassID"),"")
		Rs.MoveNext	
	loop
	Rs.Close
	Set Rs = Nothing
End Function
Function AllChildClassList(ClassID,Temp)
	Dim TempRs,TempStr
	Set TempRs = Conn.Execute("Select ClassID,ClassCName,ChildNum,ClassEName from NewsClass where ParentID = '" & ClassID & "' and DelFlag=0 order by AddTime desc ")
	TempStr = Temp & " - "
	do while Not TempRs.Eof
		if TempRs("ChildNum") = 0 then
			AllChildClassList = AllChildClassList & "<option value="&TempRs("ClassID")&"" & ">" & TempStr & TempRs("ClassCName") & "</option>"& chr(10) & chr(13)
		else
			AllChildClassList = AllChildClassList & "<option value="&TempRs("ClassID")&"" & ">" & TempStr & TempRs("ClassCName") & "</option>"& chr(10) & chr(13)
		end if
		AllChildClassList = AllChildClassList & AllChildClassList(TempRs("ClassID"),TempStr)
		TempRs.MoveNext
	loop
	TempRs.Close
	Set TempRs = Nothing
End Function
'版本信息
Private Function GetVisionStr()
	GetVisionStr = "<!--Published Date:" & Now & "   Powered by www.Foosun.net,Products:Foosun Content Manage system-->" & Chr(13) & Chr(10)
End Function
'栏目下载
Function ClassDownLoad(ClassListStr,NewsListNumberStr,TitleNumberStr,CompatPicStr,NaviPicStr,DateRuleStr,DateRightStr,RowHeightStr,RowNumberStr,ShowClassCNNameStr,MoreLinkTypeStr,MoreLinkContentStr,CSSStyleStr,OpenTypeStr,DownListStyleStr,TxtNaviStr)
	Dim RsDownLoadObj,DownLoadSql,RsClassObj,ClassSql,AllClassID,i,ClassCNName,ClassSaveFilePath
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	if DateRightStr <> "" then DateRightStr = " align=""" & DateRightStr & """"
	if CompatPicStr <> "" then
		CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	if ClassListStr <> "" then
		ClassSql = "Select ClassCName,ClassEName,ClassID,SaveFilePath,FileExtName from NewsClass where ClassEName='" & ClassListStr & "'"
		Set RsClassObj = Conn.Execute(ClassSql)
		if Not RsClassObj.Eof then
			if RsClassObj("SaveFilePath") = "/" then
				ClassSaveFilePath = RsClassObj("SaveFilePath")
			else
				ClassSaveFilePath = RsClassObj("SaveFilePath") & "/"
			end if
			if MoreLinkContentStr <> "" then
				if MoreLinkTypeStr = "1" then
					MoreLinkContentStr="<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ ><img border=0 src=""" & MoreLinkContentStr & """></a>"
				elseif MoreLinkTypeStr = "0" then
					MoreLinkContentStr = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsClassObj("ClassEName") & "/index." & RsClassObj("FileExtName") & """ >" & MoreLinkContentStr & "</a>"
				else
					MoreLinkContentStr = ""
				end if
			end if
			AllClassID = "'" & RsClassObj("ClassID") & "'" & ChildClassIDList(RsClassObj("ClassID"))
			DownLoadSql = "Select top " & NewsListNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,DownLoad.FileExtName as DownLoadFileExtName from DownLoad,NewsClass where DownLoad.ClassID=NewsClass.ClassID and DownLoad.AuditTF=1 and NewsClass.ClassID in (" & AllClassID & ") order by DownLoad.ID Desc"
			ClassDownLoad = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
			Set RsDownLoadObj = Conn.Execute(DownLoadSql)
			do while Not RsDownLoadObj.Eof
				ClassDownLoad = ClassDownLoad & "<tr>" & Chr(13) & Chr(10)
				for i = 1 to RowNumberStr
					if RsDownLoadObj("SaveFilePath") = "/" then
						ClassSaveFilePath = RsDownLoadObj("SaveFilePath")
					else
						ClassSaveFilePath = RsDownLoadObj("SaveFilePath") & "/"
					end if
					if ShowClassCNNameStr = "1" then
						ClassCNName = "<a " & OpenTypeStr & " Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & RsDownLoadObj("ClassEName") & "/index." & RsDownLoadObj("ClassFileExtName") & """ >[" & GotTopic(RsDownLoadObj("ClassCName"),TitleNumberStr) & "]</a>&nbsp;"
					else
						ClassCNName = ""
					end if
					ClassDownLoad = ClassDownLoad & "<td " & RowHeightStr & ">" & GetOneDownLoadList(RsDownLoadObj,DownListStyleStr,ClassSaveFilePath,ClassCNName,DateRuleStr,OpenTypeStr,NaviPicStr,CSSStyleStr) & "</td>" & Chr(13) & Chr(10)
					RsDownLoadObj.MoveNext
					if RsDownLoadObj.Eof then
						Exit For
					end if
				Next
				ClassDownLoad = ClassDownLoad & "</tr>" & Chr(13) & Chr(10)
				ClassDownLoad = ClassDownLoad & CompatPicStr
			Loop
			if MoreLinkContentStr <> "" then
				ClassDownLoad = ClassDownLoad & "<tr><td align=""right"" colspan=""" & RowNumberStr & """>" & MoreLinkContentStr & "</td></tr>" & Chr(13) & Chr(10)
			end if
			ClassDownLoad = ClassDownLoad & "</table>" & Chr(13) & Chr(10)
			Set RsDownLoadObj = Nothing
		else
			ClassDownLoad = ""
		end if
		Set RsClassObj = Nothing
	else
		ClassDownLoad = ""
	end if
End Function
'终极栏目下载
Function DownLoadList(ClassListStr,NewsNumberStr,RowNumberStr,NaviPicStr,BGPicStr,RowHeightStr,CssFileStr,OpenModeStr,DetachPageStr,TitleNumberStr,DownListStyleStr,TxtNaviStr)
	Dim RsDownLoadListObj,DownLoadListSql,RsClassObj,ClassSql,AllClassID,i,ClassSaveFilePath
	Dim PageNum,PageIndex,LoopVar,TempDownLoadList,DownLoadPageStr,TempClassSaveFilePath,ClassSaveExtName,j
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenModeStr = "1" then
		 OpenModeStr = "target=""_blank"""
	else
		OpenModeStr = ""
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	if BGPicStr <> "" then
		BGPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & BGPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	ClassListStr = ""
	if ClassListStr <> "" then
		ClassSql = "Select ClassCName,ClassEName,ClassID,SaveFilePath,FileExtName from NewsClass where ClassEName='" & ClassListStr & "'"
	else
		if RefreshType = "Class" then
			ClassSql = "Select ClassCName,ClassEName,ClassID,SaveFilePath,FileExtName from NewsClass where ClassID='" & RefreshID & "'"
		else
			ClassSql = ""
		end if
	end if
	if ClassSql <> "" then
		Set RsClassObj = Conn.Execute(ClassSql)
		if Not RsClassObj.Eof then
			if RsClassObj("SaveFilePath") = "/" then
				ClassSaveFilePath = RsClassObj("SaveFilePath")
			else
				ClassSaveFilePath = RsClassObj("SaveFilePath") & "/"
			end if
			TempClassSaveFilePath = AvailableDoMain & ClassSaveFilePath & RsClassObj("ClassEName")
			ClassSaveExtName = RsClassObj("FileExtName")
			AllClassID = "'" & RsClassObj("ClassID") & "'" & ChildClassIDList(RsClassObj("ClassID"))
			DownLoadListSql = "Select *,NewsClass.FileExtName as ClassFileExtName,DownLoad.FileExtName as DownLoadFileExtName from DownLoad,NewsClass where DownLoad.ClassID=NewsClass.ClassID and DownLoad.AuditTF=1 and NewsClass.ClassID in (" & AllClassID & ") order by DownLoad.ID Desc"
			Set RsDownLoadListObj = Server.CreateObject("ADODB.RecordSet")
			RsDownLoadListObj.Open DownLoadListSql,Conn,1,1
			if Not RsDownLoadListObj.Eof then
				RsDownLoadListObj.PageSize = NewsNumberStr
				PageNum = RsDownLoadListObj.PageCount
			else
				PageNum = 0
			end if
			if (DetachPageStr = "1") and (PageNum > 1) then
				for PageIndex = 1 to PageNum
					DownLoadPageStr = "<tr><td><table border=""0"" width=""100%""><tr><td width=""50%"" align=""right"">本栏目共<font color=red>" & PageNum & "</font>页,当前在第<font color=red>" & PageIndex & "</font>页 "
					if PageIndex = 1 then
						DownLoadPageStr = DownLoadPageStr & "<font face=webdings>9</font> "
						DownLoadPageStr = DownLoadPageStr & "<font face=webdings>7</font> "
					elseif PageIndex=2 then
						DownLoadPageStr = DownLoadPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=首页><font face=webdings>9</font></a> "
						DownLoadPageStr = DownLoadPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=上一页><font face=webdings>7</font></a> "
					else
						DownLoadPageStr = DownLoadPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index." & ClassSaveExtName & """ title=首页><font face=webdings>9</font></a> "
						DownLoadPageStr = DownLoadPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index_"&PageIndex-1&"." & ClassSaveExtName & """　title=上一页><font face=webdings>7</font></a> "
					end if
					dim G
					G=0
					for j = PageIndex to PageNum
						if j = 1 then
							DownLoadPageStr = DownLoadPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "." & ClassSaveExtName & """>[" & j & "]</a> "
						else
							DownLoadPageStr = DownLoadPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & j & "." & ClassSaveExtName & """>[" & j & "]</a> "
						end if
						G=G+1
						if G mod 10 = 0 then
					     exit for
						End if
					Next
					if PageIndex=PageNum then
						DownLoadPageStr = DownLoadPageStr & "<font face=webdings>8</font> "
					else
						DownLoadPageStr = DownLoadPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index" & "_" & PageIndex+1 & "." & ClassSaveExtName & """  title=下一页><font face=webdings>8</font></a> "
					end if
					if PageIndex=PageNum then
						DownLoadPageStr = DownLoadPageStr & "<font face=webdings>:</font> "
					else
						DownLoadPageStr = DownLoadPageStr & "<a href=""" & TempClassSaveFilePath & "/" & "index_"&PageNum&"." & ClassSaveExtName & """ title=最后一页><font face=webdings>:</font></a> "
					end if
					DownLoadPageStr = DownLoadPageStr & "</td></tr></table></td></tr>"
					RsDownLoadListObj.AbsolutePage = PageIndex
					Dim TempAlreadyShow
					TempAlreadyShow = 1
					TempDownLoadList = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
					for LoopVar = 1 to RsDownLoadListObj.PageSize
						if TempAlreadyShow > RsDownLoadListObj.PageSize then Exit For
						if RsDownLoadListObj.Eof then Exit For
						TempDownLoadList = TempDownLoadList & "<tr>" & Chr(13) & Chr(10)
						for i = 1 to RowNumberStr
							TempAlreadyShow = TempAlreadyShow + 1
							if RsDownLoadListObj("SaveFilePath") = "/" then
								ClassSaveFilePath = RsDownLoadListObj("SaveFilePath")
							else
								ClassSaveFilePath = RsDownLoadListObj("SaveFilePath") & "/"
							end if
							TempDownLoadList = TempDownLoadList & "<td " & RowHeightStr & ">" & GetOneDownLoadList(RsDownLoadListObj,DownListStyleStr,ClassSaveFilePath,"","",OpenModeStr,NaviPicStr,CssFileStr) & "</td>" & Chr(13) & Chr(10)
							RsDownLoadListObj.MoveNext
							if RsDownLoadListObj.Eof then Exit For
							if TempAlreadyShow > RsDownLoadListObj.PageSize then Exit For
						Next
						TempDownLoadList = TempDownLoadList & "</tr>" & Chr(13) & Chr(10)
						TempDownLoadList = TempDownLoadList & BGPicStr & Chr(13) & Chr(10)
					Next
					TempDownLoadList = TempDownLoadList & DownLoadPageStr & Chr(13) & Chr(10)
					TempDownLoadList = TempDownLoadList & "</table>" & Chr(13) & Chr(10) 
					if DownLoadList = "" then
						DownLoadList = TempDownLoadList
					else
						DownLoadList = DownLoadList & "$$$" & TempDownLoadList
					end if
				Next
			else
				DownLoadList = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
				do while Not RsDownLoadListObj.Eof
					DownLoadList = DownLoadList & "<tr>" & Chr(13) & Chr(10)
					for i = 1 to RowNumberStr
						if RsDownLoadListObj("SaveFilePath") = "/" then
							ClassSaveFilePath = RsDownLoadListObj("SaveFilePath")
						else
							ClassSaveFilePath = RsDownLoadListObj("SaveFilePath") & "/"
						end if
						DownLoadList = DownLoadList & "<td " & RowHeightStr & ">" & GetOneDownLoadList(RsDownLoadListObj,DownListStyleStr,ClassSaveFilePath,"","",OpenModeStr,NaviPicStr,CssFileStr) & "</td>" & Chr(13) & Chr(10)
						RsDownLoadListObj.MoveNext
						if RsDownLoadListObj.Eof then
							Exit For
						end if
					Next
					DownLoadList = DownLoadList & "</tr>" & Chr(13) & Chr(10)
					DownLoadList = DownLoadList & BGPicStr
				Loop
				DownLoadList = DownLoadList & "</table>" & Chr(13) & Chr(10)
			end if
			Set RsDownLoadListObj = Nothing
			DownLoadList = Split(DownLoadList,"$$$")
		else
			DownLoadList = Array("")
		end if
		Set RsClassObj = Nothing
	else
		DownLoadList = Array("")
	end if
End Function
'最新下载
Function LastDownList(ClassListStr,NewNumberStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,RowHeightStr,DownListStyleStr,TxtNaviStr)
	Dim LastDownListObj,LastDownListSql,i,ClassSaveFilePath
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	if CompatPicStr <> "" then
		CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	'调用子栏目修改2005年3月16日
	Dim TempRsHotDownListObj,AllClassID
	Set TempRsHotDownListObj = Conn.Execute("Select ClassID from NewsClass where ClassEName='" & ClassListStr & "'")
	if Not TempRsHotDownListObj.Eof then
		AllClassID = "'" & TempRsHotDownListObj("ClassID") & "'" & ChildClassIDList(TempRsHotDownListObj("ClassID"))
	else
		LastDownList = ""
		Set TempRsHotDownListObj = Nothing
		Exit Function
	end if
	Set TempRsHotDownListObj = Nothing
	'调用子栏目修改2005年3月16日
	if ClassListStr <> "" then
		LastDownListSql = "Select top " & NewNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,DownLoad.FileExtName as DownLoadFileExtName from DownLoad,NewsClass where DownLoad.ClassID=NewsClass.ClassID and DownLoad.AuditTF=1 and NewsClass.ClassID in (" & AllClassID & ") order by DownLoad.ID Desc"
	else
		LastDownListSql = "Select top " & NewNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,DownLoad.FileExtName as DownLoadFileExtName from DownLoad,NewsClass where DownLoad.ClassID=NewsClass.ClassID and DownLoad.AuditTF=1 order by DownLoad.ID Desc"
	end if
	Set LastDownListObj = Conn.Execute(LastDownListSql)
	if Not LastDownListObj.Eof then
		LastDownList = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not LastDownListObj.Eof
			LastDownList = LastDownList & "<tr>" & Chr(13) & Chr(10)
			for i = 1 to RowNumberStr
				if LastDownListObj("SaveFilePath") = "/" then
					ClassSaveFilePath = LastDownListObj("SaveFilePath")
				else
					ClassSaveFilePath = LastDownListObj("SaveFilePath") & "/"
				end if
				LastDownList = LastDownList & "<td " & RowHeightStr & ">" & GetOneDownLoadList(LastDownListObj,DownListStyleStr,ClassSaveFilePath,"","",OpenTypeStr,NaviPicStr,CSSStyleStr) & "</td>" & Chr(13) & Chr(10)
				LastDownListObj.MoveNext
				if LastDownListObj.Eof then
					Exit For
				end if
			Next
			LastDownList = LastDownList & "</tr>" & Chr(13) & Chr(10)
			LastDownList = LastDownList & CompatPicStr
		Loop
		LastDownList = LastDownList & "</table>" & Chr(13) & Chr(10)
		Set LastDownListObj = Nothing
	else
		LastDownList = ""
	end if
End Function
'推荐下载
Function RecDownList(ClassListStr,NewNumberStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,RowHeightStr,DownListStyleStr,TxtNaviStr)
	Dim RecDownListObj,RecDownListSql,i,ClassSaveFilePath
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	if CompatPicStr <> "" then
		CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	'调用子栏目修改2005年3月16日
	Dim TempRsHotDownListObj,AllClassID
	Set TempRsHotDownListObj = Conn.Execute("Select ClassID from NewsClass where ClassEName='" & ClassListStr & "'")
	if Not TempRsHotDownListObj.Eof then
		AllClassID = "'" & TempRsHotDownListObj("ClassID") & "'" & ChildClassIDList(TempRsHotDownListObj("ClassID"))
	else
		RecDownList = ""
		Set TempRsHotDownListObj = Nothing
		Exit Function
	end if
	Set TempRsHotDownListObj = Nothing
	'调用子栏目修改2005年3月16日
	if ClassListStr <> "" then
		RecDownListSql = "Select top " & NewNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,DownLoad.FileExtName as DownLoadFileExtName from DownLoad,NewsClass where DownLoad.ClassID=NewsClass.ClassID and DownLoad.AuditTF=1 and RecTF=1 and NewsClass.ClassID in (" & AllClassID & ") order by DownLoad.ID Desc"
	else
		RecDownListSql = "Select top " & NewNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,DownLoad.FileExtName as DownLoadFileExtName from DownLoad,NewsClass where DownLoad.ClassID=NewsClass.ClassID and DownLoad.AuditTF=1 and RecTF=1 order by DownLoad.ID Desc"
	end if
	Set RecDownListObj = Conn.Execute(RecDownListSql)
	if Not RecDownListObj.Eof then
		RecDownList = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not RecDownListObj.Eof
			RecDownList = RecDownList & "<tr>" & Chr(13) & Chr(10)
			for i = 1 to RowNumberStr
				if RecDownListObj("SaveFilePath") = "/" then
					ClassSaveFilePath = RecDownListObj("SaveFilePath")
				else
					ClassSaveFilePath = RecDownListObj("SaveFilePath") & "/"
				end if
				RecDownList = RecDownList & "<td " & RowHeightStr & ">" & GetOneDownLoadList(RecDownListObj,DownListStyleStr,ClassSaveFilePath,"","",OpenTypeStr,NaviPicStr,CSSStyleStr) & "</td>" & Chr(13) & Chr(10)
				RecDownListObj.MoveNext
				if RecDownListObj.Eof then
					Exit For
				end if
			Next
			RecDownList = RecDownList & "</tr>" & Chr(13) & Chr(10)
			RecDownList = RecDownList & CompatPicStr
		Loop
		RecDownList = RecDownList & "</table>" & Chr(13) & Chr(10)
		Set RecDownListObj = Nothing
	else
		RecDownList = ""
	end if
End Function
'热点下载
Function HotDownList(ClassListStr,NewNumberStr,TitleNumberStr,RowNumberStr,NaviPicStr,CompatPicStr,OpenTypeStr,CSSStyleStr,RowHeightStr,DownListStyleStr,TxtNaviStr)
	Dim HotDownListObj,HotDownListSql,i,ClassSaveFilePath
	If TitleNumberStr <> "" then
		TitleNumberStr = Cint(TitleNumberStr)
	Else
		TitleNumberStr = 10
	End If
	if OpenTypeStr = "1" then
		 OpenTypeStr = "target=""_blank"""
	else
		OpenTypeStr = ""
	end if
	if TxtNaviStr <> "" then
		NaviPicStr = TxtNaviStr
	else
		if NaviPicStr <> "" then NaviPicStr = "<img src=""" & NaviPicStr & """>"
	end if
	if RowHeightStr <> "" then RowHeightStr = " Height=""" & RowHeightStr & """"
	if CompatPicStr <> "" then
		CompatPicStr = "<tr>" & Chr(13) & Chr(10) & "<td Height=1 colspan=""" & RowNumberStr & """>" & Chr(13) & Chr(10) & "<table width=""100%"" cellpadding=""0"" cellspacing=""0"">" & Chr(13) & Chr(10) & "<tr>" & Chr(13) & Chr(10) & "<td Height=1 background=""" & CompatPicStr & """>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>" & Chr(13) & Chr(10) & "</table>" & Chr(13) & Chr(10) & "</td>" & Chr(13) & Chr(10) & "</tr>"
	end if
	'调用子栏目修改2005年3月16日
	Dim TempRsHotDownListObj,AllClassID
	Set TempRsHotDownListObj = Conn.Execute("Select ClassID from NewsClass where ClassEName='" & ClassListStr & "'")
	if Not TempRsHotDownListObj.Eof then
		AllClassID = "'" & TempRsHotDownListObj("ClassID") & "'" & ChildClassIDList(TempRsHotDownListObj("ClassID"))
	else
		HotDownList = ""
		Set TempRsHotDownListObj = Nothing
		Exit Function
	end if
	Set TempRsHotDownListObj = Nothing
	'调用子栏目修改2005年3月16日
	if ClassListStr <> "" then
		HotDownListSql = "Select top " & NewNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,DownLoad.FileExtName as DownLoadFileExtName from DownLoad,NewsClass where DownLoad.ClassID=NewsClass.ClassID and DownLoad.AuditTF=1 and NewsClass.ClassID in (" & AllClassID & ") order by DownLoad.ClickNum Desc"
	else
		HotDownListSql = "Select top " & NewNumberStr & " *,NewsClass.FileExtName as ClassFileExtName,DownLoad.FileExtName as DownLoadFileExtName from DownLoad,NewsClass where DownLoad.ClassID=NewsClass.ClassID and DownLoad.AuditTF=1 order by DownLoad.ClickNum Desc"
	end if
	Set HotDownListObj = Conn.Execute(HotDownListSql)
	if Not HotDownListObj.Eof then
		HotDownList = "<table border=""0"" cellpadding=""0"" cellspacing=""0"" width=""100%"">" & Chr(13) & Chr(10)
		do while Not HotDownListObj.Eof
			HotDownList = HotDownList & "<tr>" & Chr(13) & Chr(10)
			for i = 1 to RowNumberStr
				if HotDownListObj("SaveFilePath") = "/" then
					ClassSaveFilePath = HotDownListObj("SaveFilePath")
				else
					ClassSaveFilePath = HotDownListObj("SaveFilePath") & "/"
				end if
				HotDownList = HotDownList & "<td " & RowHeightStr & ">" & GetOneDownLoadList(HotDownListObj,DownListStyleStr,ClassSaveFilePath,"","",OpenTypeStr,NaviPicStr,CSSStyleStr) & "</td>" & Chr(13) & Chr(10)
				HotDownListObj.MoveNext
				if HotDownListObj.Eof then
					Exit For
				end if
			Next
			HotDownList = HotDownList & "</tr>" & Chr(13) & Chr(10)
			HotDownList = HotDownList & CompatPicStr
		Loop
		HotDownList = HotDownList & "</table>" & Chr(13) & Chr(10)
		Set HotDownListObj = Nothing
	else
		HotDownList = ""
	end if
End Function
'得到一条下载内容
Function GetOneDownLoadList(AlreadyDownListObj,StyleID,ClassSaveFilePath,ClassCNName,DateRuleStr,OpenTypeStr,NaviPicStr,CSSStyleStr)
	Dim DownListSql,RsDownListObj,StyleContent
	Dim TempStr
	if Not AlreadyDownListObj.Eof then
		if StyleID <> "" then
			DownListSql = "Select * from DownListStyle where ID=" & StyleID & ""
			Set RsDownListObj = Conn.Execute(DownListSql)
			if Not RsDownListObj.Eof then
				StyleContent = RsDownListObj("Content")
				if Not IsNull(AlreadyDownListObj("Name")) then
					StyleContent = Replace(StyleContent,"{DownLoad_Name}",NaviPicStr & ClassCNName & "<div style=word-break:break-all;><a Class=""" & CSSStyleStr & """ href=""" & AvailableDoMain & ClassSaveFilePath & AlreadyDownListObj("ClassEName") & "/" & AlreadyDownListObj("FileName") & "." & AlreadyDownListObj("DownLoadFileExtName") & """ " & OpenTypeStr & ">" & AlreadyDownListObj("Name") & "</a></div>")
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Name}","")
				end if
				if Not IsNull(AlreadyDownListObj("Version")) then
					StyleContent = Replace(StyleContent,"{DownLoad_Version}",AlreadyDownListObj("Version"))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Version}","")
				end if
				StyleContent = Replace(StyleContent,"{DownLoad_ClickNum}","<script src=" & AvailableDoMain & "/" & "DownClick.asp?DownLoadID="& AlreadyDownListObj("DownLoadID") &"></script>")
				if Not IsNull(AlreadyDownListObj("Types")) then
					Select Case AlreadyDownListObj("Types")
						Case 1 TempStr = "图片"
						Case 2 TempStr = "文件"
						Case 3 TempStr = "程序"
						Case 4 TempStr = "Flash"
						Case 5 TempStr = "音乐"
						Case 6 TempStr = "影视"
						Case 7 TempStr = "其他"
						Case Else TempStr = ""
					End Select
					StyleContent = Replace(StyleContent,"{DownLoad_Types}",TempStr)
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Types}","")
				end if
				if Not IsNull(AlreadyDownListObj("Language")) then
					Select Case AlreadyDownListObj("Language")
						Case 1 TempStr = "简体中文"
						Case 2 TempStr = "繁体中文"
						Case 3 TempStr = "英文"
						Case 4 TempStr = "法文"
						Case 5 TempStr = "日文"
						Case 6 TempStr = "德文"
						Case Else TempStr = ""
					End Select
					StyleContent = Replace(StyleContent,"{DownLoad_Language}",TempStr)
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Language}","")
				end if
				if Not IsNull(AlreadyDownListObj("Accredit")) then
					Select Case AlreadyDownListObj("Accredit")
						Case 1 TempStr = "免费"
						Case 2 TempStr = "共享"
						Case 3 TempStr = "试用"
						Case 4 TempStr = "演示"
						Case 5 TempStr = "注册"
						Case 6 TempStr = "破解"
						Case 7 TempStr = "零售"
						Case 8 TempStr = "其他"
						Case Else TempStr = ""
					End Select
					StyleContent = Replace(StyleContent,"{DownLoad_Accredit}",TempStr)
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Accredit}","")
				end if
				if Not IsNull(AlreadyDownListObj("FileSize")) then
					StyleContent = Replace(StyleContent,"{DownLoad_FileSize}",AlreadyDownListObj("FileSize"))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_FileSize}","")
				end if
				if Not IsNull(AlreadyDownListObj("Appraise")) then
					Select Case AlreadyDownListObj("Appraise")
						Case 1 TempStr = "★"
						Case 2 TempStr = "★★"
						Case 3 TempStr = "★★★"
						Case 4 TempStr = "★★★★"
						Case 5 TempStr = "★★★★★"
						Case 6 TempStr = "★★★★★★"
						Case Else TempStr = ""
					End Select
					StyleContent = Replace(StyleContent,"{DownLoad_Appraise}","<div style='white-space:nowrap;text-align:right;'>"&TempStr&"</div>")
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Appraise}","")
				end if
				if Not IsNull(AlreadyDownListObj("SystemType")) then
					StyleContent = Replace(StyleContent,"{DownLoad_SystemType}",AlreadyDownListObj("SystemType"))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_SystemType}","")
				end if
				if Not IsNull(AlreadyDownListObj("EMail")) then
					StyleContent = Replace(StyleContent,"{DownLoad_EMail}",AlreadyDownListObj("EMail"))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_EMail}","")
				end if
				if Not IsNull(AlreadyDownListObj("ProviderUrl")) then
					StyleContent = Replace(StyleContent,"{DownLoad_ProviderUrl}",AlreadyDownListObj("ProviderUrl"))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_ProviderUrl}","")
				end if
				if Not IsNull(AlreadyDownListObj("Provider")) then
					StyleContent = Replace(StyleContent,"{DownLoad_Provider}",AlreadyDownListObj("Provider"))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Provider}","")
				end if
				if Not IsNull(AlreadyDownListObj("PassWord")) then
					StyleContent = Replace(StyleContent,"{DownLoad_PassWord}",AlreadyDownListObj("PassWord"))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_PassWord}","")
				end if
				if Not IsNull(AlreadyDownListObj("AddTime")) then
					StyleContent = Replace(StyleContent,"{DownLoad_AddTime}",DateFormat(AlreadyDownListObj("AddTime"),DateRuleStr))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_AddTime}","")
				end if
				if Not IsNull(AlreadyDownListObj("EditTime")) then
					StyleContent = Replace(StyleContent,"{DownLoad_EditTime}",DateFormat(AlreadyDownListObj("EditTime"),DateRuleStr))
				else
					StyleContent = Replace(StyleContent,"{DownLoad_EditTime}","")
				end if
				TempStr = AlreadyDownListObj("Description")
				if Not IsNull(TempStr) then
					StyleContent = Replace(StyleContent,"{DownLoad_Description}",TempStr)
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Description}","")
				end if
				if Not IsNull(AlreadyDownListObj("Pic")) then
					StyleContent = Replace(StyleContent,"{DownLoad_Pic}","<img border=""0"" width=""60"" height=""60"" src=""" & AlreadyDownListObj("Pic") & """>")
				else
					StyleContent = Replace(StyleContent,"{DownLoad_Pic}","")
				end if
			else
				StyleContent = "没有下载列表显示的样式"
			end if
			Set RsDownListObj = Nothing
		else
			StyleContent = "没有下载列表显示的样式"
		end if
	else
		StyleContent = ""
		Exit Function
	end if
	GetOneDownLoadList = StyleContent
End Function
'??????
Function DownInfoStat(ClassListStr,ShowModeStr,CssFileStr)
	Dim ClassSql,RsClassObj,NewsSql,RsNewsObj,TempClassID,TempClassIDArray,AllClassID
	Dim UserSql,RsUserObj
	Dim ClassNum,NewsNum,UserNum
	Dim DownLoadClickNum,TodayDownLoadNum
	Dim FSO,FolderObj,DownLoadFolderSize
	Set FSO = Server.CreateObject("Scripting.FileSystemObject")
	Set FolderObj = FSO.GetFolder(Server.MapPath("/" & UpFiles & "/" & DownLoadDir))
	DownLoadFolderSize = CLng(FolderObj.Size/1024) & "KB"
	Set FSO = Nothing
	Set FolderObj = Nothing
	if ClassListStr = "" then
		if RefreshType = "Class" then
			TempClassID = ChildClassIDList(RefreshID)
			AllClassID = "'" & RefreshID & "'" & TempClassID
			TempClassIDArray = Split(AllClassID,",")
			ClassNum = UBound(TempClassIDArray)
			NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and ClassID in (" & AllClassID & ")"
			Set RsNewsObj = Conn.Execute(NewsSql)
			NewsNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
			NewsSql = "Select Sum(ClickNum) from DownLoad where AuditTF=1 and ClassID in (" & AllClassID & ")"
			Set RsNewsObj = Conn.Execute(NewsSql)
			DownLoadClickNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
			NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and AddTime=#" & Date & "# and ClassID in (" & AllClassID & ")"
			Set RsNewsObj = Conn.Execute(NewsSql)
			TodayDownLoadNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
		elseif RefreshType = "Index" then
			ClassSql = "Select Count(ID) from NewsClass where DelFlag=0"
			Set RsClassObj = Conn.Execute(ClassSql)
			ClassNum = RsClassObj(0)
			Set RsClassObj = Nothing
			NewsSql = "Select Count(ID) from DownLoad where AuditTF=1" '??  Riker
			Set RsNewsObj = Conn.Execute(NewsSql)
			NewsNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
			NewsSql = "Select Sum(ClickNum) from DownLoad where AuditTF=1"
			Set RsNewsObj = Conn.Execute(NewsSql)
			DownLoadClickNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
			NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and AddTime=#" & Date & "#"
			Set RsNewsObj = Conn.Execute(NewsSql)
			TodayDownLoadNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
		elseif RefreshType = "News" then
			ClassSql = "Select ClassID from News where ClassID='" & RefreshID & "' order by ID desc"
			Set RsClassObj = Conn.Execute(ClassSql)
			if Not RsClassObj.Eof then
				TempClassID = ChildClassIDList(RsClassObj("ClassID"))
				AllClassID = "'" & RsClassObj("ClassID") & "'" & TempClassID
				TempClassIDArray = Split(AllClassID,",")
				ClassNum = UBound(TempClassIDArray)
				NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and ClassID in (" & AllClassID & ")"
				Set RsNewsObj = Conn.Execute(NewsSql)
				NewsNum = RsNewsObj(0)
				Set RsNewsObj = Nothing
				NewsSql = "Select Sum(ClickNum) from DownLoad where AuditTF=1 and ClassID in (" & AllClassID & ")"
				Set RsNewsObj = Conn.Execute(NewsSql)
				DownLoadClickNum = RsNewsObj(0)
				Set RsNewsObj = Nothing
				NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and AddTime=#" & Date & "# and ClassID in (" & AllClassID & ")"
				Set RsNewsObj = Conn.Execute(NewsSql)
				TodayDownLoadNum = RsNewsObj(0)
				Set RsNewsObj = Nothing
			else
				ClassNum = 0
				NewsNum = 0
				DownLoadClickNum = 0
				TodayDownLoadNum = 0
			end if
			Set RsClassObj = Nothing
		elseif RefreshType = "DownLoad" then
			ClassSql = "Select ClassID from DownLoad where ClassID='" & RefreshID & "' order by ID desc"
			Set RsClassObj = Conn.Execute(ClassSql)
			if Not RsClassObj.Eof then
				TempClassID = ChildClassIDList(RsClassObj("ClassID"))
				AllClassID = "'" & RsClassObj("ClassID") & "'" & TempClassID
				TempClassIDArray = Split(AllClassID,",")
				ClassNum = UBound(TempClassIDArray)
				NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and ClassID in (" & AllClassID & ")"
				Set RsNewsObj = Conn.Execute(NewsSql)
				NewsNum = RsNewsObj(0)
				Set RsNewsObj = Nothing
				NewsSql = "Select Sum(ClickNum) from DownLoad where AuditTF=1 and ClassID in (" & AllClassID & ")"
				Set RsNewsObj = Conn.Execute(NewsSql)
				DownLoadClickNum = RsNewsObj(0)
				Set RsNewsObj = Nothing
				NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and AddTime=#" & Date & "# and ClassID in (" & AllClassID & ")"
				Set RsNewsObj = Conn.Execute(NewsSql)
				TodayDownLoadNum = RsNewsObj(0)
				Set RsNewsObj = Nothing
			else
				ClassNum = 0
				NewsNum = 0
				DownLoadClickNum = 0
				TodayDownLoadNum = 0
			end if
			Set RsClassObj = Nothing
		else
			ClassSql = ""
		end if
	else
		ClassSql = "Select ClassID from NewsClass where ClassEName='" & ClassListStr & "' order by AddTime desc"
		Set RsClassObj = Conn.Execute(ClassSql)
		if Not RsClassObj.Eof then
			TempClassID = ChildClassIDList(RsClassObj("ClassID"))
			AllClassID = "'" & RsClassObj("ClassID") & "'" & TempClassID
			TempClassIDArray = Split(AllClassID,",")
			ClassNum = UBound(TempClassIDArray)
			NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and ClassID in (" & AllClassID & ")"
			Set RsNewsObj = Conn.Execute(NewsSql)
			NewsNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
			NewsSql = "Select Sum(ClickNum) from DownLoad where AuditTF=1 and ClassID in (" & AllClassID & ")"
			Set RsNewsObj = Conn.Execute(NewsSql)
			DownLoadClickNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
			NewsSql = "Select Count(ID) from DownLoad where AuditTF=1 and AddTime=#" & Date & "# and ClassID in (" & AllClassID & ")"
			Set RsNewsObj = Conn.Execute(NewsSql)
			TodayDownLoadNum = RsNewsObj(0)
			Set RsNewsObj = Nothing
		else
			ClassNum = 0
			NewsNum = 0
			DownLoadClickNum = 0
			TodayDownLoadNum = 0
		end if
		Set RsClassObj = Nothing
	end if
	UserSql = "Select Count(ID) from Members"
	Set RsUserObj = Conn.Execute(UserSql)
	UserNum = RsUserObj(0)
	Set RsUserObj = Nothing  
	DownInfoStat = "<table Class=""" & CssFileStr & """ cellpadding=""0"" cellspacing=""0"" border=""0"" width=""100%"">" & Chr(13) & Chr(10)
	if ShowModeStr = "1" then
		DownInfoStat = DownInfoStat & "<tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "栏目数量&nbsp;&nbsp;" & ClassNum  & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "下载数量&nbsp;&nbsp;" & NewsNum  & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "下载次数&nbsp;&nbsp;" & DownLoadClickNum  & Chr(13) & Chr(10) 
		DownInfoStat = DownInfoStat & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "下载文件空间&nbsp;&nbsp;" & DownLoadFolderSize  & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "今日更新&nbsp;&nbsp;" & TodayDownLoadNum  & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "会员数量&nbsp;&nbsp;" & UserNum  & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</tr>" & Chr(13) & Chr(10)
	else
		DownInfoStat = DownInfoStat & "<tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & "栏目数量&nbsp;&nbsp;" & ClassNum & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & "下载数量&nbsp;&nbsp;" & NewsNum & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & "下载次数&nbsp;&nbsp;" & DownLoadClickNum & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & "下载文件空间&nbsp;&nbsp;" & DownLoadFolderSize & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & "今日更新&nbsp;&nbsp;" & TodayDownLoadNum & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<tr>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "<td>" & "会员数量&nbsp;&nbsp;" & UserNum & "</td>" & Chr(13) & Chr(10)
		DownInfoStat = DownInfoStat & "</tr>" & Chr(13) & Chr(10)
	end if
	DownInfoStat = DownInfoStat & "</table>"
End Function

Function DownLoad_Pic(PicWidth,PicHeight)
	DownLoad_Pic = "<img border=""0"" width="""& PicWidth & """ height=""" & PicHeight & """ src=""{DownLoad_Pic}"">"
End Function
%>