<%
'*************************************************
'标签名：WebTitle
'作  用：网站标题栏读取
'参  数：STitle频道名称，DataFrom数据库表名，Lmname栏目字段名,SortID----信息ID号
'*************************************************
Public SeoTitle
Sub WebTitle(STitle,DataFrom,Lmname,SortID)
dim rs,sql
if SortID="" then
SeoTitle=STitle
ElseIf SortID=0 then
SeoTitle=conn.Execute("Select ComName"&Language&" From TianTianCMS_Config")(0)
elseif not IsNumeric(SortID) Then
SeoTitle=cscw
elseif conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then
SeoTitle=cscw
else
set rs = server.createobject("adodb.recordset")
sql="select * from "&DataFrom&" where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
rs.open sql,conn,1,1
SeoTitle=rs(""&Lmname&""&Language)
rs.close
set rs=nothing
end If
end sub

'*************************************************
'标签名：XxTitle
'作  用：网站标题栏读取
'参  数：STitle频道名称，DataFrom数据库表名，xxname信息字段名，ID----信息ID号
'*************************************************
Public SeoKeywords,SeoDescription
Sub XxTitle(STitle,DataFrom,xxname,ID)
if ID <> "" or IsNumeric(ID) then
set rs = server.createobject("adodb.recordset")
sql="select * from "&DataFrom&" where ViewFlag"&Language&"="&DN_True&" and ID="&ID
rs.open sql,conn,1,3
If rs("SeoKeywords"&Language) <> "" Then
SeoKeywords=rs("SeoKeywords"&Language)
Else
SeoKeywords=rs(""&xxname&""&Language)
End If
If rs("SeoDescription"&Language) <> "" Then
SeoDescription=rs("SeoDescription"&Language)
Else
SeoDescription=rs(""&xxname&""&Language)
End If
SeoTitle=rs(""&xxname&""&Language)
End If
rs.close
set rs=Nothing
end sub
'*************************************************
'标签名：HeadNavigation
'作  用：网站导航栏目
'参  数：Headid----显示个数,0为不限制,color为颜色
'*************************************************
function HeadNavigation(Headid,color)
  dim rs,sql,goon,rss,sqll
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_Navigation where ViewFlag"&Language&"="&DN_True&" and Parentid=0 order by Sequence asc"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
  response.write "<td>"&Tian10&"</td>"  
  else  
  dim i
  i=1
Do
set rss = server.createobject("adodb.recordset")
  sqll="select * from TianTianCMS_Navigation where ViewFlag"&Language&"="&DN_True&" and Parentid="&rs("id")&" order by Sequence asc"
  rss.open sqll,conn,1,1
   if rss.bof and rss.eof then
    goon=1
  else
    goon=0
  end if
  rss.close
		If ISHTML = 1 Then
		If Instr(LCase(GetUrl),"index.asp") Then
		If Instr(LCase(rs("HtmlNavUrl")),"index.html") Or Instr(LCase(rs("HtmlNavUrl")),"membercenter.asp") Or Instr(LCase(rs("HtmlNavUrl")),"productbuy.asp")  Or Instr(LCase(rs("HtmlNavUrl")),"messagelist.asp")  Then
        AutoLink =""
		Else
		AutoLink ="html/"
		End If
		Else
		If Instr(LCase(rs("HtmlNavUrl")),"index.html") Or Instr(LCase(rs("HtmlNavUrl")),"membercenter.asp") Or Instr(LCase(rs("HtmlNavUrl")),"productbuy.asp")  Or Instr(LCase(rs("HtmlNavUrl")),"messagelist.asp")  Then
		AutoLink =""
		Else
		AutoLink ="html/"
		End If
		End if
		if goon=1 then%>
		 <td align="center" style="color:#<%=color%>;"><a href="<%=AutoLink%><%=rs("HtmlNavUrl")%>" class="menu_txt" style="color:#<%=color%>;" <%If rs("OutFlag")=True Then response.write"target=blank"%>><%=rs("NavName"&Language)%></a></td>
		 <%If i<Headid then response.write"<td align=""center"" class=""menu_txts"" style=""color:#"&color&";"">|</td>"		 
		 else%>			  
        <td align="center" style="color:#<%=color%>"><a href="<%=AutoLink%><%=rs("HtmlNavUrl")%>" class="menu_txt" id="menu<%=i%>" style="color:#<%=color%>;" <%If rs("OutFlag")=True Then response.write"target=blank"%>><%=rs("NavName"&Language)%></a></td>
       <%If i<Headid then response.write"<td align=""center"" class=""menu_txts"" style=""color:#"&color&";"">|</td>"	
        end if
	    Else
		if goon=1 Then
		response.write target%>
		 <td align="center" style="color:#<%=color%>"><a href="<%=rs("NavUrl")%>" class="menu_txt" style="color:#<%=color%>;" <%If rs("OutFlag")=True Then response.write"target=blank"%>><%=rs("NavName"&Language)%></a></td>
         <%If i<Headid then response.write"<td align=""center"" class=""menu_txts"" style=""color:#"&color&";"">|</td>"	
		 else %>  
		 <td align="center" style="color:#<%=color%>" ><a href="<%=rs("NavUrl")%>" id="menu<%=i%>" class="menu_txt" style="color:#<%=color%>;" <%If rs("OutFlag")=True Then response.write"target=blank"%>><%=rs("NavName"&Language)%></a></td>
         <%If i<Headid then response.write"<td align=""center"" class=""menu_txts"" style=""color:#"&color&";"">|</td>"
     end if			  
	 End If
	rs.movenext
	  i=i+1
	  if i>Headid And Headid>0 then exit do
	loop until rs.eof
  end If%>
  <td align="center" style="color:#<%=color%>" ></td>
<%
rs.close
set rs=nothing
end Function
function ChildShow()
%>
<script>
if (mtDropDown.isSupported()) {
var ms = new mtDropDownSet(mtDropDown.direction.down, 0, 0, mtDropDown.reference.bottomLeft);
<%
  dim rs,sql,goon,rss,sqll,rsss,sqlll
  set rs = server.createobject("adodb.recordset")
  sql="select top 11 * from TianTianCMS_Navigation where ViewFlag"&Language&"="&DN_True&" and Parentid=0 order by Sequence asc"
  rs.open sql,conn,1,1
  if rs.bof and rs.eof then
  response.write "<td>"&Tian10&"</td>"  
  else  
  dim i
  i=1
  Do
set rss = server.createobject("adodb.recordset")
  sqll="select * from TianTianCMS_Navigation where ViewFlag"&Language&"="&DN_True&" and Parentid="&rs("id")&" order by Sequence asc"
  rss.open sqll,conn,1,1
   if rss.bof and rss.eof then
   goon=1
  else
  goon=0
  end if
  rss.close
If ISHTML = 1 Then		
if goon=1 then
else%>			  
var menu<%=i%>= ms.addMenu(document.getElementById('menu<%=i%>'));
<%
set rsss=server.createobject("adodb.recordset")
sqlll="select * from TianTianCMS_Navigation where ViewFlag"&Language&"="&DN_True&" and Parentid="&rs("id")&" order by Sequence asc"
 rsss.open sqlll,conn,1,1
 if rsss.bof and rsss.eof then
  response.write "<td>"&Tian10&"</td>"  
  else	  	  
	Do
%>
menu<%=i%>.addItem('<%=rsss("NavName"&Language)%>','<%=rsss("HtmlNavUrl")%>');
<%
	rsss.movenext
	loop until rsss.eof
  end if
  rsss.close
 set rsss=nothing
    end if   
	Else
	if goon=1 then
	else%>
var menu<%=i%>= ms.addMenu(document.getElementById('menu<%=i%>'));
<%
set rsss=server.createobject("adodb.recordset")
sqlll="select * from TianTianCMS_Navigation where ViewFlag"&Language&"="&DN_True&" and Parentid="&rs("id")&" order by Sequence asc"
 rsss.open sqlll,conn,1,1
 if rsss.bof and rsss.eof then
  response.write "<td>"&Tian10&"</td>" 
  else	  	  
	Do
%>
menu<%=i%>.addItem('<%=rsss("NavName"&Language)%>','<%=rsss("NavUrl")%>');
<%rsss.movenext
	loop until rsss.eof
  end if
  rsss.close
 set rsss=nothing
  end if			  
 End If
	rs.movenext
	  i=i+1
	loop until rs.eof
  end If%>
mtDropDown.renderAll();
	}
	</script>
<%
rs.close
set rs=nothing
end Function

'*************************************************
'中英文变量，在会员中心栏目列表
'*************************************************
Dim title1,title2,title3,title4,title5,title6,title7,title8,title9,title10,title11,title12,title13,title14
If LCase(Language)="ch" Then
title1="注册会员"
title2="我的钱包"
title3="我的订单"
title4="我的应聘"
title5="我的留言"
title6="签写留言"
title7="全部留言"
title8="修改注册资料"
title9="修改支付密码"
title10="绑定QQ号快捷登录"
title11="QQ登录管理"
title12="退出登录"
title13="首页"
title14="会员中心"
title15="暂无相关信息"
Else
title1="Register"
title2="My wallet"
title3="My Orders"
title4="My Candidates"
title5="My Message"
title6="Write down the message"
title7="All messages "
title8="Edit Information"
title9="Modify payment password"
title10="Quick binding QQ number to log in"
title11="QQ login management"
title12="Login Out"
title13="Home"
title14="Member Center"
title15="No relevant information"
End If

'*************************************************
'标签名：WebMenu()
'作  用：会员中心栏目列表和栏目显示中使用
'参  数：call WebMenu()
'*************************************************
Function WebMenu()
If session("MemName")="" Or session("GroupID")="" Or session("MemLogin")<>"Succeed" Then
Response.Write "<tr><td height=""20""><div align=""center""><a href=""MemberRegister.asp"">"&title1&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"
Else

Response.Write "<tr><td height=""20""><div align=""center""><a href=""Memberwallet.asp"">"&title2&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

Response.Write "<tr><td height=""20""><div align=""center""><a href=""MemberOrder.asp"">"&title3&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

Response.Write "<tr><td height=""20""><div align=""center""><a href=""MemberTalent.asp"">"&title4&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

Response.Write "<tr><td height=""20""><div align=""center""><a href=""MemberMessage.asp"">"&title5&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

Response.Write "<tr><td height=""20""><div align=""center""><a href=""MessageWrite.asp"">"&title6&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

Response.Write "<tr><td height=""20""><div align=""center""><a href=""MessageList.asp"">"&title7&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

Response.Write "<tr><td height=""20""><div align=""center""><a href=""MemberInfo.asp"">"&title8&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

Response.Write "<tr><td height=""20""><div align=""center""><a href=""Memberpay.asp"">"&title9&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

If API_QQEnable=true Then
Response.Write "<tr><td height=""20""><div align=""center""><a title="""&title10&""" href=""Memberqq.asp"" ><font color=#FF0000><b>"&title11&"</b></font></a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"
End If

Response.Write "<tr><td height=""20""><div align=""center""><a href=""MemberLogin.asp?Action=Out"">"&title12&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

End If
End Function

'*************************************************
'标签名：WebLocation()
'作  用：栏目显示
'参  数：call WebLocation()
'*************************************************
function WebLocation()
 WebLocation="&nbsp;<a href=""index.asp"" class='top_m_txt01' >"&title13&"</a> &gt;&gt;<a href=""MemberCenter.asp"" class='top_m_txt01'>"&title14&"</a>&gt;&gt;"&VbCrLf
end Function

'*************************************************
'标签名：MemInfo()
'作  用：获得会员资料
'参  数：call MemInfo()
'*************************************************
sub MemInfo()
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_Members where MemName='"&session("MemName")&"'"
  rs.open sql,conn,1,1
  if rs.eof then
    response.write "<center>"&title15&"</center>"
  else
    mMemID=rs("ID")
	mMemName=rs("MemName")
	mGroupIdName=GroupName(rs("GroupID"))
	mRealName=rs("RealName")
	mSex=rs("Sex")
	mQuestion=rs("Question")
	mCompany=rs("Company")
	mAddress=rs("Address")
	mZipCode=rs("ZipCode")
	mTelephone=rs("Telephone")
	mFax=rs("Fax")
	mMobile=rs("Mobile")
	muserqq=rs("userqq")
	mEmail=rs("Email")
	mHomePage=rs("HomePage")
	mAddTime=rs("AddTime")
	mLoginTimes=rs("LoginTimes")
	mLastLoginTime=rs("LastLoginTime")
	mLastLoginIP=rs("LastLoginIP")
  end if
  rs.close
  set rs=nothing
end sub

'*************************************************
'标签名：GroupName(GroupID)
'作  用：获得会员级别
'参  数：GroupID会员级别ID
'*************************************************
function GroupName(GroupID)
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_MemGroup where GroupID='"&GroupID&"'"
  rs.open sql,conn,1,1
  GroupName=rs("GroupName"&Language)
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：Webpage()
'作  用：翻页模块
'参  数：call Webpage()
'*************************************************
function Webpage()
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write ""&Tian01&"<strong style=""color:red"">"&idcount&"</strong>"&Tian02&" "&Tian03&"：<strong style=""color:red"">"&page&"</strong>/"&pagec&" "&Tian04&"：<strong style=""color:red"">"&pages&"</strong>"&Tian02&"" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end if
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	else
	  response.write ("[<a href="""& myself &"Page="& i &""">"& i &"</a>]")
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end if
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
end Function


'*************************************************
'标签名：ServerQQ
'作  用：在线服务QQ
'参  数：Language-----语言
'        Displayqq----显示QQ号，1显0不显
'        Displaync----显示昵称，1显0不显
'        Displaypic----显示图标，1显0不显
'        qqskin ----在线状态图标1－13种
'        Line ----换行，1换0不换
'        color ----文字颜色
'返回值：QQ号显示
'*************************************************
function ServerQQ(Language,Displayqq,Displaync,Displaypic,qqskin,Line,color)
dim qqname,Nickname,QQ_NAME,QQ,MyQQ,N,temptext
If Language="En" Then qqskin=5
Set rssetupQQ=conn.execute("select * from TianTianCMS_QQ")
qqname= rssetupQQ("adm_qq")
Nickname= rssetupQQ("adm_qq_name"&Language)
set rssetupQQ=Nothing
qqname=replace(qqname,"，",",")
if isnull(Nickname) or Nickname="" then Nickname=qqname
Nickname=replace(Nickname,"，",",")
QQ_NAME=split(Nickname,",")
QQ=split(qqname,",")
for N=0 to UBound(QQ)
MyQQ=MyQQ+QQ(N)+":"
temptext="<span style='color:#FFFFFF'>"
next
for N=0 to UBound(QQ)
temptext=temptext&"&nbsp;&nbsp;<a target=blank href='tencent://message/?uin="&QQ(n)&"&Site="&SiteTitle&"&Menu=yes'>"
If Displaypic=1 then
temptext=temptext&"<img border='0' SRC=http://wpa.qq.com/pa?p=1:"&QQ(n)&":"&qqskin&" alt='"&QQ_name(n)&"'>"
End If
If Line=1 Then temptext=temptext&"<br>"
If Displayqq=1 Then temptext=temptext&"&nbsp;&nbsp;<span style='color:#"&color&"' title='"&QQ_name(n)&"'>"&QQ(n)&" </span>"
If Line=1 Then temptext=temptext&"<br>"
If Displaync=1 Then temptext=temptext&"&nbsp;&nbsp;<span style='color:#"&color&"'>"&QQ_name(n)&"</span>"
temptext=temptext&"</a>"
Next
temptext=temptext&"</a>"
temptext=temptext&"<</span>"
ServerQQ=temptext
end function 


'*************************************************
'标签名：TianTian_link_text
'作  用：文字友情链接调用
'参  数：Language语言
'        ls-----每行个数
'        Num----显示个数,0为不限制
'        color ----文字颜色
'*************************************************
function TianTian_link_text(Language,ls,Num,color)
Dim link2,temptext,i
i=0
m=0
set link2=server.CreateObject("adodb.recordset")
link2.open "select * from TianTianCMS_FriendLink where ViewFlag"&Language&"="&DN_True&" and LinkType="&DN_False&" order by px_id desc",conn,1,1
if link2.eof and link2.bof then
response.Write("&nbsp;"&Tian11&" !")
else
temptext="<table><tr><td width=""1""></td>"
do while not link2.eof
temptext=temptext& "<td width=""95""><a href=""" & link2("LinkUrl") & """ target=""_blank"" title=""" & link2("Remark"&Language&"") & """><span style='color:#"&color&"'>" & CutStr(link2("LinkName"&Language&""),12,"") & "</span></a></td>"
i=i+1
m=m+1
If m=ls And ls>0 then
temptext=temptext& "<tr><td width=""1""></td>"
m=0
End If
link2.movenext
if i>=Num And Num>0 then exit do
Loop
temptext=temptext& "</TABLE>"
end If
TianTian_link_text=temptext
link2.close
set link2=nothing
end Function

'*************************************************
'标签名：TianTian_link_img
'作  用：图片友情链接调用
'参  数：Language语言
'        ls-----每行个数
'        Num----显示个数,0为不限制
'*************************************************
function TianTian_link_img(Language,ls,Num)
Dim link2,temptext,i
i=0
m=0
set link2=server.CreateObject("adodb.recordset")
link2.open "select * from TianTianCMS_FriendLink where ViewFlag"&Language&"="&DN_True&" and LinkType="&DN_True&" order by px_id desc",conn,1,1
if link2.eof and link2.bof then
response.Write("&nbsp;"&Tian11&" !")
else
temptext="<table><tr><td width=""0""></td>"
do while not link2.eof
temptext=temptext& "<td width=""95""><a href="""&link2("LinkUrl")&""" title="""&link2("Remark"&Language&"")&""" target=""_blank""><img src="""&link2("LinkFace"&Language&"")&""" width=""88"" height=""31""  border=""0""/></a></td>"
i=i+1
m=m+1
If m=ls And ls>0 then
temptext=temptext& "<tr><td width=""0""></td>"
m=0
End If
link2.movenext
if i>=Num And Num>0 then exit do
Loop
temptext=temptext& "</TABLE>"
end If
TianTian_link_img=temptext
link2.close
set link2=nothing
end Function

'*************************************************
'标签名：userlogin
'作  用：会员登录调用
'*************************************************
sub userlogin()
if session("MemName")="" or session("GroupID")="" or session("MemLogin")<>"Succeed" then%>
	<table id = "#loginTable"  class='login_txt01' border="0" cellpadding="0" cellspacing="0" style="width: 160px">
	<form id="formLogin" name="formLogin" method="post" action="MemberLogin.asp">
	<tr><td style="height: 50px; ">  
	<table  border=0 cellpadding=0 cellspacing=0 style="width: 96px"> 
	 <tr align=center> 	<td height=25 style="width: 41px"><%If Language="Ch" then%>用户<%else%>Name<%End if%></td>
	 <td>
		<input name='LoginName' type='text' id='LoginName' size='10' maxlength='20' style="width: 56px"></td>   </tr> 	
		 <tr align=center> 	  <td height=25 align=center style="width: 41px"><%If Language="Ch" then%>密码<%else%>Pwd<%End if%></td> 	
	<td>
	<input name='LoginPassword' type='password' id='Password' size='10' maxlength='20' style="width: 56px"></td> </tr></table>	  
	<td style="height: 50px">   
	 <table  border=0 cellpadding=0 cellspacing=0>   
	  <tr><td><input name='Login' type='image' id='Login' src=images/userlogin.gif onclick= "javascript:formLogin.submit()"></td></tr>   
	   </table>	      
	   </td></tr>  <tr><td colspan=2 valign=top>
	   <table  border=0 cellpadding=0 cellspacing=0>   	 
	   <tr align=center>     	<td height=25><a href='MemberRegister.asp' target="_blank"><img src=images/zhu.gif width=74 height=21></a></td>     
	   	<td height=25 width=20></td> 	 <td align=right><a href='MemberGetPass.asp' target="_blank"><img src=images/wang.gif width=74 height=21></a></td>
	   </tr></table>  
    </td></tr>
	</form>
	</table>	
	<%else%>
	<table style="width: 170px">
	<tr>
  <td rowspan="3" align="center" valign="top" style="width: 53px">
	<img src="images/user_bg.gif" width="44" height="42" style="margin-top:5px;" /></td>
  <td height="28" colspan="2" style="width: 150px"><span style="font-size:12px; "><%If Language="Ch" then%>您好<%else%>Welcome<%End if%>：<%=session("MemName")%></span></td>
</tr>
<tr>
<td height="20" colspan="3" style="width: 150px"><%If Language="Ch" then%>会员级别<%else%>Group<%End if%>:<%=MemGroup(session("GroupID"))%></td>
</tr>
<tr>
 <td height="20" colspan="3" style="width: 150px"><a href="MemberInfo.asp" target="_blank"><%If Language="Ch" then%>会员中心<%else%>Member Center<%End if%></a> <a href="MemberLogin.asp?Action=Out"><%If Language="Ch" then%>退出登录<%else%>Out<%End if%></a></td>
</tr>
</table>
<%end If
end Sub

'*************************************************
'标签名：Notice
'作  用：网站公告调用
'参  数：ts-----显示条数
'        btw----标题长度
'        gd----是否滚动
'        gw ----滚动区宽度
'        gh----滚动区高度
'        gs ----滚动速度
'*************************************************
function Notice(ts,btw,gd,gw,gh,gs)
  dim rs,sql,temptext,color
  i=0
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_Notice where Acti=1 order by Topgg desc,id desc"
rs.open sql,conn,1,1
if rs.eof Then
temptext="<li>"&Tian11&"</li>"
  Else
If gd=1 Then temptext=temptext& "<marquee scrollAmount="&gs&" width="&gw&" height="&gh&" direction=up onmouseover='this.stop()' onmouseout='this.start()'>"
do while not rs.eof
if rs("topgg")=1 And gd=1 then
TempText=TempText&"<img src=""../images/top.gif"">"
end If
temptext=temptext& "<a href=""Notice.asp?ID="&rs("ID")&""" target=_blank>"&CutStr(rs("Title"&Language&""),btw,"...")&"</a><br>"
color=""
i=i+1
if i>=ts And ts>0 then exit do
rs.movenext
loop 
If gd=1 Then temptext=temptext& "</MARQUEE>"
End If
Notice=temptext
rs.close 
set rs=Nothing
end Function


'===========================================关于我们====================================================
'*************************************************
'函数名：AboutWebMenu
'        用于关于我们节点列表
'参  数：依次：btw标题长度，hg行高，b加粗0不显1显，xj信笺背景0不显1显
'*************************************************
function AboutWebMenu(btw,hg,b,xj)
If xj=1 Then xj="background=images/naSzarym.gif"
If b=1 Then
b1="<b>"
b2="</b>"
End if
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_About where ViewFlag"&Language&"="&DN_True&" and ChildFlag="&DN_False&" order by Sequence asc"
  rs.open sql,conn,1,1
  if rs.eof then
 TempText= "<tr><td height=""&hg&"">"&Tian11&"</td></tr>"
  else
    do
		If ISHTML = 1 Then
		    if Instr(LCase(GetUrl),"index.asp") then
			AutoLink = "html/"&AboutName&""&Separated&""&rs("ID")&"."&HTMLName&""
			Else
			AutoLink = ""&AboutName&""&Separated&""&rs("ID")&"."&HTMLName&""
			End if
		Else
			AutoLink = "About.asp?ID="&rs("ID")&""
		End If
		if rs("ID")=request.QueryString("ID") Then		
temptext=temptext& "<tr> <td height="""&hg&"""> <div align=""center""><a href="""&AutoLink&""" title="""&rs("AboutName"&Language)&""">"&b1&""&CutStr(rs("AboutName"&Language),btw,"...")&""&b2&"</a>"
temptext=temptext& "</div></td></tr><TR><TD height=1 colspan=""2""  "&xj&">"
temptext=temptext& "</TD></TR>"
		Else
temptext=temptext& "<tr> <td height="""&hg&"""> <div align=""center""><a href="""&AutoLink&""" title="""&rs("AboutName"&Language)&""">"&b1&""&CutStr(rs("AboutName"&Language),btw,"...")&""&b2&"</a>"
temptext=temptext& "</div></td></tr><TR><TD height=1 colspan=""2"" "&xj&">"
temptext=temptext& "</TD></TR>"
		end if
      rs.movenext
    loop until rs.eof
  end if
  rs.close
  set rs=Nothing
  AboutWebMenu=temptext
end Function

'*************************************************
'标签名：WebLocationAbout
'作  用：关于我们隶属栏目调用
'参  数：
'*************************************************
function WebLocationAbout()
If ISHTML =1 Then 
	 WebLocationAbout="&nbsp;<a href=""../index.html"" class=""agray"">"&Tian09&"</a> → <a href=""htm/"&AboutName&"."&HTMLName&""" class=""agray"">"&Tian28&"</a> - "&VbCrLf	 
 Else
	WebLocationAbout="&nbsp;<a href=""index.asp"" class=""agray"">"&Tian09&"</a> → <a href=""About.asp?id=1"" class=""agray"">"&Tian28&"</a> - "&VbCrLf	
 End If 

  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  if request.QueryString("ID")="" or not IsNumeric(request.QueryString("ID")) then
	sql="select top 1 * from TianTianCMS_About where ViewFlag"&Language&"="&DN_True&" and ChildFlag="&DN_False&" order by Sequence asc"
  else
	sql="select * from TianTianCMS_About where ViewFlag"&Language&"="&DN_True&" and ID="&request.QueryString("ID")
  end if
  rs.open sql,conn,1,1
  if rs.eof Then    
    WebLocationAbout=WebLocationAbout&""&Tian13&""	
  else
    WebLocationAbout=WebLocationAbout&""&rs("AboutName"&Language)
  end if
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：About
'作  用：关于我们内容调用
'参  数：依次：ID类别ID号，nrw内容截取长度，bt显示标题0不显1显,sj显示时间0不显大于按序号1显
'*************************************************
function About(id,nrw,bt,sj)
  dim rs,sql,TempText  
  set rs = server.createobject("adodb.recordset")
 sql="select * from TianTianCMS_About where ViewFlag"&Language&"="&DN_True&" and ID="&ID
  rs.open sql,conn,1,1
  if rs.eof then
  temptext=""&Tian11&""
  Else
		If ISHTML = 1 Then
        If Instr(LCase(GetUrl),"label.asp") Or Instr(LCase(GetUrl),"index.asp") Then
		AutoLink = "html/"&AboutName&""&Separated&""&rs("ID")&"."&HTMLName&""
		else
		AutoLink = ""&AboutName&""&Separated&""&rs("ID")&"."&HTMLName&""
		End if
		Else
			AutoLink = "About.asp?ID="&rs("ID")&""
		End If  
    If bt=1 Then TempText="<center>"&rs("AboutName"&Language&"")&"</center><p>"
    TempText=TempText&""&HTMLDecode(CutStr(rs("content"&Language&""),nrw,"..."))&""
	if Instr(LCase(GetUrl),"label.asp") Or Instr(LCase(GetUrl),"index.asp") Then TempText=TempText&"<a href="""&AutoLink&""" target=""_blank"">"&Tian29&">>></a><br>"
	TempText=TempText&"<div style=""float:right"">"&FormatDate(rs("UpdateTime"),sj)&"</div><p>"
  end if
  rs.close
  set rs=Nothing
  About=TempText
end Function
'==============================================关于我们END================================================

'================================================新闻动态=================================================
'*************************************************
'标签名：CallFolderViewNews
'作  用：新闻栏目显示调用(有级别收缩）
'参  数：
'*************************************************
Function CallFolderViewNews()
 FolderNews(0)
End Function
Function FolderNews(id)
  Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType,ViewFlag
  Dim listclass
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From TianTianCMS_ArticleCategory where ViewFlag"&Language&"="&DN_True&" and ParentID="&id&" order by id"
  rs.open sql,conn,1,1
  if id=0 and rs.recordcount=0 then
    response.write (""&Tian11&"!")
   exit function
  end if  
  i=1
  response.write("<table border='0' cellspacing='0' align='left' cellpadding='0'>")
  while not rs.eof
    ChildCount=conn.execute("select count(*) from TianTianCMS_ArticleCategory where ParentID="&rs("id"))(0)
    if ChildCount=0 then
	  if i=rs.recordcount then
	    FolderType="SortFileEnd"
	  else
	    FolderType="SortFile"
	  end if
	  FolderName=rs("SortName"&Language&"")&"&nbsp;"&ViewFlag
	  onMouseUp=""
	  listclass="list_c2"
    else
	  if i=rs.recordcount then
	 	FolderType="SortEndFolderOpen"
		ListType="SortEndListline"
		onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
		listclass="list_c1"
	  else
		FolderType="SortFolderOpen"
		ListType="SortListline"
		onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
		listclass="list_c1"
	  end if
	  FolderName=rs("SortName"&Language&"")&"&nbsp;"&ViewFlag
    end if
    response.write("<tr>")
If ISHTML = 1 Then
If Instr(LCase(GetUrl),"index.asp") Then
AutoLink = "html/"&NewSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = ""&NewSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
End if
Else
AutoLink = "ArticleList.asp?SortID="&rs("id")&""
End If
    response.write("<TD class="&listclass&" width=20 onMouseUp="&onMouseUp&">&nbsp;&nbsp;&nbsp;</TD><td nowrap id='b"&rs("id")&"' width=""116"" class='"&FolderType&"' onMouseUp="&onMouseUp&"><a href="""&AutoLink&""">"&FolderName&"</a>")
    response.write("</td></tr>")
	response.write("<tr>")
    response.write("<TD height=5></TD><td>")
    response.write("</td></tr>")
    if ChildCount>0 then%>
<tr id="a<%= rs("id")%>" style="display:none"><TD width=1>&nbsp;</TD><td class="<%= ListType%>" nowrap><% FolderNews(rs("id")) %></td></tr>
    <%end if
    rs.movenext
    i=i+1
  wend
  response.write("</table>")
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：WebMenuNews
'作  用：新闻栏目显示调用(无级别收缩）
'参  数：依次：ParentID栏目ID号，i，level
'*************************************************
function WebMenuNews(ParentID,i,level)
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_ArticleCategory where ViewFlag"&Language&"="&DN_True&" and ParentID="&ParentID&" order by ID asc"
  rs.open sql,conn,1,1
  if conn.execute("select ID from TianTianCMS_ArticleCategory Where ViewFlag"&Language&"="&DN_True&" and ParentID=0").eof then
 temptext=""&Tian11&""
 exit function
  end if
  do while not rs.eof
  	If ISHTML = 1 Then
		AutoLink = ""&NewSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "ArticleList.asp?SortID="&rs("ID")&""
	End If
	
	if ParentID=0 Then

Response.Write "<tr><td height=""20""><div align=""center""><a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

	else

Response.Write "<tr><td height=""20""><div align=""center""><a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"

	end if
    i=i+1
	if i<level then call WebMenuNews(rs("ID"),i,level)
	i=i-1
	rs.movenext
  loop 
  rs.close
  set rs=nothing
end function

'*************************************************
'标签名：WebLocationNewslist
'作  用：新闻动态列表页栏目隶属显示
'参  数：SortID栏目ID号
'*************************************************
function WebLocationNewslist(SortID)
If ISHTML =1 Then 
	 TempText="&nbsp;&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt; <a href=""html/"&NewSortName&"."&HTMLName&""">"&Article&Channel&"</a>"&VbCrLf	 
 Else
	 TempText="&nbsp;&nbsp;<a href=""index.asp"">"&Tian09&"</a>&gt;&gt; <a href=""ArticleList.asp"">"&Article&Channel&"</a>"&VbCrLf	 
 End If
  if SortID="" then
    TempText=TempText
  elseif not IsNumeric(SortID) Then    
    TempText=TempText&""&Tian13&""	   
  elseif conn.execute("select * from TianTianCMS_ArticleCategory Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then    
    TempText=TempText&""&Tian13&""	  
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_ArticleCategory where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
    rs.open sql,conn,1,1
	TempText=TempText&SortPathTXTnews("TianTianCMS_ArticleCategory",rs("ID"))
    rs.close
    set rs=nothing
  end If
 WebLocationNewslist=TempText
end Function

'*************************************************
'标签名：WebLocationNewsshow
'作  用：新闻动态详细显示页栏目隶属显示
'参  数：SortID新闻ID号
'*************************************************
function WebLocationNewsshow(SortID)
If ISHTML =1 Then 
	 TempText="&nbsp;&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt; <a href=""html/"&NewSortName&"."&HTMLName&""">"&Article&Channel&"</a>"&VbCrLf	 
 Else
	 TempText="&nbsp;&nbsp;<a href=""index.asp"">"&Tian09&"</a>&gt;&gt; <a href=""ArticleList.asp"">"&Article&Channel&"</a>"&VbCrLf	
 End If  

  if SortID="" then
    TempText=TempText
  elseif not IsNumeric(SortID) then   
    TempText=TempText&""&Tian13&""	 
  elseif conn.execute("select * from TianTianCMS_Article Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then   
    TempText=TempText&""&Tian13&""	
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_Article where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
    rs.open sql,conn,1,1
	TempText=TempText&SortPathTXTnews("TianTianCMS_ArticleCategory",rs("SortID"))
    rs.close
    set rs=nothing
  end If
  WebLocationNewsshow=TempText
end Function


'*************************************************
'标签名：SortPathTXTnews
'作  用：新闻动态栏目隶属显示公共块
'参  数：DataFrom数据库名称，ID号
'*************************************************
function SortPathTXTnews(DataFrom,ID)
  dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From "&DataFrom&" where ViewFlag"&Language&"="&DN_True&" and ID="&ID
  rs.open sql,conn,1,1
  if not rs.eof Then
	If ISHTML = 1 Then
	'If Instr(LCase(GetUrl),"articleshow.asp") Then
		'AutoLink = "../"&NewSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
		'Else
		AutoLink = ""&NewSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
		'End if
	Else
		AutoLink = "ArticleList.asp?SortID="&rs("ID")&""
	End If
	SortPathTXTnews=SortPathTXTnews(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&"""><span style=""color:#EC0000"">"&rs("SortName"&Language)&"</span></a>"
  end if
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：WebContentNews
'作  用：新闻动态标题显示（有分页）
'参  数：DataFrom数据表名,ID栏目一级ID号,SortPath父类数字路径0为全部,lx栏目名称（0不显1显），btw标题长度（以字节计），hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显），img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function WebContentNews(DataFrom,ID,SortPath,lx,btw,hg,xj,tj,gd,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
bj=""
If xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
dim rs,sql
  dim HideSort
  set rs = server.createobject("adodb.recordset")
  if ID="" then
	SortPath="0,"
  elseif not IsNumeric(ID) Then   
    response.write"<center>"&Tian11&"</center>"	  
	exit function
  elseif conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then    
    response.write"<center>"&Tian11&"</center>"	
	exit function
  else
	SortPath=conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID)("SortPath")
	conn.execute("update "&DataFrom&" set ClickNumber=ClickNumber+1 Where ID="&ID)
  end if
  sql="select * from "&DataFrom&" Where not(ViewFlag"&Language&"="&DN_True&") and SortPath like '%"&SortPath&"%'"
  rs.open sql,conn,1,1
  while not rs.eof
	HideSort="and not(Instr(SortPath,'"&rs("SortPath")&"')>0) "&HideSort
    rs.movenext
  wend
  rs.close
  dim idCount
  dim pages
      pages=NewInfo'每页显示条数
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  datafrom="TianTianCMS_Article"
  dim datawhere
	  datawhere="where ViewFlag"&Language&"="&DN_True&" and SortPath like '%"&SortPath&"%' "&HideSort& " "
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by TopFlag,id desc "
  dim i
  sql="select count(ID) as idCount from ["& datafrom &"]" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
    sql="select id from ["& datafrom &"] " & datawhere & taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end if
  if(idcount>0 and sqlid<>"") then
    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1

	Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
	Response.Write "  <tr height=""22"">"&VbCrLf	
	Response.Write "    <td width=""100%"" style=""color:#000000; font-weight:bold; background-color:#ececec;"">&nbsp;&nbsp;&nbsp;&nbsp;"&Tian17&"</td>"&VbCrLf
	Response.Write "    <td align=""center"" bgcolor=""#ececec"" style=""color:#000000; font-weight:bold;background-color:#ececec;"">"&Tian18&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
    while not rs.eof
	If ISHTML = 1 Then
		AutoLink = ""&NewName&""&Separated&""&rs("ID")&"."&HTMLName&""
		AutoLink_a = ""&NewSortName&""&Separated&""&conn.Execute("Select id From TianTianCMS_ArticleCategory Where SortPath='"&rs("SortPath")&"'")(0)&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "ArticleShow.Asp?ID="&rs("ID")&""
		AutoLink_a = "ArticleList.asp?SortID="&conn.Execute("Select id From TianTianCMS_ArticleCategory Where SortPath='"&rs("SortPath")&"'")(0)&""
	End If
	yss=rs("titlecolor")
	If ys=0 Then yss="000000"
	tjs=""
	If tj=1 Then tjs=Jian(Language,rs("CommendFlag"))
	sjs=""
	If sj>0 Then sjs=FormatDate(rs("UpdateTime"),sj)
	gds=""
	If gd=1 Then gds=Jacking(Language,rs("TopFlag"))
	hitss=""
    If hits=1 Then hitss="<font color=""#999999"" >["&rs("ClickNumber")&"]</font>"
	imgs=""
    If img=1 Then imgs="<img src=""../images/arrow_6.gif"" width=""11"" height=""11"" align=""absmiddle"" />"
	Response.Write "  <tr height="""&hg&""">"&VbCrLf    
	Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom;"" "& bj&">&nbsp;"&imgs&"&nbsp;&nbsp;"&VbCrLf
	If lx=1 Then Response.Write "[<a href="""&AutoLink_a&""">"&conn.Execute("Select SortName"&Language&" From TianTianCMS_ArticleCategory Where SortPath='"&rs("SortPath")&"'")(0)&"</a>]&nbsp;&nbsp;"&VbCrLf
	Response.Write ""&gds&"<a href="""&AutoLink&"""><SPAN style=""color:#"&yss&";"">"&CutStr(rs("NewsName"&Language),btw,"...")&"</SPAN></a>"&tjs&" "&hitss&"</td>"&VbCrLf
	Response.Write "    <td align=""center"" style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"""& bj&">"&sjs&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
	rs.movenext
    wend
	Response.Write "</table>"&VbCrLf
  else
    response.write "<center>"&Tian11&"</center>"
	exit function
  end if
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write ""&Tian01&"<strong style=""color:red"">"&idcount&"</strong>"&Tian02&" "&Tian03&"：<strong style=""color:red"">"&page&"</strong>/"&pagec&" "&Tian04&"：<strong style=""color:red"">"&pages&"</strong>"&Tian02&"" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  If ISHTML = 1 Then
  If ID = "" Then
  if(page>1) then response.write ("<a href="""&NewSortName&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a>")
  Else
  if(page>1) then response.write ("<a href="""&NewSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  Else
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmin>1) then response.write ("<a href="""&NewSortName&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  Else
  if(pagenmin>1) then response.write ("<a href="""&NewSortName&""&Separated&""&ID&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  Else
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
	If ISHTML = 1 Then
	If ID = "" Then
		response.write ("[<a href="""&NewSortName&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	Else
		response.write ("[<a href="""&NewSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	End If
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	End If
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmax<pagec) then response.write (" <a href="""&NewSortName&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&NewSortName&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  Else
  if(pagenmax<pagec) then response.write (" <a href="""&NewSortName&""&Separated&""&ID&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&NewSortName&""&Separated&""&ID&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Else
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
  rs.close
  set rs=nothing
end function

'*************************************************
'标签名：news
'作  用：新闻动态标题显示（无分页）
'参  数：依次：SortPath类别根据父类数字路径0为全部，sx属性（0全部，1推荐、2热门），s显示条数，ls列数，btw标题长度（以字节计），zt字号，hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显），img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function news(SortPath,sx,s,ls,btw,zt,hg,xj,tj,gd,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
dim rs,sql,t,TempText,g,iii,i,yss,bCh,bj,datawhere
t=0
bj=""
If xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
if SortPath<>"" then
'datawhere=" and CHARINDEX(SortPath,'"&SortPath&"')=0 "
datawhere=" and SortPath like '%"&SortPath&"%'"
 else
datawhere=""
end if
set rs=server.createobject("ADODB.recordset")
sql = "select * from TianTianCMS_Article where ViewFlag"&Language&"="&DN_True&""&datawhere&""
if sx=1 Then sql=sql&" and CommendFlag="&DN_True&""
if sx=1 Then
sql=sql&" order by id desc"
ElseIf sx=2 then
sql=sql&" order by ClickNumber desc,id desc"
Else
sql=sql&" order by TopFlag,id desc"
end If
Select Case sx
	Case 1
	b=""&Tian15&""	
	Case 2	
	b=""&Tian16&""	
	Case Else	
	b=""
End Select

rs.open sql,conn,1,1
if rs.eof Then
temptext=""&Tian11&""
else
iii=0
TempText="<table width=""100%""  border=""0"" cellspacing=""2"" cellpadding=""0"" >"
do while not rs.eof
  	If ISHTML = 1 Then
	    If Instr(LCase(GetUrl),"label.asp") Or Instr(LCase(GetUrl),"index.asp") Then
		AutoLink = "html/"&NewName&""&Separated&""&rs("ID")&"."&HTMLName&""
		Else
		AutoLink = ""&NewName&""&Separated&""&rs("ID")&"."&HTMLName&""
		End if
	Else
		AutoLink = "ArticleShow.asp?ID="&rs("ID")&""
	End If
i=i+1
IF iii Mod ls=0 Then TempText=TempText&"<tr height="""&hg&""">"

TempText=TempText&"<td "&bj&">"
if img=1 Then TempText=TempText&"<img src=""../images/icon_new.gif""> "
if gd=1 then
TempText=TempText&""&Jacking(Language,rs("TopFlag"))&""
end If
TempText=TempText&"<a target=""_blank"" title="&rs("NewsName"&Language)&" href="""&AutoLink&""">"
if rs("titlecolor")<>"" And ys=1 Then
yss=rs("titlecolor")
Else
yss="000000"
End If
TempText=TempText&"<SPAN style=""color:#"&yss&";font-size="&zt&"px"">"&CutStr(rs("NewsName"&Language&""),btw,"...")&"</SPAN></a>"
TempText=TempText&"</a>"
if tj=1 Then TempText=TempText&""&Jian(Language,rs("CommendFlag"))&""
IF hits=1 Then TempText=TempText&"<font color=""#999999"" >["&rs("ClickNumber")&"]</font>" 
If sj>0 Then TempText=TempText&"<td "&bj&" align=""right"">"
TempText=TempText&  " <font color=""#999999"" >"&FormatDate(rs("UpdateTime"),sj)&"</font>" 
If sj>0 Then TempText=TempText&  "</td>"
TempText=TempText&"</TD><td width=8>&nbsp;</td>"
	iii=iii+1
	IF iii Mod ls=0 then TempText=TempText&  "</tr>"
    if i>=s then exit do 
	Rs.movenext
	Loop	
	IF iii Mod ls<>0 then
	Do While not iii Mod ls=0
	TempText=TempText&  "<td></td>"
	iii=iii+1
	Loop
	TempText=TempText&  "</tr>"
	End IF
	TempText=TempText&  "</table>"	
end if
rs.close
set rs=Nothing
news=TempText
end Function

'*************************************************
'标签名：ContentNews
'作  用：新闻动态详细显示
'参  数：依次：id新闻ID号，btzt标题字号，btc标题颜色，sj时间格式（0－15），zt正文字号
'*************************************************
Function ContentNews(id,btzt,btc,sj,zt)  
  if ID="" or not IsNumeric(ID) then
    TempText= "<center>"&Tian11&"</center>"	
  elseif conn.execute("select * from TianTianCMS_Article Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then
  TempText="<tr><td><center>"&Tian11&"</center></td></tr>"  
  else
	dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_Article where ViewFlag"&Language&"="&DN_True&" and ID="&ID
    rs.open sql,conn,1,3
If btc=1 Then btc=rs("titlecolor")
TempText=TempText& " <tr><td height=""30"" colspan=""2"" align=""center"" class=""tit"" style=""font-weight: bold; font-size: "&btzt&"px;color:#"&btc&";"">"&rs("NewsName"&Language)&"</td>"
If rs("CommendFlag")=True then TempText=TempText& "<td><span style=""position:absolute; height:0px; width:0px;""><img style=""position:absolute; left:-150px; top:-50px;"" src=""images/tuijian.gif"" alt=""本站推荐"" align=""absmiddle"" /></span></td>"&VbCrLf
TempText=TempText& " </tr>"
  End If
if ViewNoRight(rs("GroupID"),rs("Exclusive")) Then
TempText=TempText& "<tr>"
TempText=TempText& "<td width=""25%"" height=""30"" class="""" style='border-top: 1 solid #666666;border-bottom: 1 solid #666666'>"&Tian30&"：<a href=""javascript:doZoom("&zt+6&")"">"&Tian31&"</a> <a href=""javascript:doZoom("&zt+4&")"">"&Tian32&"</a> <a href=""javascript:doZoom("&zt+2&")"">"&Tian33&"</a></td>"&VbCrLf
TempText=TempText& "<td width=""75%"" align=""center"" class=""top_m_txt01"" style='border-top: 1 solid #666666;border-bottom: 1 solid #666666'>"&VbCrLf
TempText=TempText& ""&Tian72&":"&rs("Author"&Language)&" &nbsp;&nbsp;"&Tian73&":"&rs("source"&Language)&"&nbsp;&nbsp;"&Tian34&":<font color=""#FF0000""><script language=""javascript"" src=""HitCount.asp?id="&rs("ID")&"&LX=TianTianCMS_Article""></script><script language=""javascript"" src=""HitCount.asp?action=count&LX=TianTianCMS_Article&id="&rs("ID")&"""></script></font>&nbsp;"&Tian35&"&nbsp;&nbsp;"&FormatDate(rs("UpdateTime"),sj)&"</td></tr>"&VbCrLf
TempText=TempText& "<tr><td colspan=""2""><br> <div style=""PADDING-RIGHT: 18px; FLOAT: left; widht: 280""><script src=""../ads/JS/Inside3.js""></script></div><div class=""top_m_txt01"" style='font-size:"&zt&"pt'><DIV><span id=""zoom"">&nbsp;"&rs("Content"&Language)&"</span></DIV></div></td></tr>"&VbCrLf
Else
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td align=""center""><img src=""Images/NoRight.jpg""></td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
end if
rs.update
rs.close
set rs=nothing
ContentNews=TempText
end Function
'============================================新闻动态END=================================================


'=============================================公司产品===================================================
'*************************************************
'*************************************************
'函数名：ProductCategory2j
'        用于产品分类列表,调用一、二级分类
 '标签说明,依次为：ty1信息一级分类ID号（0 为全部），by1是否显示一级分类（0不显1显)，by2是否显示二级分类（0不显1显)，ts1一级分类显示个数(0为全部），ts2二级分类显示个数（0为全部）,n1显示一级分类属下产品条数（0不显1显),n2显示二级分类属下产品条数（0不显1显),ls1一级分类显示列数（0不分列)，zt1一级分类字号，zt2二级分类字号，hg1一级分类行距，hg2二级分类行距，ys1一级颜色，ys2二级颜色
 '*************************************************
 Function ProductCategory2j(ty1,by1,by2,ts1,ts2,n1,n2,ls1,zt1,zt2,hg1,hg2,ys1,ys2) 
 Dim temptext,rsi,ti,ts,tj,idd
    temptext="<TABLE border=""0"" cellspacing=""1"" cellpadding=""0"">"
      temptext=temptext&"<tr><td valign=""top"">"         
     idd=" and id="&ty1
	 If ty1=0 Then idd=""
			set rs=server.CreateObject("adodb.recordset")
			rs.Open "select * from TianTianCMS_ProductCategory where ViewFlag"&Language&"="&DN_True&" and ParentID=0"&idd&" order by id",conn,1,1
if rs.eof Then
Response.Write "<font color=000000>"&Tian12&"</font>"
else
			tj=0
			do while not rs.eof
			If ISHTML = 1 Then
				AutoLink = "html/"&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
			Else
				AutoLink = "ProductList.asp?SortID="&rs("ID")&""
			End If
      temptext=temptext&"<TABLE border=""0"" cellspacing=""1"" cellpadding=""0"">"
	  temptext=temptext&"<TR height="""&hg1&"""><TD></TD><TD>"
	  If by1=1 then
	  temptext=temptext&"<A target=""_blank"" href="""&AutoLink&"""><FONT style=""font-size:"&zt1&"pt"" color=""#"&ys1&"""><B>"&rs("SortName"&Language&"")&"</B></FONT></A>"
     If n1=1 then
	 Sql="Select count(id) from TianTianCMS_Products Where ViewFlag"&Language&"="&DN_True&" and SortPath='"&rs("SortPath")&"'"
	 temptext=temptext&"<FONT color=""ff0000""><span title="&Tian36&""&conn.execute(sql)(0)&""&Tian37&" style=""cursor:help "">("&conn.execute(sql)(0)&")</span></FONT>"
	 End IF
	  End if
	  temptext=temptext&"</TD></TR>"	  
       set rsi=conn.execute("select * from TianTianCMS_ProductCategory where ParentID="&rs("id")&" order by id")
	       If by2=1 then
			temptext=temptext&"<tr height="""&hg1&"""><td></td><td>"
			ts=0

			do while not rsi.eof
			If ISHTML = 1 Then
				AutoLink = "html/"&ProSortName&""&Separated&""&rsi("ID")&""&Separated&"1."&HTMLName&""
			Else
				AutoLink = "ProductList.asp?SortID="&rs("ID")&""
			End If
            temptext=temptext&"<A target=""_blank"" href="""&AutoLink&"""> <FONT style=""font-size:"&zt2&"pt"" color=""#"&ys2&""">"&rsi("SortName"&Language&"")&"</FONT></A>"
			If n2=1 then
		    Sql="Select count(id) from TianTianCMS_Products Where ViewFlag"&Language&"="&DN_True&" and SortPath='"&rsi("SortPath")&"'"
	        temptext=temptext&"<FONT color=""ff0000""><span title="&Tian36&""&conn.execute(sql)(0)&""&Tian37&" style=""cursor:help "">("&conn.execute(sql)(0)&")</span></FONT>"
			End If
			temptext=temptext&"<FONT color=""#CCCCCC"">|</FONT>"
           ts=ts+1
		   if ts>=ts2 And ts2>0 then exit do 
           rsi.movenext
		   Loop
		   
		   End if
		   temptext=temptext&"</td></tr></table>"
		   ti=ti+1
		   if ti mod ls1=0 then
		   temptext=temptext&"</td></tr><tr height="""&hg1&"""><td valign='top'>"
		   else
		   temptext=temptext&"</td><td valign='top'>"
		   end if
		   rsi.close
           set rsi=nothing
           tj=tj+1
		   if tj>=ts1 And ts1>0 then exit do 
		   rs.movenext
		   Loop
End if		   
		   rs.close
		   set rs=nothing  
		   
           temptext=temptext&"</span></td></tr></TABLE>"
 
		   ProductCategory2j=temptext
End Function

'*************************************************
'函数名：ProductCategory3j
'        用于产品分类列表,调用一、二、三级分类
'参  数：依次为：ty1一级分类ID号（0 为全部），by1是否显示一级分类（0不显1显)，by2是否显示二级分类（0不显1显)，by3是否显示三级分类（0不显1显)，ts1一级分类显示个数(0为全部），ts2二级分类显示个数（0为全部），ts3三级分类显示个数（0为全部）,n1显示一级分类属下产品条数（0不显1显),n2显示二级分类属下产品条数（0不显1显),n3显示三级分类属下产品条数（0不显1显),ls一级分类显示列数（0不分列)，zt1一级分类字号，zt2二级分类字号，zt3三级分类字号，hg1一级分类行距，hg2二级分类行距，hg3三级分类行距，ys1一级颜色，ys2二级颜色，ys3三级颜色
'*************************************************
Function ProductCategory3j(ty1,by1,by2,by3,ts1,ts2,ts3,n1,n2,n3,ls,zt1,zt2,zt3,hg1,hg2,hg3,ys1,ys2,ys3)
 
 Dim temptext,rsi,rst3,ti,ts,tj,tt,idd,titlecolor2,lname,kg
    temptext="<TABLE border=""0"" cellspacing=""1"" cellpadding=""0"">"
      temptext=temptext&"<tr><td valign=""top"">"         
     idd=" and id="&ty1
	 If ty1=0 Then idd=""
			set rs=server.CreateObject("adodb.recordset")
			rs.Open "select * from TianTianCMS_ProductCategory where ViewFlag"&Language&"="&DN_True&" and ParentID=0"&idd&" order by id",conn,1,1
if rs.eof Then
Response.Write "<font color=000000>"&Tian12&"</font>"
else
			tj=0
			do while not rs.eof
			If ISHTML = 1 Then
				AutoLink = "html/"&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
			Else
				AutoLink = "ProductList.asp?SortID="&rs("ID")&""
			End If			
      temptext=temptext&"<TABLE border=""0"" cellspacing=""1"" cellpadding=""0"">"
	  temptext=temptext&"<TR height="""&hg1&"""><TD></TD><TD>"
	  If by1=1 then
	  temptext=temptext&"<A href="""&AutoLink&"""><FONT style=""font-size:"&zt1&"pt"" color=""#"&ys1&"""><B>"&rs("SortName"&Language&"")&"</B></FONT></A>"
     If n1=1 then
	 Sql="Select count(id) from TianTianCMS_Products Where ViewFlag"&Language&"="&DN_True&" and SortPath='"&rs("SortPath")&"'"
	 temptext=temptext&"<FONT color=""ff0000""><span title="&Tian36&""&conn.execute(sql)(0)&""&Tian36&" style=""cursor:help "">("&conn.execute(sql)(0)&")</span></FONT>"
	 End IF
	 End if
	  temptext=temptext&"</TD></TR>"	  
       set rsi=conn.execute("select * from TianTianCMS_ProductCategory where ParentID="&rs("id")&" order by id")
	   	    if rsi.eof Then
            Response.Write "<font color=000000>"&Tian12&"</font>"
            else
	        If by2=1 then
			temptext=temptext&"<tr height="""&hg1&"""><td>&nbsp;&nbsp;</td><td  width="""&960/ls&""">"
			ts=0
			do while not rsi.eof
			If ISHTML = 1 Then
				AutoLink = "html/"&ProSortName&""&Separated&""&rsi("ID")&""&Separated&"1."&HTMLName&""
			Else
				AutoLink = "ProductList.asp?SortID="&rs("ID")&""
			End If			
            temptext=temptext&"<A href="""&AutoLink&"""> <FONT style=""font-size:"&zt2&"pt"" color=""#"&ys2&""">"&rsi("SortName"&Language&"")&"</FONT></A>"
            If n2=1 then
		    Sql="Select count(id) from TianTianCMS_Products Where ViewFlag"&Language&"="&DN_True&" and SortPath='"&rsi("SortPath")&"'"
	        temptext=temptext&"<FONT color=""ff0000""><span title="&Tian36&""&conn.execute(sql)(0)&""&Tian37&" style=""cursor:help "">("&conn.execute(sql)(0)&")</span></FONT>"
			End If
			If by3=0 then
		    temptext=temptext&"<FONT color=""#CCCCCC"">|</FONT>"
            Else
            temptext=temptext&"<br>"
            set rst3=conn.execute("select * from TianTianCMS_ProductCategory where ParentID="&rsi("id")&" order by  id")
			if Not rst3.eof Then
		    temptext=temptext&"<table><tr height="""&hg3&"""><td></td><td>└"
			tt=0
			do while not rst3.eof
			If ISHTML = 1 Then
				AutoLink = "html/"&ProSortName&""&Separated&""&rst3("ID")&""&Separated&"1."&HTMLName&""
			Else
				AutoLink = "ProductList.asp?SortID="&rs("ID")&""
			End If					
			temptext=temptext&"<A href="""&AutoLink&"""><FONT style=""font-size:"&zt3&"pt"" color=""#"&ys3&""">"&rst3("SortName"&Language&"")&"</FONT></A>"			
			If n3=1 then
		    Sql="Select count(id) from TianTianCMS_Products Where ViewFlag"&Language&"="&DN_True&" and SortPath='"&rs3("SortPath")&"'"
	        temptext=temptext&"<FONT color=""ff0000""><span title="&Tian36&""&conn.execute(sql)(0)&""&Tian37&" style=""cursor:help "">("&conn.execute(sql)(0)&")</span></FONT>"
			End If
			temptext=temptext&"<FONT color=""#CCCCCC"">|</FONT>"
			tt=tt+1
			if tt>=ts3 And ts3>0 Then
            temptext=temptext&"..."
			exit Do
			End if
			rst3.movenext
		   Loop
		  temptext=temptext&"</td></tr></table>"
		   End if
		   rst3.close
           End If

           ts=ts+1
		   if ts>=ts2 And ts2>0 Then
		   temptext=temptext&"<A href=""info.asp?"">>>></A>"
		   exit do 
           End if
           rsi.movenext
		   Loop
		   End if
		   temptext=temptext&"</td></tr></table>"
		   ti=ti+1
		   if ti mod ls=0 then
		   temptext=temptext&"</td></tr><tr height="""&hg1&"""><td valign='top'>"
		   else
		   temptext=temptext&"</td><td valign='top'>"
		   end if
		   rsi.close
           set rsi=Nothing
           End If
           tj=tj+1
		   if tj>=ts1 And ts1>0 then exit do 
		   rs.movenext
		   Loop
end if
		   rs.close
		   set rs=nothing
           temptext=temptext&"</span></td></tr></TABLE>"		  
ProductCategory3j=temptext
End Function

'*************************************************
'函数名：ProductCategory
'        用于产品分类列表（有收缩）
'参  数：ID产品类别ID号
'*************************************************
Function ProductCategory(id)
  Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType,ViewFlag
  Dim listclass
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From TianTianCMS_ProductCategory where ViewFlag"&Language&"="&DN_True&" and ParentID="&id&" order by id"
  rs.open sql,conn,1,1
  if rs.eof Then
   response.write (""&Tian11&"!")
   exit function
   end if  
  if id=0 and rs.recordcount=0 then
    response.write (""&Tian11&"!")
   exit function
  end if  
  i=1
  response.write("<table border='0' cellspacing='0' align='left' cellpadding='0'>")
  while not rs.eof
    ChildCount=conn.execute("select count(*) from TianTianCMS_ProductCategory where ParentID="&rs("id"))(0)
    if ChildCount=0 then
	  if i=rs.recordcount then
	    FolderType="SortFileEnd"
	  else
	    FolderType="SortFile"
	  end if
	  FolderName=rs("SortName"&Language&"")&"&nbsp;"&ViewFlag
	  onMouseUp=""
	  listclass="list_c2"
    else
	  if i=rs.recordcount then
	 	FolderType="SortEndFolderOpen"
		ListType="SortEndListline"
		onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
		listclass="list_c1"
	  else
		FolderType="SortFolderOpen"
		ListType="SortListline"
		onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
		listclass="list_c1"
	  end if
	  FolderName=rs("SortName"&Language&"")&"&nbsp;"&ViewFlag
    end if
    response.write("<tr>")
If ISHTML = 1 Then
If Instr(LCase(GetUrl),"productbuy.asp")  or Instr(LCase(GetUrl),"index.asp") then
AutoLink = "html/"&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
End if
Else
AutoLink = "ProductList.asp?SortID="&rs("id")&""
End If
    response.write("<TD class="&listclass&" width=20 onMouseUp="&onMouseUp&">&nbsp;&nbsp;&nbsp;</TD><td nowrap id='b"&rs("id")&"' width=""116"" class='"&FolderType&"' onMouseUp="&onMouseUp&"><a href="""&AutoLink&""">"&FolderName&"</a>")
    response.write("</td></tr>")
	response.write("<tr>")
    response.write("<TD height=5></TD><td>")
    response.write("</td></tr>")
    if ChildCount>0 then%>
<tr id="a<%= rs("id")%>" style="display:none"><TD width=1>&nbsp;</TD><td class="<%= ListType%>" nowrap><% ProductCategory(rs("id")) %></td></tr>
    <%end if
    rs.movenext
    i=i+1
  wend
  response.write("</table>")
  rs.close
  set rs=nothing
end Function

'*************************************************
'函数名：WebLocationProductList
'        用于产品列表页产品栏目隶属显示
'*************************************************
function WebLocationProductList(SortID)
If ISHTML =1 Then 
	 TempText="&nbsp;&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt; <a href=""html/"&ProSortName&"."&HTMLName&""">"&Productm&"</a>"&VbCrLf	 
 Else
	 TempText="&nbsp;&nbsp;<a href=""index.asp"">"&Tian09&"</a>&gt;&gt; <a href=""ProductList.asp"">"&Productm&"</a>"&VbCrLf	 
 End If 
  if SortID="" then
    TempText=TempText
  elseif not IsNumeric(SortID) then    
    TempText=TempText&""&Tian13&""	 
  elseif conn.execute("select * from TianTianCMS_ProductCategory Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then    
    TempText=TempText&""&Tian13&""	
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_ProductCategory where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
    rs.open sql,conn,1,1
	TempText=TempText&SortPathTXTProduct("TianTianCMS_ProductCategory",rs("ID"))
    rs.close
    set rs=nothing
  end If
WebLocationProductList=TempText  
end Function

function SortPathTXTProduct(DataFrom,ID)
  dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From "&DataFrom&" where ViewFlag"&Language&"="&DN_True&" and ID="&ID
  rs.open sql,conn,1,1
  if not rs.eof Then
	If ISHTML = 1 Then
		AutoLink = ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "ProductList.asp?SortID="&rs("ID")&""
	End If
	SortPathTXTProduct=SortPathTXTProduct(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a>"
  end if
  rs.close
  set rs=nothing
end function

'*************************************************
'函数名：WebLocationProductList
'        用于产品详细页产品栏目隶属显示
'*************************************************
function WebLocationProductShow()
If ISHTML =1 Then 
	WebLocationProductShow="&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt;<a href='html/"&ProSortName&"."&HTMLName&"'>"&Productm&"</a>&nbsp;&gt;&gt;&nbsp;"&Productm&""&Tian29&""&VbCrLf	
 Else
	WebLocationProductShow="&nbsp;<a href=""index.asp"">"&Tian09&"</a>&gt;&gt;<a href=""ProductList.asp"">"&Productm&"</a>&nbsp;&gt;&gt;&nbsp;"&Productm&""&Tian29&""&VbCrLf	
 End If 
end Function

'*************************************************
'标签名：WebContentProduct
'作  用：产品列表（图片）调用（有分页）
'参  数：依次：DataFrom数据库名称，id产品类别ID号，SortPath类别根据父类数字路径0为全部,lx栏目名称（0不显1显），tj推荐标志（0不显1显），gd固顶标志（0不显1显），ys标题颜色（0不显1显），btw标题长度（以字节计），tw图片宽度，th图片高度，s每行显示个数
'*************************************************
function WebContentProduct(DataFrom,ID,SortPath,lx,tj,gd,ys,btw,tw,th,s)
If SortPath=0 Then SortPath=""
  dim rs,sql
  dim HideSort
  set rs = server.createobject("adodb.recordset")
  if ID="" then
	SortPath="0,"
  elseif not IsNumeric(ID) Then   
    response.write"<center>"&Tian11&"</center>"	
	exit function
  elseif conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then   
    response.write"<center>"&Tian11&"</center>"	  
	exit function
  else
	SortPath=conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID)("SortPath")
	conn.execute("update "&DataFrom&" set ClickNumber=ClickNumber+1 Where ID="&ID)
  end if
  sql="select * from "&DataFrom&" Where not(ViewFlag"&Language&"="&DN_True&") and SortPath like '%"&SortPath&"%'"
  rs.open sql,conn,1,1
  while not rs.eof
	HideSort="and not(Instr(SortPath,'"&rs("SortPath")&"')>0) "&HideSort
    rs.movenext
  wend
  rs.close
  dim idCount
  dim pages
      pages=ProInfo'每页显示条数     
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  datafrom="TianTianCMS_Products"
  dim datawhere
	  datawhere="where ViewFlag"&Language&"="&DN_True&" and SortPath like '%"&SortPath&"%' "&HideSort& " "
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by TopFlag,id desc "
  dim i
  sql="select count(ID) as idCount from ["& datafrom &"]" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
    sql="select id from ["& datafrom &"] " & datawhere & taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end if
  if(idcount>0 and sqlid<>"") Then
Response.Write "<table border=""0"" cellpadding=""0"" cellspacing=""0"" style=""margin-left:px"">"

    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1    
	dim SmallPicPath,Content,m
	i=0
	m=0
	do while not rs.eof	       	    
			If ISHTML = 1 Then
				AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
			Else
				AutoLink = "ProductShow.Asp?ID="&rs("ID")&""
			End If
			SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
	yss=rs("titlecolor")
	If ys=0 Then yss="000000"
	tjs=""
	If tj=1 Then tjs=Jian(Language,rs("CommendFlag"))	
	gds=""
	If gd=1 Then gds=Jacking(Language,rs("TopFlag"))
Response.Write "<td><li style='border:0px;margin-left:0px;float:left;width:"&tw+20&"px;'><table border ='0' cellpadding ='0' cellspacing='0'>"
Response.Write "<td width='5'></td>"
Response.Write "<td><table cellpadding='2' cellspacing='0'><tr><td style='border: 1px solid #ccc; width: "&tw+20&"px; height: "&th+10&"px; text-align: center;'>"

Response.Write "<a href="""&AutoLink&""" title="&rs("ProductName"&Language)&"><img src="""&SmallPicPath&""""

Response.Write "alt="&rs("ProductName"&Language)&" border='0' width='"&tw&"' height='"&th&"' /></a></td>"

Response.Write "</tr><tr><td style='height: 28px; text-align: center'>"&VbCrLf
	If lx=1 Then Response.Write "["&conn.Execute("Select SortName"&Language&" From TianTianCMS_ProductCategory Where SortPath='"&rs("SortPath")&"'")(0)&"]&nbsp;"&VbCrLf
Response.Write ""&gds&"<a href="""&AutoLink&""" title="""&rs("ProductName"&Language)&"""><SPAN style=""color:#"&yss&";"">"&CutStr(rs("ProductName"&Language),btw,"...")&""

Response.Write "</SPAN></a>"&tjs&"</td></tr></table></td><td width='5'></td></table></li></td>"

i=i+1
m=m+1
If m=s then
Response.Write "</tr>"
m=0
End If
rs.movenext
if i>=ProInfo And ProInfo>0 then exit do
  loop
Response.Write "</ul></td></tr></table>"
  else    
    response.write"<center>"&Tian11&"</center>"
	exit function
  end If
  Response.Write "<div class=""clear""></div><div>"
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write ""&Tian01&"<strong style=""color:red"">"&idcount&"</strong>"&Tian02&" "&Tian03&"：<strong style=""color:red"">"&page&"</strong>/"&pagec&" "&Tian04&"：<strong style=""color:red"">"&pages&"</strong>"&Tian02&"" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  If ISHTML = 1 Then
  If ID = "" Then
  if(page>1) then response.write ("<a href="""&ProSortName&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  Else
  if(page>1) then response.write ("<a href="""&ProSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  Else
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmin>1) then response.write ("<a href="""&ProSortName&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  Else
  if(pagenmin>1) then response.write ("<a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  Else
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
	If ISHTML = 1 Then
	If ID = "" Then
		response.write ("[<a href="""&ProSortName&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	Else
		response.write ("[<a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	End If
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	End If
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmax<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  Else
  if(pagenmax<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Else
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
  Response.Write "</div>"&VbCrLf
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：RecommendProduct
'作  用：推荐产品列表（图片）调用（有分页）
'参  数：依次：DataFrom数据库名称，id产品类别ID号，SortPath类别根据父类数字路径0为全部,lx栏目名称（0不显1显），tj推荐标志（0不显1显），gd固顶标志（0不显1显），ys标题颜色（0不显1显），btw标题长度（以字节计），tw图片宽度，th图片高度，s每行显示个数
'*************************************************
function RecommendProduct(DataFrom,ID,SortPath,lx,tj,gd,ys,btw,tw,th,s)
If SortPath=0 Then SortPath=""
  dim rs,sql
  dim HideSort
  set rs = server.createobject("adodb.recordset")
  if ID="" then
	SortPath="0,"
  elseif not IsNumeric(ID) Then   
    response.write"<center>"&Tian11&"</center>"	
	exit function
  elseif conn.execute("select * from "&DataFrom&" Where CommendFlag="&DN_True&" and ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then   
    response.write"<center>"&Tian11&"</center>"	  
	exit function
  else
	SortPath=conn.execute("select * from "&DataFrom&" Where CommendFlag="&DN_True&" and ViewFlag"&Language&"="&DN_True&" and  ID="&ID)("SortPath")
	conn.execute("update "&DataFrom&" set ClickNumber=ClickNumber+1 Where ID="&ID)
  end if
  sql="select * from "&DataFrom&" Where not(ViewFlag"&Language&"="&DN_True&") and SortPath like '%"&SortPath&"%'"
  rs.open sql,conn,1,1
  while not rs.eof
	HideSort="and not(Instr(SortPath,'"&rs("SortPath")&"')>0) "&HideSort
    rs.movenext
  wend
  rs.close
  dim idCount
  dim pages
      pages=ProInfo'每页显示条数     
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  datafrom="TianTianCMS_Products"
  dim datawhere
	  datawhere="where CommendFlag="&DN_True&" and ViewFlag"&Language&"="&DN_True&" and SortPath like '%"&SortPath&"%' "&HideSort& " "
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by TopFlag,id desc "
  dim i
  sql="select count(ID) as idCount from ["& datafrom &"]" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
    sql="select id from ["& datafrom &"] " & datawhere & taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end if
  if(idcount>0 and sqlid<>"") Then
Response.Write "<table border=""0"" cellpadding=""0"" cellspacing=""0"" style=""margin-left:px"">"

    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1    
	dim SmallPicPath,Content,m
	i=0
	m=0
	do while not rs.eof	       	    
			If ISHTML = 1 Then
				AutoLink = "html/"&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
			Else
				AutoLink = "ProductShow.Asp?ID="&rs("ID")&""
			End If
			SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
	yss=rs("titlecolor")
	If ys=0 Then yss="000000"
	tjs=""
	If tj=1 Then tjs=Jian(Language,rs("CommendFlag"))	
	gds=""
	If gd=1 Then gds=Jacking(Language,rs("TopFlag"))
Response.Write "<td><li style='border:0px;margin-left:0px;float:left;width:"&tw+20&"px;'><table border ='0' cellpadding ='0' cellspacing='0'>"
Response.Write "<td width='5'></td>"
Response.Write "<td><table cellpadding='2' cellspacing='0'><tr><td style='border: 1px solid #ccc; width: "&tw+20&"px; height: "&th+10&"px; text-align: center;'>"

Response.Write "<a href="""&AutoLink&""" title="&rs("ProductName"&Language)&"><img src=""../../"&SmallPicPath&""""

Response.Write "alt="&rs("ProductName"&Language)&" border='0' width='"&tw&"' height='"&th&"' /></a></td>"

Response.Write "</tr><tr><td style='height: 28px; text-align: center'>"&VbCrLf
	If lx=1 Then Response.Write "["&conn.Execute("Select SortName"&Language&" From TianTianCMS_ProductCategory Where SortPath='"&rs("SortPath")&"'")(0)&"]&nbsp;"&VbCrLf
Response.Write ""&gds&"<a href="""&AutoLink&""" title="""&rs("ProductName"&Language)&"""><SPAN style=""color:#"&yss&";"">"&CutStr(rs("ProductName"&Language),btw,"...")&""

Response.Write "</SPAN></a>"&tjs&"</td></tr></table></td><td width='5'></td></table></li></td>"

i=i+1
m=m+1
If m=s then
Response.Write "</tr>"
m=0
End If
rs.movenext
if i>=ProInfo And ProInfo>0 then exit do
  loop
Response.Write "</ul></td></tr></table>"
  else    
    response.write"<center>"&Tian11&"</center>"
	exit function
  end If
  Response.Write "<div class=""clear""></div><div>"
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write ""&Tian01&"<strong style=""color:red"">"&idcount&"</strong>"&Tian02&" "&Tian03&"：<strong style=""color:red"">"&page&"</strong>/"&pagec&" "&Tian04&"：<strong style=""color:red"">"&pages&"</strong>"&Tian02&"" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  If ISHTML = 1 Then
  If ID = "" Then
  if(page>1) then response.write ("<a href="""&ProSortName&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  Else
  if(page>1) then response.write ("<a href="""&ProSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  Else
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmin>1) then response.write ("<a href="""&ProSortName&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  Else
  if(pagenmin>1) then response.write ("<a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  Else
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
	If ISHTML = 1 Then
	If ID = "" Then
		response.write ("[<a href="""&ProSortName&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	Else
		response.write ("[<a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	End If
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	End If
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmax<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  Else
  if(pagenmax<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Else
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
  Response.Write "</div>"&VbCrLf
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：Productstw
'作  用：产品图文展示调用（无分页）
'参  数：Language语言，Flag－调用类型0最新1推荐，Num－调用数量0为全部，ls－每行数量0不分行，gd－固顶显示0否1是，btw标题长度,ys标题颜色，tw－图片宽度，th－图片高度，w－区域宽度，h－区域高度
'*************************************************
function Productstw(Language,Flag,Num,ls,gd,btw,ys,tw,th,w,h)
Dim i,m,temptext
temptext="<div align='center' style='overflow:hidden;height:"&h&"px;width:"&w&"px;'>"
temptext=temptext& "<table align='center' cellpadding='0' cellspace='0' border='0'>"
temptext=temptext& "<tr><td valign='top'><table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'><tr valign='top'>"
set rs = server.createobject("adodb.recordset") 
  sql="select * from TianTianCMS_Products where ViewFlag"&Language&"="&DN_True&""
  If Flag=0 Then sql=sql+" and NewFlag="&DN_True&""
  If Flag=1 Then sql=sql+" and CommendFlag="&DN_True&""  
  sql=sql+" order by "
  If gd=1 Then sql=sql+"TopFlag,"
  sql=sql+"id desc"  
  rs.open sql,conn,1,1
  if rs.eof Then
  temptext=""&Tian11&""  
  else 
  i=0
  m=0
  do while not rs.eof
  ProductName=CutStr(rs("ProductName"&Language),btw,"...")
  If ys=1 Then ProductName="<font color=""#"&rs("titlecolor")&""">"&CutStr(rs("ProductName"&Language),btw,"...")&"</font>"
  If ISHTML = 1 Then
   if Instr(LCase(GetUrl),"index.asp") then
  AutoLink = "html/"&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
  Else
  AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
  End if
  Else
  AutoLink = "ProductShow.Asp?ID="&rs("id")&""
  End If
  SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
temptext=temptext& "<td align='center'><table width=100% border=0 align=center cellpadding=0 cellspacing=0>"
temptext=temptext& "<tr><td valign=top width=3><img src='Images/bg_0ltop.gif' width=10 height=10 /></td>"
temptext=temptext& "<td background=images/bg_01.gif></td><td valign=top width=7><img src='Images/bg_0rtop.gif' width=10 height=10 />"
temptext=temptext& "</td><td width=1 rowspan=3 valign=top></td></tr><tr><td background='Images/bg_03.gif'>&nbsp;</td>"
temptext=temptext& "<td width="""&tw&""" height="""&th+5&""" align=""center"" bgcolor=""#ffffff"">"
temptext=temptext& "<a href="""&AutoLink&""" target=_blank title="""&rs("ProductName"&Language)&""">"
temptext=temptext& "<img src="""&SmallPicPath&""" alt="""&rs("ProductName"&Language)&""" width="""&tw&""" height="""&th&""" border=""0"">"
temptext=temptext& "</a></td><td background='Images/bg_04.gif'>&nbsp;</td></tr><tr><td>"
temptext=temptext& "<img src='Images/bg_0lbottom.gif' width=10 height=10 /></td>"
temptext=temptext& "<td><img src='Images/bg_02.gif' width="""&tw&"""/></td><td><img src='Images/bg_0rbottom.gif' width=10 height=10 /></td>"
temptext=temptext& "</tr><tr><td colspan=3 align=center height=20 valign='top' style=""filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Images/bg_05.gif', sizingMethod='scale')"">"
temptext=temptext& "<a href="""&AutoLink&""" title="""&rs("ProductName"&Language)&""" target=_blank style=""cursor:pointer; position:relative;"">"&ProductName&"</a></td>"
temptext=temptext& "<td></td></tr></table></td>"
i=i+1
m=m+1
If m=ls And ls>0 then
temptext=temptext& "</tr>"
m=0
End If
rs.movenext
if i>=Num And Num>0 then exit do
  loop
temptext=temptext& "</tr></table></td><td valign=top></td></tr></table></div>" 
end If
rs.close
set rs=nothing
Productstw=temptext
end Function

'*************************************************
'标签名：ProductsGd
'作  用：产品图文(滚动)展示调用（无分页）
'参  数：Language语言，Flag－调用类型0最新1推荐，Num－调用数量0为全部，ls－每行数量0不分行，gd－固顶显示0否1是，btw标题长度,ys标题颜色，tw－图片宽度，th－图片高度，w－区域宽度，h－区域高度
'*************************************************
function ProductstGd(Language,Flag,Num,ls,gd,btw,ys,tw,th,w,h)
set rs = server.createobject("adodb.recordset") 
  sql="select * from TianTianCMS_Products where ViewFlag"&Language&"="&DN_True&""
  If Flag=0 Then sql=sql+" and NewFlag="&DN_True&""
  If Flag=1 Then sql=sql+" and CommendFlag="&DN_True&""  
  sql=sql+" order by "
  If gd=1 Then sql=sql+"TopFlag,"
  sql=sql+"id desc"   
  rs.open sql,conn,1,1
  if rs.eof Then
  temptext=""&Tian11&""  
  else 
 temptext="<DIV id=demo style=""OVERFLOW: hidden; WIDTH:"&w&"px; align: center"">"
 temptext=temptext& "<TABLE cellSpacing=0 cellPadding=0 align=center border=0>"
 temptext=temptext& "<TBODY><TR><TD id=marquePic1 vAlign=top>"
 temptext=temptext& "<TABLE height="&h&" cellSpacing=0 cellPadding=0 width=660 border=0>"
 temptext=temptext& "<TBODY>"
 temptext=temptext& "<TR><TD align=middle width=103><table border=""0"" cellspacing=""0"" cellpadding=""0""><tr>"
          dim ii
		  i=0
          ii=1
          do while not rs.eof
  ProductName=CutStr(rs("ProductName"&Language),btw,"...")
  If ys=1 Then ProductName="<font color=""#"&rs("titlecolor")&""">"&CutStr(rs("ProductName"&Language),btw,"...")&"</font>"
  If ISHTML = 1 Then
   if Instr(LCase(GetUrl),"index.asp") then
  AutoLink = "html/"&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
  Else
  AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
  End if
  Else
  AutoLink = "ProductShow.Asp?ID="&rs("id")&""
  End If
  SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))  
temptext=temptext& "<td><table width=""100%"" border=""0"" cellpadding=""5"" cellspacing=""1"">"
temptext=temptext& "<tr><td width="""&tw&"""><a href="""&AutoLink&""" class=""img"" target=_blank title="""&rs("ProductName"&Language)&"""><img src="""&SmallPicPath&"""  alt="""&rs("ProductName"&Language)&""" width="""&tw&""" height="""&th&""" border=""0""/></a></td></tr>"
temptext=temptext& "<tr><td><div align=""center""><a href="""&AutoLink&""" target=_blank title="""&rs("ProductName"&Language)&""">"&ProductName&"</a></div></td></tr></table></td>"
 if ii=ls And ls>0 then
 temptext=temptext& "<tr>"
 ii=0
 end If
 i=i+1
 ii=ii+1 
rs.movenext
if i>=Num And Num>0 then exit do
loop 
temptext=temptext& "</tr></table></TD></TR></TBODY></TABLE></TD><TD id=marquePic2 vAlign=top></TD></TR></TBODY></TABLE></DIV>"
end If
rs.close
set rs=nothing
ProductstGd=temptext
end Function

'*************************************************
'标签名：ProductForm
'作  用：产品表格式显示调用
'参  数：依次：SortPath类别根据父类数字路径0为全部，sx属性（1最新、2推荐、3热门），s显示条数，bz备注（0不显1显），btw标题长度（以字节计）,bzw备注长度（以字节计），zt字号，hg行高，tj推荐标志（0不显1显），gd固顶标志（0不显1显），tp图片标志（0不显1显），img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function ProductForm(SortPath,sx,s,bz,btw,bzw,zt,hg,tj,gd,tp,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
Dim AutoLink,hitss,upsj,yss
if SortPath<>"" then
datawhere=" and SortPath like '%"&SortPath&"%' "
 else
datawhere=""
end if
temptext="<table width=""100%"" border=""0"" cellspacing=""1"" cellpadding=""0"">"
temptext=temptext& "<tr><td></td></tr><tr align=""center""><td>"
temptext=temptext& "<table  width=""100%"" border=""0"" cellpadding=""1"" cellspacing=""1"" bgcolor=""#E2BAA0"" >"
temptext=temptext& "<tr Class=tdbg ><td  width=""34%"" height=""29"">"

temptext=temptext& "<div align=""center""><b>"&Tian38&"</b></font></div></td><td  width=""18%""><div align=""center""><b>"&Tian42&"</b></div></td><td  width=""9%""><div align=""center""><b>"&Tian21&"</b></div></td>"
If bz=1 Then temptext=temptext& "<td  width=""39%""><div align=""center""><b>"&Tian48&"</b></div></td>"
temptext=temptext& "</tr>"


set rs = server.createobject("adodb.recordset")
sql="select * from TianTianCMS_Products where ViewFlag"&Language&"="&DN_True&""&datawhere&""
if sx=1 Then sql=sql&" and NewFlag="&DN_True&""
if sx=2 Then sql=sql&" and CommendFlag="&DN_True&""
sql=sql&" order by TopFlag"
if sx=3 Then
sql=sql&",ClickNumber desc"
end If
sql=sql&",id desc"
rs.open sql,conn,1,1
if rs.eof Then
temptext=""&Tian11&""
else 
i=1
do while not rs.eof	
If ISHTML = 1 Then
If Instr(LCase(GetUrl),"label.asp") Or Instr(LCase(GetUrl),"index.asp") Then
AutoLink = "html/"&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
else
AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
End if
Else
AutoLink = "ProductShow.Asp?ID="&rs("id")&""
End If
hitss=""
IF hits=1 Then hitss="<font color=""#999999"" >["&rs("ClickNumber")&"]</font>" 
upsj=""
upsj=" <font color=""#999999"" >"&FormatDate(rs("UpdateTime"),sj)&"</font>" 
if rs("titlecolor")<>"" And ys=1 Then
yss=rs("titlecolor")
Else
yss="000000"
End If

SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
If i Mod 2=0 Then
temptext=temptext& "<tr bgcolor=""#ffffff""> <td height="""&hg&""">"
if img=1 Then TempText=TempText&"<img src=""../images/icon_new.gif""> "
temptext=temptext& ""&Jacking(Language,rs("TopFlag"))&""
if (rs("BigPic")<>"" or rs("SmallPic")<>"") And tp=1 Then TempText=TempText&"<img src=""../images/pic.gif"">" 
temptext=temptext& "<a href="""&AutoLink&""" target=""_blank""><SPAN style=""color:#"&yss&";font-size="&zt&"px"">"&CutStr(rs("ProductName"&Language),btw,"...")&"</SPAN></a>"
if tj=1 Then TempText=TempText&""&Jian(Language,rs("CommendFlag"))&""
TempText=TempText&" "&hitss&" "&upsj&""
temptext=temptext& "</td><td > <div align=""center"">"&rs("ProductModel")&"</div></td><td> <div align=""center"">"&rs("Unit"&Language)&"</div></td>"
If bz=1 Then temptext=temptext& "<td> "&CutStr(rs("Maker"&Language),bzw,"...")&"</td>"
temptext=temptext& "</tr>"
Else
temptext=temptext& "<tr bgcolor=""#E4EFFA""><td height="""&hg&""">"
if img=1 Then TempText=TempText&"<img src=""../images/icon_new.gif""> "
TempText=TempText&""&Jacking(Language,rs("TopFlag"))&""
if (rs("BigPic")<>"" or rs("SmallPic")<>"") And tp=1 Then TempText=TempText&"<img src=""../images/pic.gif"">" 
temptext=temptext& "<a href="""&AutoLink&""" target=""_blank""><SPAN style=""color:#"&yss&";font-size="&zt&"px"">"&CutStr(rs("ProductName"&Language),btw,"...")&"</SPAN></a>"
if tj=1 Then TempText=TempText&""&Jian(Language,rs("CommendFlag"))&""
TempText=TempText&" "&hitss&" "&upsj&""
temptext=temptext& "</td><td > <div align=""center"">"&rs("ProductModel")&"</div></td><td> <div align=""center"">"&rs("Unit"&Language)&"</div></td>"
If bz=1 Then temptext=temptext& "<td> "&CutStr(rs("Maker"&Language),bzw,"...")&"</td>"
temptext=temptext& "</tr>"
End If
if i>=s then exit do
rs.movenext	
i=i+1
Loop
end if
rs.close
set rs=nothing
temptext=temptext&"</table></td></tr><tr><td></td></tr></table>"
ProductForm=temptext
end Function

'*************************************************
'标签名：Product
'作  用：产品标题显示调用（无分页）
'参  数：依次：SortPath类别根据父类数字路径0为全部，sx属性（1最新、2推荐、3热门），s显示条数，ls列数，btw标题长度（以字节计），zt字号，hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显），tp图片标志（0不显1显），img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function Product(SortPath,sx,s,ls,btw,zt,hg,xj,tj,gd,tp,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
dim rs,sql,t,TempText,g,iii,i,yss,bCh,bj,datawhere
t=0
bj=""
If xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
if SortPath<>"" then
datawhere=" and SortPath like '%"&SortPath&"%' "
 else
datawhere=""
end if
set rs=server.createobject("ADODB.recordset")
sql = "select * from TianTianCMS_Products where ViewFlag"&Language&"="&DN_True&""&datawhere&""
if sx=1 Then sql=sql&" and NewFlag="&DN_True&""
if sx=2 Then sql=sql&" and CommendFlag="&DN_True&""
if sx=2 Then
sql=sql&" order by id desc"
ElseIf sx=3 then
sql=sql&" order by ClickNumber desc,id desc"
Else
sql=sql&" order by TopFlag,id desc"
end If
rs.open sql,conn,1,1
if rs.eof Then
temptext=""&Tian11&""
else
iii=0
TempText="<table width=""100%""  border=""0"" cellspacing=""2"" cellpadding=""0"" class=""border2"">"
do while not rs.eof
			If ISHTML = 1 Then
			    'If Instr(LCase(GetUrl),"productshow.asp") Then
				AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
				'Else
				'AutoLink = "html/"&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
				'End if
			Else
				AutoLink = "ProductShow.Asp?ID="&rs("ID")&""
			End If
i=i+1
IF iii Mod ls=0 Then TempText=TempText&"<tr height="""&hg&""">"

TempText=TempText&"<td "&bj&">"
if img=1 Then TempText=TempText&"<img src=""../images/icon_new.gif""> "
if gd=1 then
TempText=TempText&""&Jacking(Language,rs("TopFlag"))&""
end If
if (rs("BigPic")<>"" or rs("SmallPic")<>"") And tp=1 Then TempText=TempText&"<img src=""../images/pic.gif"">" 
TempText=TempText&"<a target=""_blank"" href="""&AutoLink&""" title="""&rs("ProductName"&Language&"")&""">"
if rs("titlecolor")<>"" And ys=1 Then
yss=rs("titlecolor")
Else
yss="000000"
End if
TempText=TempText&"<SPAN style=""color:#"&yss&";font-size="&zt&"px"">"&CutStr(rs("ProductName"&Language&""),btw,"...")&"</SPAN></a>"
if tj=1 Then TempText=TempText&""&Jian(Language,rs("CommendFlag"))&""
IF hits=1 Then TempText=TempText&"<font color=""#999999"" >["&rs("ClickNumber")&"]</font>" 
If sj>0 Then TempText=TempText&"<td "&bj&" align=""right"">"
TempText=TempText&  " <font color=""#999999"" >"&FormatDate(rs("UpdateTime"),sj)&"</font>" 
If sj>0 Then TempText=TempText&  "</td>"
TempText=TempText&"</TD><td width=8>&nbsp;</td>"
	iii=iii+1
	IF iii Mod ls=0 then TempText=TempText&  "</tr>"
    if i>=s then exit do 
	Rs.movenext
	Loop	
	IF iii Mod ls<>0 then
	Do While not iii Mod ls=0
	TempText=TempText&  "<td></td>"
	iii=iii+1
	Loop
	TempText=TempText&  "</tr>"
	End If

'TempText=TempText&  "<tr><td align=""right"">"
'If ISHTML = 1 Then
'If sx=2 Then TempText=TempText&"<a href=""Product_Recommend"&Separated&"1."&HTMLName&""">"
'If sx=3 Then TempText=TempText&"<a href=""Product_hot"&Separated&"1."&HTMLName&""">"
'Else
'If sx=2 Then TempText=TempText&"<a href=""Product_Recommend.asp"">"
'If sx=3 Then TempText=TempText&"<a href=""Product_hot.asp"">"
'End if
'TempText=TempText&  ""&Tian70&">>></a></td></tr>"

TempText=TempText&  "</table>"
end If
rs.close
set rs=Nothing
Product=TempText
end Function


'*************************************************
'标签名：ContentProducts
'作  用：产品详细显示
'参  数：依次：id产品ID号，btzt标题字号，btc标题颜色，sj时间格式（0－15），zt正文字号，tw图片宽度，th图片高度,gw购物车0不显1显，bh产品编号0不显1显,xh产品型号0不显1显,sp市场价格0不显1显,hp会员价格0不显1显,vpVIP价格0不显1显,pp批发价格0不显1显,gx更新时间0不显1显,dw出品单位0不显1显,sx产品自定义属性0不显1显,lc浏览次数0不显1显
'*************************************************
Function ContentProducts(id,btzt,ys,sj,zt,tw,th,gw,bh,xh,sp,hp,vp,pp,gx,dw,sx,lc)
TempText="<style type=""text/css"">"&VbCrLf 
TempText=TempText& ".zoomPan{width:200px;left:3px;position:relative; }"&VbCrLf
TempText=TempText& ".sh{zoom:1;background:#eee;filter:progid:DXImageTransform.Microsoft.dropShadow(color='#54000000', OffX=2,OffY=2);-webkit-box-shadow:4px 4px 4px #666;-moz-box-shadow:4px 4px 4px #666;}"&VbCrLf
TempText=TempText& "#zoom{position:absolute;width:254px;height:254px;border:3px solid #fff;left:-9999px;top:0;overflow:hidden;background:#fff;}"&VbCrLf
TempText=TempText& "#zoom img{position:relative;}"&VbCrLf
TempText=TempText& "h1{color:#FF0080;border-bottom:5px solid #ddd;padding:10px;}"&VbCrLf
TempText=TempText& "h4{text-align:right;padding:20px;border-top:1px solid #ddd;color:#ccc;}"&VbCrLf
TempText=TempText& "</style>"&VbCrLf
TempText=TempText& "<script type=""text/javascript"" src=""../Include/zoom.js""></script>"&VbCrLf
TempText=TempText& "<tr align=""center""><td width=""960"" align=""center"" style=""color:#000000; font-size:"&btzt&"px; font-weight:bold"">"  
  if ID="" or not IsNumeric(ID) then  
  TempText=TempText& "<center>"&Tian11&"</center>" 
  elseif conn.execute("select * from TianTianCMS_Products Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof Then  
  TempText=TempText& "<center>"&Tian11&"</center>"  
  else
	dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_Products where ViewFlag"&Language&"="&DN_True&" and ID="&ID
    rs.open sql,conn,1,3
	yss=rs("titlecolor")
    If ys=0 Then yss="000000"
	TempText=TempText& "<font color=""#"&yss&""">"&rs("ProductName"&Language)&"</font>"&VbCrLf
  End If

TempText=TempText& "</td></tr>"
if ViewNoRight(rs("GroupID"),rs("Exclusive")) Then
TempText=TempText& "  <tr>"&VbCrLf
TempText=TempText& "    <td>"&VbCrLf
TempText=TempText& "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"" align=""center"">"&VbCrLf
TempText=TempText& "  <tr height=""25"">"&VbCrLf

'图片放大镜调用标签中有关参数：-----
'图片放大镜
TempText=TempText& "<td rowspan=""12"" style=""width:180px; text-align:center"">"&VbCrLf
TempText=TempText& "<div class=""zoomPan"" id=""zoomPan"">"&VbCrLf
TempText=TempText& " <img src="""&HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))&""" id=""smallImg"" style=""border:1px #ccc;"" border=""0"" width='"&tw&"' height='"&th&"'>"&VbCrLf
TempText=TempText& "<div id=""zoom"" class=""sh"">"&VbCrLf
TempText=TempText& "<img src="""&HtmlSmallPic(rs("GroupID"),rs("BigPic"),rs("Exclusive"))&""" id=""bigImg"">"&VbCrLf
TempText=TempText& "</div></div>"&VbCrLf
'图片放大镜

TempText=TempText& "<a href="""&rs("BigPic")&""" title="""&Tian39&""" target=""_blank"">"&Tian39&"</a><br>"&VbCrLf
If gw=1 And rs("cart")=True Then TempText=TempText& "<a href=""ProductBuy.asp?ProductNo="&rs("ProductNo")&"&deliveryid="&session("deliveryid")&"&invoice="&session("invoice")&""" title="""&Tian40&"："&rs("ProductName"&Language)&"""><img src=""Images/buy.gif"" border=""0"" /></a>"&VbCrLf
TempText=TempText& "  </td>"&VbCrLf

TempText=TempText& "<td width=""15"" rowspan=""12"">  </td>"&VbCrLf
TempText=TempText& "    <td><b>"&Tian38&"：</b>"&rs("ProductName"&Language)&"</td>"&VbCrLf
If rs("CommendFlag")=True then TempText=TempText& "<td><span style=""position:absolute; height:0px; width:0px;""><img style=""position:absolute; left:-300px; top:-100px;"" src=""images/tuijian.gif"" alt="""&Tian71&""" title="""&Tian71&""" align=""absmiddle"" /></span></td>"&VbCrLf
TempText=TempText& "</tr>"&VbCrLf

If bh=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian41&"：</b>"&rs("ProductNo") &"</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
If xh=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian42&"：</b>"&rs("ProductModel") &"</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
If sp=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian43&"：</b>"&VbCrLf
If rs("N_Price")=0 then
TempText=TempText& ""&Tian69&""&VbCrLf
else
TempText=TempText& ""&rs("N_Price")&""&Tian47&"/"&rs("Unit"&Language)&""&VbCrLf
End if
TempText=TempText& "</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
If hp=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian67&"：</b>"&VbCrLf
If rs("M_Price")=0 then
TempText=TempText& ""&Tian69&""&VbCrLf
else
TempText=TempText& ""&rs("M_Price")&""&Tian47&"/"&rs("Unit"&Language)&""&VbCrLf
End if
TempText=TempText& "</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
If vp=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian68&"：</b>"&VbCrLf
If rs("V_Price")=0 then
TempText=TempText& ""&Tian69&""&VbCrLf
else
TempText=TempText& ""&rs("V_Price")&""&Tian47&"/"&rs("Unit"&Language)&""&VbCrLf
End if
TempText=TempText& "</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
If pp=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian44&"：</b>"&VbCrLf
If rs("P_Price")=0 then
TempText=TempText& ""&Tian69&""&VbCrLf
else
TempText=TempText& ""&rs("P_Price")&""&Tian47&"/"&rs("Unit"&Language)&""&VbCrLf
End if
TempText=TempText& "</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
If gx=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian18&"：</b>"&FormatDate(rs("UpdateTime"),sj)&"</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
If dw=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian45&"：</b>"&rs("Maker"&Language) &"</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
attribute1=rs("attribute1"&Language)
attribute1_value=rs("attribute1"&Language&"_value")
if attribute1 <> "" and attribute1_value <> "" And sx=1 then
	attribute1_1=Split(attribute1,"§§§")
	attribute1_value_1=Split(attribute1_value,"§§§")
for i=0 to ubound(attribute1_value_1)
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&attribute1_1(i)&"：</b>"&attribute1_value_1(i)&"</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
Next
End If
If lc=1 then
TempText=TempText& "  <tr height=""25"">"&VbCrLf
TempText=TempText& "    <td><b>"&Tian19&"：</b><script language=""javascript"" src=""HitCount.asp?id="&rs("ID")&"&LX=TianTianCMS_Products""></script><script language=""javascript"" src=""HitCount.asp?action=count&LX=TianTianCMS_Products&id="&rs("ID")&"""></script></td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
End If
TempText=TempText& "</table>"&VbCrLf
TempText=TempText& "    </td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
TempText=TempText& "  <tr>"&VbCrLf
TempText=TempText& "    <td height=""33"" style=""background:url(Images/bg2.gif) repeat-x left bottom"">&nbsp;<img src=""../images/smallbook.jpg"" width=""10"" height=""10"" align=""absmiddle"" />&nbsp;&nbsp;<b>"&Tian46&"</b></td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
TempText=TempText& "  <tr>"&VbCrLf
TempText=TempText& "    <td height=""25"" style=""padding-left: 8px; padding-right: 8px"">"&rs("Content"&Language)&"</td>"&VbCrLf
TempText=TempText& "  </tr>"&VbCrLf
Else
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td rowspan=""2"" align=""center""><img src=""Images/NoRight.jpg""></td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
end if
rs.update
rs.close
set rs=Nothing
ContentProducts=TempText
end Function
'=============================================公司产品END================================================

'=============================================人才招聘===================================================
'*************************************************
'标签名：WebMenuRecruitment
'作  用：招聘栏目显示调用
'参  数：依次：
'*************************************************
function WebMenuRecruitment()
If ISHTML =1 Then
TempText="<tr><td height=""20""><div align=""center""><a href="""&JobSortName&"."&HTMLName&""">"&Tian49&"</a></div></td>"
Else
TempText="<tr><td height=""20""><div align=""center""><a href=""RecruitmentList.asp"">"&Tian49&"</a></div></td>"
End if

TempText=TempText& "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
TempText=TempText& "</TD></TR>"
TempText=TempText& "<tr><td height=""20""><div align=""center""><a href=""MemberTalent.asp"">"&Tian50&"</a></div></td>"
TempText=TempText& "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
TempText=TempText& "</TD></TR>"
WebMenuRecruitment=TempText
end Function

'*************************************************
'标签名：WebLocationRecruitment
'作  用：招聘栏目隶属显示调用
'参  数：依次：
'*************************************************
function WebLocationRecruitmentlist()
If ISHTML =1 Then 
	 TempText="&nbsp;&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt; <a href="""&JobSortName&"."&HTMLName&""">"&Recruitmentm&Channel&"</a>"&VbCrLf	 
	 else
 TempText="&nbsp;<a href=""index.asp"" class=""agray"">"&Tian09&"</a>&gt;&gt;<a href=""RecruitmentList.asp"" class=""agray"">"&Tian49&"</a> "&VbCrLf
 End If
 WebLocationRecruitmentlist=TempText
end Function

'*************************************************
'标签名：WebContentRecruitment
'作  用：招聘列表调用（ 有分页）
'参  数：依次：DataFrom数据库名称，id招聘类别ID号，SortPath类别根据父类数字路径0为全部,lx栏目名称（0不显1显），btw标题长度（以字节计），sj时间格式1-15种
'*************************************************
function WebContentRecruitment(DataFrom,ID,SortPath,lx,btw,sj)
If SortPath=0 Then SortPath=""
  dim rs,sqltsj
  dim idCount
  dim pages
      pages=JobInfo
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenex
      datafrom="TianTianCMS_Recruitment"
  dim datawhere
	  datawhere="where ViewFlag"&Language&"="&DN_True&"  "
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by id desc "
  dim i
  sql="select count(ID) as idCount from ["& datafrom &"]" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
    sql="select id from ["& datafrom &"] " & datawhere & taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end If
	
  if(idcount>0 and sqlid<>"") then
    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1
		Response.Write "<table width=""100%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
		Response.Write "  <tr height=""26"">"&VbCrLf
		Response.Write "    <td style=""color:#000000; font-weight:bold; background:url(Images/split.gif) no-repeat right center; background-color:#ececec"">&nbsp;&nbsp;&nbsp;&nbsp;"&Tian49&"</td>"&VbCrLf
		Response.Write "    <td style=""color:#000000; font-weight:bold; background:url(Images/split.gif) no-repeat right center; background-color:#ececec"">&nbsp;&nbsp;"&Tian51&"</td>"&VbCrLf
		Response.Write "    <td style=""color:#000000; font-weight:bold; background:url(Images/split.gif) no-repeat right center; background-color:#ececec"">&nbsp;&nbsp;"&Tian52&"</td>"&VbCrLf
		Response.Write "    <td style=""color:#000000; font-weight:bold; background:url(Images/split.gif) no-repeat right center; background-color:#ececec"">&nbsp;&nbsp;"&Tian53&"</td>"&VbCrLf
		Response.Write "    <td style=""color:#000000; font-weight:bold; background:url(Images/split.gif) no-repeat right center; background-color:#ececec"">&nbsp;&nbsp;"&Tian24&"</td>"&VbCrLf
		Response.Write "    <td bgcolor=""#ececec"" style=""color:#000000; font-weight:bold"">&nbsp;&nbsp;"&Tian18&"</td>"&VbCrLf
		Response.Write "  </tr>"&VbCrLf
    while not rs.eof
		If ISHTML = 1 Then
			AutoLink = ""&JobName&""&Separated&""&rs("ID")&"."&HTMLName&""
		Else
			AutoLink = "RecruitmentShow.Asp?ID="&rs("ID")&""
		End If
		Response.Write "  <tr height=""28"">"&VbCrLf
		Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom;"">&nbsp;<img src=""../images/arrow_6.gif"" width=""11"" height=""11"" align=""absmiddle"" />&nbsp;&nbsp;"&VbCrLf
		If lx=1 Then Response.Write "[招聘职位]&nbsp;&nbsp;"&VbCrLf
		Response.Write "<a href="""&AutoLink&""">"&CutStr(rs("JobName"&Language),btw,"...")&"</a></td>"&VbCrLf
		Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"">&nbsp;&nbsp;&nbsp;"&rs("eEmployer"&Language)&"</td>"&VbCrLf
		Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"">&nbsp;&nbsp;&nbsp;"&rs("JobAddress"&Language)&"</td>"&VbCrLf
		Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"">&nbsp;&nbsp;&nbsp;"&rs("JobNumber")&"</td>"&VbCrLf
tsj=DateDiff("d",now(),""&rs("EndDate")&"")
if tsj>0 then
Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"">&nbsp;&nbsp;&nbsp;"&Tian26&"</td>"&VbCrLf
elseif tsj<0 then
Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"">&nbsp;&nbsp;&nbsp;"&Tian27&"</td>"&VbCrLf
end If

		Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"">&nbsp;&nbsp;&nbsp;"&FormatDate(rs("UpdateTime"),sj)&"</td>"&VbCrLf
		Response.Write "  </tr>"&VbCrLf
	rs.movenext
    Wend
		Response.Write "</table>"&VbCrLf
  else   
    response.write"<center>"&Tian11&"</center>"	
	exit function
  end if
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write ""&Tian01&"<strong style=""color:red"">"&idcount&"</strong>"&Tian02&" "&Tian03&"：<strong style=""color:red"">"&page&"</strong>/"&pagec&" "&Tian04&"：<strong style=""color:red"">"&pages&"</strong>"&Tian02&"" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  If ISHTML = 1 Then
  If ID = "" Then
  if(page>1) then response.write ("<a href="""&JobSortName&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  Else
  if(page>1) then response.write ("<a href="""&JobSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  Else
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmin>1) then response.write ("<a href="""&JobSortName&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  Else
  if(pagenmin>1) then response.write ("<a href="""&JobSortName&""&Separated&""&ID&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  Else
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
	If ISHTML = 1 Then
	If ID = "" Then
		response.write ("[<a href="""&JobSortName&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	Else
		response.write ("[<a href="""&JobSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	End If
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	End If
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmax<pagec) then response.write (" <a href="""&JobSortName&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&JobSortName&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  Else
  if(pagenmax<pagec) then response.write (" <a href="""&JobSortName&""&Separated&""&ID&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&JobSortName&""&Separated&""&ID&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Else
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：Recruitment
'作  用：招聘标题显示（无分页）
'参  数：依次：jssj招聘有效时间，sx属性（0全部，1推荐、2热门），s显示条数，ls列数，btw标题长度（以字节计），zt字号，hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显），img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色，hits点击数（0不显1显）
'*************************************************
function Recruitment(jssj,sx,s,ls,btw,zt,hg,xj,tj,gd,img,sj,ys,hits)
dim rs,sql,t,TempText,g,iii,i,yss,bCh,bj,datawhere
t=0
bj=""
If xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
set rs=server.createobject("ADODB.recordset")
sql = "select * from TianTianCMS_Recruitment where ViewFlag"&Language&"="&DN_True&""
if jssj=1 Then sql=sql&" and EndDate>"&DN_Now&""
if sx=1 Then sql=sql&" and CommendFlag="&DN_True&""
if sx=1 Then
sql=sql&" order by id desc"
ElseIf sx=2 then
sql=sql&" order by ClickNumber desc,id desc"
Else
sql=sql&" order by TopFlag,id desc"
end If

rs.open sql,conn,1,1
if rs.eof Then
temptext=""&Tian11&""
else
iii=0

TempText="<table width=""100%""  border=""0"" cellspacing=""2"" cellpadding=""0"" class=""border2"">"
do while not rs.eof
			If ISHTML = 1 Then
			    'If Instr(LCase(GetUrl),"recruitmentshow.asp") Then
				AutoLink = ""&JobName&""&Separated&""&rs("ID")&"."&HTMLName&""
				'Else
				'AutoLink = "html/"&JobName&""&Separated&""&rs("ID")&"."&HTMLName&""
				'End if
			Else
				AutoLink = "RecruitmentShow.Asp?ID="&rs("ID")&""
			End If			
i=i+1
IF iii Mod ls=0 Then TempText=TempText&"<tr height="""&hg&""">"

TempText=TempText&"<td "&bj&">"
if img=1 Then TempText=TempText&"<img src=""../images/icon_new.gif""> "
if gd=1 then
TempText=TempText&""&Jacking(Language,rs("TopFlag"))&""
end If
TempText=TempText&"<a target=""_blank"" title="""&rs("JobName"&Language&"")&""" href="""&AutoLink&""">"

TempText=TempText&"<SPAN style=""color:#"&ys&";font-size="&zt&"px"">"&CutStr(rs("JobName"&Language&""),btw,"...")&"</SPAN></a>"
TempText=TempText&"</a>"
if tj=1 Then TempText=TempText&""&Jian(Language,rs("CommendFlag"))&""
IF hits=1 Then TempText=TempText&"<font color=""#999999"" >["&rs("ClickNumber")&"]</font>" 
If sj>0 Then TempText=TempText&"<td "&bj&" align=""right"">"
TempText=TempText&  " <font color=""#999999"" >"&FormatDate(rs("UpdateTime"),sj)&"</font>" 
If sj>0 Then TempText=TempText&  "</td>"
TempText=TempText&"</TD><td width=8>&nbsp;</td>"
	iii=iii+1
	IF iii Mod ls=0 then TempText=TempText&  "</tr>"
    if i>=s then exit do 
	Rs.movenext
	Loop	
	IF iii Mod ls<>0 then
	Do While not iii Mod ls=0
	TempText=TempText&  "<td></td>"
	iii=iii+1
	Loop
	TempText=TempText&  "</tr>"
	End IF
	TempText=TempText&  "</table>"	
end if
rs.close
set rs=Nothing
Recruitment=TempText
end Function

'*************************************************
'标签名：WebContentshow
'作  用：招聘详细内容调用
'参  数：依次：DataFrom数据库名称，id招聘类别ID号，sj时间格式1-15种
'*************************************************
function WebContentshow(DataFrom,ID,sj)
  if ID="" or not IsNumeric(ID) then
    TempText= "<div class=""Bodyer_right_page_content"">"&Tian13&"</div>"	
  elseif conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then
    TempText= "<div class=""Bodyer_right_page_content"">"&Tian13&"</div>"	
  Else
	dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from "&DataFrom&" where ViewFlag"&Language&"="&DN_True&" and ID="&ID
    rs.open sql,conn,1,3
	TempText=TempText& "<table width=""98%"" border=""0"" align=""center"" cellpadding=""3"" cellspacing=""5"">"&VbCrLf
	TempText=TempText& "  <tr>"&VbCrLf
	TempText=TempText& "    <td style=""background:url(images/bg1.gif) repeat-x left bottom""><strong style=""color:red"">"&rs("JobName"&Language)&"</strong><br>"&VbCrLf
	TempText=TempText&"("&Tian18&"："&FormatDate(rs("UpdateTime"),sj)&" "&Tian19&"：<script language=""javascript"" src=""HitCount.asp?id="&rs("ID")&"&LX=TianTianCMS_Recruitment""></script><script language=""javascript"" src=""HitCount.asp?action=count&LX=TianTianCMS_Recruitment&id="&rs("ID")&"""></script>)</td>"&VbCrLf
	TempText=TempText& "  </tr>"&VbCrLf
	TempText=TempText& "  <tr>"&VbCrLf
	TempText=TempText& "    <td style=""line-height:200%"" style=""border-collapse: collapse table-layout:fixed;word-break:break-all"">"&VbCrLf
	TempText=TempText& "      "&Tian51&"："&rs("eEmployer"&Language)&"<br />"&VbCrLf
	TempText=TempText& "      "&Tian52&"："&rs("JobAddress"&Language)&"<br />"&VbCrLf
	TempText=TempText& "      "&Tian53&"："&rs("JobNumber")&"<br />"&VbCrLf
	TempText=TempText& "      "&Tian54&"："&rs("Emolument"&Language)&" "&rmb&"<br />"&VbCrLf
	TempText=TempText& "      "&Tian55&"："&FormatDate(rs("StartDate"),sj)&" "&Tian56&" "&FormatDate(rs("EndDate"),sj)&"<br />"&VbCrLf
	TempText=TempText& "      "&Tian57&"："&rs("eContact"&Language)&"<br />"&VbCrLf
	TempText=TempText& "      "&Tian58&"："&rs("eTel")&"<br />"&VbCrLf
	TempText=TempText& "      "&Tian59&"："&rs("eAddress"&Language)&"<br />"&VbCrLf
	TempText=TempText& "	  "&Tian60&"："&rs("ePostCode")&"<br />"&VbCrLf
	TempText=TempText& "      "&Tian61&"："&rs("eEmail")&"<br />"&VbCrLf
	TempText=TempText& "      <br />"&VbCrLf
	TempText=TempText& "      <font color=""#ff3300"">"&Tian62&"：</font><br />"&VbCrLf
	TempText=TempText& "      "&HtmlStrReplace(rs("Responsibility"&Language))&"<br />"&VbCrLf
	TempText=TempText& "      <br />"&VbCrLf
	TempText=TempText& "      <font color=""#ff3300"">"&Tian63&"：</font><br />"&VbCrLf
	TempText=TempText& "      "&HtmlStrReplace(rs("Requirement"&Language))&"<br />"&VbCrLf
	TempText=TempText& "      <br />"&VbCrLf
	If rs("EndDate")>now() Then
	TempText=TempText& "      <a href=""TalentWrite.asp?JobID="&ID&"&JobName="&server.urlencode(rs("JobName"&Language))&""" ><img src=""Images/Page_resume.gif"" border=""0"" /></a></td>"&VbCrLf
	Else
	TempText=TempText& ""&Tian24&"："&Tian27&""&VbCrLf	
    End if
	TempText=TempText& "  </tr>"&VbCrLf
	TempText=TempText& "</table><br />"&VbCrLf
	rs.close
    set rs=nothing
  end If
  WebContentshow=TempText
end Function

'*************************************************
'标签名：WebLocationJl
'作  用：招聘简历栏目隶属
'*************************************************

function WebLocationJl()
If ISHTML =1 Then 
	WebLocationJl="&nbsp;&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt; <a href=""html/"&JobSortName&"."&HTMLName&""">"&Tian63&"</a>"&VbCrLf	 
	else
	WebLocationJl="&nbsp;<a href=""index.asp"" class=""agray"">"&Tian09&"</a>&gt;&gt;"&Tian63&""&VbCrLf
	End if
end Function

'=============================================人才招聘END===============================================

'=============================================下载中心===================================================
'*************************************************
'标签名：WebMenuDown
'作  用：下载栏目显示调用
'参  数：依次：
'*************************************************
function WebMenuDown(ParentID,i,level)
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_DownCategory where ViewFlag"&Language&"="&DN_True&" and ParentID="&ParentID&" order by ID asc"
  rs.open sql,conn,1,1
  if conn.execute("select ID from TianTianCMS_DownCategory Where ViewFlag"&Language&"="&DN_True&" and ParentID=0").eof then  
    response.write "<center>"&Tian11&"</center>"
	exit function
  end if
  do while not rs.eof
  	If ISHTML = 1 Then
        'If Instr(LCase(GetUrl),"downshow.asp") Then
		'AutoLink = "../"&DownSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
		'Else
		AutoLink = ""&DownSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
		'End if
	Else
		AutoLink = "DownList.asp?SortID="&rs("ID")&""
	End If
	if ParentID=0 Then

Response.Write "<tr><td height=""20""><div align=""center""><a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"
	else

Response.Write "<tr><td height=""20""><div align=""center""><a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"
	end if
    i=i+1
	if i<level then call WebMenuDown(rs("ID"),i,level)
	i=i-1
	rs.movenext
  loop 
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：WebLocationDownList
'作  用：下载列表页栏目隶属显示调用
'*************************************************
function WebLocationDownList(SortID)
If ISHTML =1 Then
	TempText="&nbsp;<a href=""../index."&HTMLName&""" class='top_m_txt01'>"&Tian09&"</a>&gt;&gt;<a href=""html/"&DownSortName&"."&HTMLName&""" class='top_m_txt01'>"&Down&"</a> "&VbCrLf
	Else
	TempText="&nbsp;<a href=""index.asp"" class='top_m_txt01'>"&Tian09&"</a>&gt;&gt;<a href=""DownList.asp"" class='top_m_txt01'>"&Down&"</a> "&VbCrLf
	End if
  if SortID="" then
    TempText=TempText
  elseif not IsNumeric(SortID) Then  
    TempText=TempText&""&Tian13&""	
  elseif conn.execute("select * from TianTianCMS_DownCategory Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then  
    TempText=TempText&""&Tian13&""	
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_DownCategory where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
    rs.open sql,conn,1,1
	TempText=TempText&SortPathTXTDown("TianTianCMS_DownCategory",rs("ID"))
    rs.close
    set rs=nothing
  end If
  WebLocationDownList=TempText
end Function

'*************************************************
'标签名：WebLocationDownShow
'作  用：下载详细页栏目隶属显示调用
'*************************************************
function WebLocationDownShow(SortID)
If ISHTML = 1 Then
	TempText="&nbsp;<a href=""../index."&HTMLName&""" class='top_m_txt01'>"&Tian09&"</a>&gt;&gt;<a href=""html/"&DownSortName&"."&HTMLName&""" class='top_m_txt01'>"&Tian65&"</a> "&VbCrLf
	Else
	TempText="&nbsp;<a href=""index.asp"" class='top_m_txt01'>"&Tian09&"</a>&gt;&gt;<a href=""DownList.asp"" class='top_m_txt01'>"&Tian65&"</a> "&VbCrLf
	End if
  if SortID="" then
    TempText=TempText
  elseif not IsNumeric(SortID) then   
    TempText=TempText&""&Tian13&""	
  elseif conn.execute("select * from TianTianCMS_Download Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then   
    TempText=TempText&""&Tian13&""	
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_Download where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
    rs.open sql,conn,1,1
	TempText=TempText&SortPathTXTDown("TianTianCMS_DownCategory",rs("SortID"))
    rs.close
    set rs=nothing
  end If
  WebLocationDownShow=TempText
end Function

function SortPathTXTDown(DataFrom,ID)'下载公共块
  dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From "&DataFrom&" where ViewFlag"&Language&"="&DN_True&" and ID="&ID
  rs.open sql,conn,1,1
  if not rs.eof Then
	If ISHTML = 1 Then
		AutoLink = ""&DownSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "DownList.asp?SortID="&rs("ID")&""
	End If
	SortPathTXTDown=SortPathTXTDown(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a>"
  end if
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：WebContentDown
'作  用：资源下载标题显示（有分页）
'参  数：DataFrom数据表名,ID栏目一级ID号,SortPath父类数字路径0为全部,lx栏目名称（0不显1显），btw标题长度（以字节计），hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显），img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function WebContentDown(DataFrom,ID,SortPath,lx,btw,hg,xj,tj,gd,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
If xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
  dim rs,sql
  dim HideSort
  set rs = server.createobject("adodb.recordset")
  if ID="" then
	SortPath="0,"
  elseif not IsNumeric(ID) then 
    response.write "<center>"&Tian11&"</center>"	
	exit function
  elseif conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then   
    response.write "<center>"&Tian11&"</center>"	
	exit function
  else
	SortPath=conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID)("SortPath")
	conn.execute("update "&DataFrom&" set ClickNumber=ClickNumber+1 Where ID="&ID)
  end if
  sql="select * from "&DataFrom&" Where not(ViewFlag"&Language&"="&DN_True&") and SortPath like '%"&SortPath&"%'"
  rs.open sql,conn,1,1
  while not rs.eof
	HideSort="and not(Instr(SortPath,'"&rs("SortPath")&"')>0) "&HideSort
    rs.movenext
  wend
  rs.close
  dim idCount
  dim pages
      pages=DownInfo
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  datafrom="TianTianCMS_Download"
  dim datawhere
	  datawhere="where ViewFlag"&Language&"="&DN_True&" and SortPath like '%"&SortPath&"%' "&HideSort& " "
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by TopFlag,id desc "
  dim i
  sql="select count(ID) as idCount from ["& datafrom &"]" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
    sql="select id from ["& datafrom &"] " & datawhere & taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end If
  if(idcount>0 and sqlid<>"") then
    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1
	Response.Write "<table width=""100%px"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
	Response.Write "  <tr height=""26"" width=500>"&VbCrLf
	Response.Write "    <td style=""color:#000000; font-weight:bold; background:url(Images/split.gif) no-repeat right center; background-color:#ececec"">&nbsp;&nbsp;&nbsp;&nbsp;"&Tian17&"</td>"&VbCrLf
	Response.Write "    <td style=""color:#000000; font-weight:bold; background:url(Images/split.gif) no-repeat right center; background-color:#ececec"">&nbsp;&nbsp;"&Tian66&"</td>"&VbCrLf
	Response.Write "    <td bgcolor=""#ececec"" style=""color:#000000; font-weight:bold"">&nbsp;&nbsp;"&Tian18&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
    while not rs.eof
	If ISHTML = 1 Then
		AutoLink = ""&DownName&""&Separated&""&rs("ID")&"."&HTMLName&""
		AutoLink_a = ""&DownSortName&""&Separated&""&conn.Execute("Select id From TianTianCMS_DownCategory Where SortPath='"&rs("SortPath")&"'")(0)&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "DownShow.Asp?ID="&rs("ID")&""
		AutoLink_a = "DownList.asp?SortID="&conn.Execute("Select id From TianTianCMS_DownCategory Where SortPath='"&rs("SortPath")&"'")(0)&""
	End If	
	yss=rs("titlecolor")
	If ys=0 Then yss="000000"
	tjs=""
	If tj=1 Then tjs=Jian(Language,rs("CommendFlag"))	
	gds=""
	If gd=1 Then gds=Jacking(Language,rs("TopFlag"))
	hitss=""
    If hits=1 Then hitss="<font color=""#999999"" >["&rs("ClickNumber")&"]</font>"
	imgs=""
    If img=1 Then imgs="<img src=""../images/arrow_6.gif"" width=""11"" height=""11"" align=""absmiddle"" />"

	Response.Write "  <tr height="""&hg&""">"&VbCrLf
	Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom;""  "&bj&">&nbsp;"&imgs&"&nbsp;&nbsp;"&VbCrLf
	If lx=1 Then Response.Write "[<a href="""&AutoLink_a&""">"&conn.Execute("Select SortName"&Language&" From TianTianCMS_DownCategory Where SortPath='"&rs("SortPath")&"'")(0)&"</a>]&nbsp;&nbsp;"&VbCrLf	
	Response.Write ""&gds&"<a href="""&AutoLink&"""><SPAN style=""color:#"&yss&";"">"&CutStr(rs("DownName"&Language),btw,"...")&"</SPAN></a>"&tjs&" "&hitss&"</td>"&VbCrLf
	Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom;"" "&bj&">&nbsp;&nbsp;&nbsp;"&rs("FileSize")&"</td>"&VbCrLf
	Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"" "&bj&">&nbsp;&nbsp;&nbsp;"&FormatDate(rs("Updatetime"),sj)&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
	rs.movenext
    wend
	Response.Write "</table>"&VbCrLf
    else   
    response.write "<center>"&Tian11&"</center>"	
	exit function
  end If
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write ""&Tian01&"<strong style=""color:red"">"&idcount&"</strong>"&Tian02&" "&Tian03&"：<strong style=""color:red"">"&page&"</strong>/"&pagec&" "&Tian04&"：<strong style=""color:red"">"&pages&"</strong>"&Tian02&"" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  If ISHTML = 1 Then
  If ID = "" Then
  if(page>1) then response.write ("<a href="""&DownSortName&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  Else
  if(page>1) then response.write ("<a href="""&DownSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  Else
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmin>1) then response.write ("<a href="""&DownSortName&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  Else
  if(pagenmin>1) then response.write ("<a href="""&DownSortName&""&Separated&""&ID&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  Else
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
	If ISHTML = 1 Then
	If ID = "" Then
		response.write ("[<a href="""&DownSortName&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	Else
		response.write ("[<a href="""&DownSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	End If
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	End If
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmax<pagec) then response.write (" <a href="""&DownSortName&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&DownSortName&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  Else
  if(pagenmax<pagec) then response.write (" <a href="""&DownSortName&""&Separated&""&ID&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&DownSortName&""&Separated&""&ID&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Else
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
  rs.close
  set rs=nothing
end function

'*************************************************
'标签名：Download
'作  用：下载标题显示调用（无分页）
'参  数：依次：SortPath类别根据父类数字路径0为全部，sx属性（1推荐、2热门），s显示条数，ls列数，btw标题长度（以字节计），zt字号，hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显）,img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function Download(SortPath,sx,s,ls,btw,zt,hg,xj,tj,gd,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
dim rs,sql,t,TempText,g,iii,i,yss,bCh,bj,datawhere
t=0
bj=""
If xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
if SortPath<>"" then
datawhere=" and SortPath like '%"&SortPath&"%' "
 else
datawhere=""
end if
set rs=server.createobject("ADODB.recordset")
sql = "select * from TianTianCMS_Download where ViewFlag"&Language&"="&DN_True&""&datawhere&""
if sx=1 Then sql=sql&" and CommendFlag="&DN_True&""
if sx=1 Then
sql=sql&" order by id desc"
ElseIf sx=2 then
sql=sql&" order by ClickNumber desc,id desc"
Else
sql=sql&" order by TopFlag,id desc"
end If
rs.open sql,conn,1,1
if rs.eof Then
temptext=""&Tian11&""
else
iii=0
TempText="<table width=""100%""  border=""0"" cellspacing=""2"" cellpadding=""0"" class=""border2"">"
do while not rs.eof
			If ISHTML = 1 Then
			    If Instr(LCase(GetUrl),"label.asp") Or Instr(LCase(GetUrl),"index.asp") Then
			    AutoLink = "html/"&DownName&""&Separated&""&rs("ID")&"."&HTMLName&""
				else
				AutoLink = ""&DownName&""&Separated&""&rs("ID")&"."&HTMLName&""
				End if
			Else
				AutoLink = "DownShow.Asp?ID="&rs("ID")&""
			End If
i=i+1
IF iii Mod ls=0 Then TempText=TempText&"<tr height="""&hg&""">"
TempText=TempText&"<td "&bj&">"
if img=1 Then TempText=TempText&"<img src=""../images/icon_new.gif""> "
if gd=1 then
TempText=TempText&""&Jacking(Language,rs("TopFlag"))&""
end If
TempText=TempText&"<a target=""_blank"" href="""&AutoLink&""">"
if rs("titlecolor")<>"" And ys=1 Then
yss=rs("titlecolor")
Else
yss="000000"
End if
TempText=TempText&"<SPAN style=""color:#"&yss&";font-size="&zt&"px"">"&CutStr(rs("DownName"&Language&""),btw,"...")&"</SPAN></a>"
TempText=TempText&"</a>"
if tj=1 Then TempText=TempText&""&Jian(Language,rs("CommendFlag"))&""
IF hits=1 Then TempText=TempText&"<font color=""#999999"" >["&rs("ClickNumber")&"]</font>" 
If sj>0 Then TempText=TempText&"<td "&bj&" align=""right"">"
TempText=TempText&  " <font color=""#999999"" >"&FormatDate(rs("UpdateTime"),sj)&"</font>" 
If sj>0 Then TempText=TempText&  "</td>"
TempText=TempText&"</TD><td width=8>&nbsp;</td>"
	iii=iii+1
	IF iii Mod ls=0 then TempText=TempText&  "</tr>"
    if i>=s then exit do 
	Rs.movenext
	Loop	
	IF iii Mod ls<>0 then
	Do While not iii Mod ls=0
	TempText=TempText&  "<td></td>"
	iii=iii+1
	Loop
	TempText=TempText&  "</tr>"
	End IF
	TempText=TempText&  "</table>"	
end if
rs.close
set rs=Nothing
Download=TempText
end Function

'*************************************************
'标签名：ContentDown
'作  用：下载详细显示
'参  数：依次：id下载ID号，btzt标题字号，btc标题颜色，sj时间格式（0－15），zt正文字号
'*************************************************
Function ContentDown(id,btzt,btc,sj,zt)   
  if ID="" or not IsNumeric(ID) then 
  TempText=TempText& "<center>"&Tian11&"</center>" 
  elseif conn.execute("select * from TianTianCMS_Download Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then 
  TempText=TempText& "<center>"&Tian11&"</center>" 
  else
	dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_Download where ViewFlag"&Language&"="&DN_True&" and ID="&ID
    rs.open sql,conn,1,3
if rs("titlecolor")<>"" And btc=1 Then
yss=rs("titlecolor")
Else
yss="000000"
End if
TempText=TempText& "<tr><td><center><font style=""color:#"&yss&";font-weight:bold;font-size:"&btzt&"px;"">"&rs("DownName"&Language)&"</center>"&VbCrLf
End If
TempText=TempText& "</td></tr><tr><td>"
if ViewNoRight(rs("GroupID"),rs("Exclusive")) then
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td align=""center"" style=""color:#999999""><strong>"&Tian18&"：</strong>"&FormatDate(rs("UpdateTime"),sj)&" <strong>"&Tian66&"：</strong>"&rs("FileSize")&" <strong>"&Tian19&"：</strong><script language=""javascript"" src=""HitCount.asp?id="&rs("ID")&"&LX=TianTianCMS_Download""></script><script language=""javascript"" src=""HitCount.asp?action=count&LX=TianTianCMS_Download&id="&rs("ID")&"""></script></td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td height=""20"">&nbsp;</td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td style=""line-height:25px; font-size:12px; padding-left: 8px; padding-right: 8px""><a href="""&rs("FileUrl")&"""><strong style=""color:red"">"&Down&"</strong></a></td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td style=""line-height:25px; font-size:"&zt&"px; padding-left: 8px; padding-right: 8px"">"&rs("Content"&Language)&"</td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
Else
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td align=""center""><img src=""Images/NoRight.jpg""></td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
end if
rs.update
rs.close
set rs=Nothing
ContentDown=TempText
end Function
'=============================================下载中心END===============================================

'=============================================视频开始===============================================
'*************************************************
'函数名：WebLocationvideoList
'        用于视频列表页视频栏目隶属显示
'*************************************************
function WebLocationvideoList(SortID)
If ISHTML =1 Then 
	 TempText="&nbsp;&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt; <a href=""html/"&ProSortName&"."&HTMLName&""">"&videotm&"</a>"&VbCrLf	 
 Else
	 TempText="&nbsp;&nbsp;<a href=""index.asp"">"&Tian09&"</a>&gt;&gt; <a href=""videoList.asp"">"&videotm&"</a>"&VbCrLf	 
 End If 
  if SortID="" then
    TempText=TempText
  elseif not IsNumeric(SortID) then    
    TempText=TempText&""&Tian13&""	 
  elseif conn.execute("select * from TianTianCMS_videoCategory Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then    
    TempText=TempText&""&Tian13&""	
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_videoCategory where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
    rs.open sql,conn,1,1
	TempText=TempText&SortPathTXTvideo("TianTianCMS_videoCategory",rs("ID"))
    rs.close
    set rs=nothing
  end If
WebLocationvideoList=TempText  
end Function

function SortPathTXTvideo(DataFrom,ID)
  dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From "&DataFrom&" where ViewFlag"&Language&"="&DN_True&" and ID="&ID
  rs.open sql,conn,1,1
  if not rs.eof Then
	If ISHTML = 1 Then
		AutoLink = ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "videoList.asp?SortID="&rs("ID")&""
	End If
	SortPathTXTvideo=SortPathTXTvideo(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a>"
  end if
  rs.close
  set rs=nothing
end function

'*************************************************
'函数名：WebLocationvideoList
'        用于视频详细页视频栏目隶属显示
'*************************************************
function WebLocationvideoShow()
If ISHTML =1 Then 
	WebLocationvideoShow="&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt;<a href='html/"&ProSortName&"."&HTMLName&"'>"&videotm&"</a>&nbsp;&gt;&gt;&nbsp;"&videotm&""&Tian29&""&VbCrLf	
 Else
	WebLocationvideoShow="&nbsp;<a href=""index.asp"">"&Tian09&"</a>&gt;&gt;<a href=""videoList.asp"">"&videotm&"</a>&nbsp;&gt;&gt;&nbsp;"&videotm&""&Tian29&""&VbCrLf	
 End If 
end Function

'*************************************************
'函数名：videoCategory
'        用于视频分类列表（有收缩）
'参  数：ID视频类别ID号
'*************************************************
Function videoCategory(id)
  Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType,ViewFlag
  Dim listclass
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From TianTianCMS_videoCategory where ViewFlag"&Language&"="&DN_True&" and ParentID="&id&" order by id"
  rs.open sql,conn,1,1
  if rs.eof Then
   response.write (""&Tian11&"!")
   exit function
   end if  
  if id=0 and rs.recordcount=0 then
    response.write (""&Tian11&"!")
   exit function
  end if  
  i=1
  response.write("<table border='0' cellspacing='0' align='left' cellpadding='0'>")
  while not rs.eof
    ChildCount=conn.execute("select count(*) from TianTianCMS_videoCategory where ParentID="&rs("id"))(0)
    if ChildCount=0 then
	  if i=rs.recordcount then
	    FolderType="SortFileEnd"
	  else
	    FolderType="SortFile"
	  end if
	  FolderName=rs("SortName"&Language&"")&"&nbsp;"&ViewFlag
	  onMouseUp=""
	  listclass="list_c2"
    else
	  if i=rs.recordcount then
	 	FolderType="SortEndFolderOpen"
		ListType="SortEndListline"
		onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
		listclass="list_c1"
	  else
		FolderType="SortFolderOpen"
		ListType="SortListline"
		onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
		listclass="list_c1"
	  end if
	  FolderName=rs("SortName"&Language&"")&"&nbsp;"&ViewFlag
    end if
    response.write("<tr>")
If ISHTML = 1 Then
If Instr(LCase(GetUrl),"index.asp") then
AutoLink = "html/"&videoSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = ""&videoSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
End if
Else
AutoLink = "videoList.asp?SortID="&rs("id")&""
End If
    response.write("<TD class="&listclass&" width=20 onMouseUp="&onMouseUp&">&nbsp;&nbsp;&nbsp;</TD><td nowrap id='b"&rs("id")&"' width=""116"" class='"&FolderType&"' onMouseUp="&onMouseUp&"><a href="""&AutoLink&""">"&FolderName&"</a>")
    response.write("</td></tr>")
	response.write("<tr>")
    response.write("<TD height=5></TD><td>")
    response.write("</td></tr>")
    if ChildCount>0 then%>
<tr id="a<%= rs("id")%>" style="display:none"><TD width=1>&nbsp;</TD><td class="<%= ListType%>" nowrap><% videoCategory(rs("id")) %></td></tr>
    <%end if
    rs.movenext
    i=i+1
  wend
  response.write("</table>")
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：videobt
'作  用：视频标题显示调用（无分页）
'参  数：依次：SortPath类别根据父类数字路径0为全部，sx属性（1推荐、2热门），s显示条数，ls列数，btw标题长度（以字节计），zt字号，hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显），tp图片标志（0不显1显），img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function videobt(SortPath,sx,s,ls,btw,zt,hg,xj,tj,gd,tp,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
dim rs,sql,t,TempText,g,iii,i,yss,bCh,bj,datawhere
t=0
bj=""
If xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
if SortPath<>"" then
datawhere=" and SortPath like '%"&SortPath&"%' "
 else
datawhere=""
end if
set rs=server.createobject("ADODB.recordset")
sql = "select * from TianTianCMS_video where ViewFlag"&Language&"="&DN_True&""&datawhere&""
if sx=1 Then sql=sql&" and CommendFlag="&DN_True&""
if sx=1 Then
sql=sql&" order by id desc"
ElseIf sx=2 then
sql=sql&" order by ClickNumber desc,id desc"
Else
sql=sql&" order by TopFlag,id desc"
end If
rs.open sql,conn,1,1
if rs.eof Then
temptext=""&Tian11&""
else
iii=0
TempText="<table width=""100%""  border=""0"" cellspacing=""2"" cellpadding=""0"" class=""border2"">"
do while not rs.eof
If ISHTML = 1 Then
AutoLink = "../videoShow.Asp?ID="&rs("ID")&""
Else
AutoLink = "videoShow.Asp?ID="&rs("ID")&""
End if
i=i+1
IF iii Mod ls=0 Then TempText=TempText&"<tr height="""&hg&""">"

TempText=TempText&"<td "&bj&">"
if img=1 Then TempText=TempText&"<img src=""../images/icon_new.gif""> "
if gd=1 then
TempText=TempText&""&Jacking(Language,rs("TopFlag"))&""
end If

TempText=TempText&"<a href=""#"" ONCLICK=""window.open('"&AutoLink&"','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=730,height=650,left=400,top=50')"">"
if rs("titlecolor")<>"" And ys=1 Then
yss=rs("titlecolor")
Else
yss="000000"
End if
TempText=TempText&"<SPAN style=""color:#"&yss&";font-size="&zt&"px"">"&CutStr(rs("videoName"&Language&""),btw,"...")&"</SPAN></a>"
if tj=1 Then TempText=TempText&""&Jian(Language,rs("CommendFlag"))&""
IF hits=1 Then TempText=TempText&"<font color=""#999999"" >["&rs("ClickNumber")&"]</font>" 
If sj>0 Then TempText=TempText&"<td "&bj&" align=""right"">"
TempText=TempText&  " <font color=""#999999"" >"&FormatDate(rs("UpdateTime"),sj)&"</font>" 
If sj>0 Then TempText=TempText&  "</td>"
TempText=TempText&"</TD><td width=8>&nbsp;</td>"
	iii=iii+1
	IF iii Mod ls=0 then TempText=TempText&  "</tr>"
    if i>=s then exit do 
	Rs.movenext
	Loop	
	IF iii Mod ls<>0 then
	Do While not iii Mod ls=0
	TempText=TempText&  "<td></td>"
	iii=iii+1
	Loop
	TempText=TempText&  "</tr>"
	End If


TempText=TempText&  "</table>"
end If
rs.close
set rs=Nothing
videobt=TempText
end Function

'*************************************************
'标签名：WebContentvideo
'作  用：视频列表（图片）调用（有分页）
'参  数：依次：DataFrom数据库名称，id视频类别ID号，SortPath类别根据父类数字路径0为全部,lx栏目名称（0不显1显），tj推荐标志（0不显1显），gd固顶标志（0不显1显），ys标题颜色（0不显1显），btw标题长度（以字节计），tw图片宽度，th图片高度，s每行显示个数
'*************************************************
function WebContentvideo(DataFrom,ID,SortPath,lx,tj,gd,ys,btw,tw,th,s)
If SortPath=0 Then SortPath=""
  dim rs,sql
  dim HideSort
  set rs = server.createobject("adodb.recordset")
  if ID="" then
	SortPath="0,"
  elseif not IsNumeric(ID) Then   
    response.write"<center>"&Tian11&"</center>"	
	exit function
  elseif conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then   
    response.write"<center>"&Tian11&"</center>"	  
	exit function
  else
	SortPath=conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID)("SortPath")
	conn.execute("update "&DataFrom&" set ClickNumber=ClickNumber+1 Where ID="&ID)
  end if
  sql="select * from "&DataFrom&" Where not(ViewFlag"&Language&"="&DN_True&") and SortPath like '%"&SortPath&"%'"
  rs.open sql,conn,1,1
  while not rs.eof
	HideSort="and not(Instr(SortPath,'"&rs("SortPath")&"')>0) "&HideSort
    rs.movenext
  wend
  rs.close
  dim idCount
  dim pages
      pages=ProInfo'每页显示条数     
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  datafrom="TianTianCMS_video"
  dim datawhere
	  datawhere="where ViewFlag"&Language&"="&DN_True&" and SortPath like '%"&SortPath&"%' "&HideSort& " "
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by TopFlag,id desc "
  dim i
  sql="select count(ID) as idCount from ["& datafrom &"]" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
    sql="select id from ["& datafrom &"] " & datawhere & taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end if
  if(idcount>0 and sqlid<>"") Then
Response.Write "<table border=""0"" cellpadding=""0"" cellspacing=""0"" style=""margin-left:px"">"

    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1    
	dim thumbnailPath,Content,m
	i=0
	m=0
	do while not rs.eof
     AutoLink = "videoshow.Asp?ID="&rs("ID")&""
	thumbnailPath=HtmlSmallPic(rs("GroupID"),rs("thumbnail"),rs("Exclusive"))
	yss=rs("titlecolor")
	If ys=0 Then yss="000000"
	tjs=""
	If tj=1 Then tjs=Jian(Language,rs("CommendFlag"))	
	gds=""
	If gd=1 Then gds=Jacking(Language,rs("TopFlag"))
Response.Write "<td><li style='border:0px;margin-left:0px;float:left;width:"&tw+20&"px;'><table border ='0' cellpadding ='0' cellspacing='0'>"
Response.Write "<td width='5'></td>"
Response.Write "<td><table cellpadding='2' cellspacing='0'><tr><td style='border: 1px solid #ccc; width: "&tw+20&"px; height: "&th+10&"px; text-align: center;'>"
Response.Write "<a href=""#"" ONCLICK=""window.open('"&AutoLink&"','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=730,height=650,left=400,top=50')""><img src="""&thumbnailPath&""""

Response.Write "alt="&rs("videoName"&Language)&" border='0' width='"&tw&"' height='"&th&"' /></a></td>"

Response.Write "</tr><tr><td style='height: 28px; text-align: center'>"&VbCrLf
	If lx=1 Then Response.Write "["&conn.Execute("Select SortName"&Language&" From TianTianCMS_videoCategory Where SortPath='"&rs("SortPath")&"'")(0)&"]&nbsp;"&VbCrLf
Response.Write ""&gds&"<a href=""#"" ONCLICK=""window.open('"&AutoLink&"','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=730,height=650,left=400,top=50')""><SPAN style=""color:#"&yss&";"">"&CutStr(rs("videoName"&Language),btw,"...")&""

Response.Write "</SPAN></a>"&tjs&"</td></tr></table></td><td width='5'></td></table></li></td>"

i=i+1
m=m+1
If m=s then
Response.Write "</tr>"
m=0
End If
rs.movenext
if i>=ProInfo And ProInfo>0 then exit do
  loop
Response.Write "</ul></td></tr></table>"
  else    
    response.write"<center>"&Tian11&"</center>"
	exit function
  end If
  Response.Write "<div class=""clear""></div><div>"
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write ""&Tian01&"<strong style=""color:red"">"&idcount&"</strong>"&Tian02&" "&Tian03&"：<strong style=""color:red"">"&page&"</strong>/"&pagec&" "&Tian04&"：<strong style=""color:red"">"&pages&"</strong>"&Tian02&"" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  If ISHTML = 1 Then
  If ID = "" Then
  if(page>1) then response.write ("<a href="""&videoSortName&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  Else
  if(page>1) then response.write ("<a href="""&videoSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  Else
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmin>1) then response.write ("<a href="""&videoSortName&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  Else
  if(pagenmin>1) then response.write ("<a href="""&videoSortName&""&Separated&""&ID&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  Else
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title="""&Tian06&""& pageprevious &""&Tian07&"""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
	If ISHTML = 1 Then
	If ID = "" Then
		response.write ("[<a href="""&videoSortName&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	Else
		response.write ("[<a href="""&videoSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	End If
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	End If
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmax<pagec) then response.write (" <a href="""&videoSortName&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&videoSortName&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  Else
  if(pagenmax<pagec) then response.write (" <a href="""&videoSortName&""&Separated&""&ID&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&videoSortName&""&Separated&""&ID&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Else
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
  Response.Write "</div>"&VbCrLf
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：videotw
'作  用：视频图文展示调用（无分页）
'参  数：Language语言，Flag－调用类型0最新1推荐，Num－调用数量0为全部，ls－每行数量0不分行，gd－固顶显示0否1是，btw标题长度,ys标题颜色，tw－图片宽度，th－图片高度，w－区域宽度，h－区域高度
'*************************************************
function videotw(Language,Flag,Num,ls,gd,btw,ys,tw,th,w,h)
Dim i,m,temptext,thumbnailPath,videoName
temptext="<div align='center' style='overflow:hidden;height:"&h&"px;width:"&w&"px;'>"
temptext=temptext& "<table align='center' cellpadding='0' cellspace='0' border='0'>"
temptext=temptext& "<tr><td valign='top'><table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'><tr valign='top'>"
set rs = server.createobject("adodb.recordset") 
  sql="select * from TianTianCMS_video where ViewFlag"&Language&"="&DN_True&"" 
  If Flag=1 Then sql=sql+" and CommendFlag="&DN_True&""  
  sql=sql+" order by "
  If gd=1 Then sql=sql+"TopFlag,"
  If Flag=0 Then sql=sql+"UpdateTime desc,"
  sql=sql+"id desc"  
  rs.open sql,conn,1,1
  if rs.eof Then
  temptext=""&Tian11&""  
  else 
  i=0
  m=0
  do while not rs.eof
  videoName=CutStr(rs("videoName"&Language),btw,"...")
  If ys=1 Then videoName="<font color=""#"&rs("titlecolor")&""">"&CutStr(rs("videoName"&Language),btw,"...")&"</font>"
  AutoLink = "videoshow.Asp?ID="&rs("id")&""
thumbnailPath=HtmlSmallPic(rs("GroupID"),rs("thumbnail"),rs("Exclusive"))
temptext=temptext& "<td align='center'><table width=100% border=0 align=center cellpadding=0 cellspacing=0>"
temptext=temptext& "<tr><td valign=top width=3><img src='Images/bg_0ltop.gif' width=10 height=10 /></td>"
temptext=temptext& "<td background=images/bg_01.gif></td><td valign=top width=7><img src='Images/bg_0rtop.gif' width=10 height=10 />"
temptext=temptext& "</td><td width=1 rowspan=3 valign=top></td></tr><tr><td background='Images/bg_03.gif'>&nbsp;</td>"
temptext=temptext& "<td width="""&tw&""" height="""&th+5&""" align=""center"" bgcolor=""#ffffff"">"
temptext=temptext& "<a href=""#"" ONCLICK=""window.open('"&AutoLink&"','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=730,height=650,left=400,top=50')"">"
temptext=temptext& "<img src="""&thumbnailPath&""" alt="""&rs("videoName"&Language)&""" width="""&tw&""" height="""&th&""" border=""0"">"
temptext=temptext& "</a></td><td background='Images/bg_04.gif'>&nbsp;</td></tr><tr><td>"
temptext=temptext& "<img src='Images/bg_0lbottom.gif' width=10 height=10 /></td>"
temptext=temptext& "<td><img src='Images/bg_02.gif' width="""&tw&"""/></td><td><img src='Images/bg_0rbottom.gif' width=10 height=10 /></td>"
temptext=temptext& "</tr><tr><td colspan=3 align=center height=20 valign='top' style=""filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='Images/bg_05.gif', sizingMethod='scale')"">"
temptext=temptext& "<a href=""#"" ONCLICK=""window.open('"&AutoLink&"','Sample','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=730,height=650,left=400,top=50')"" style=""cursor:pointer; position:relative;"">"&videoName&"</a></td>"
temptext=temptext& "<td></td></tr></table></td>"
i=i+1
m=m+1
If m=ls And ls>0 then
temptext=temptext& "</tr>"
m=0
End If
rs.movenext
if i>=Num And Num>0 then exit do
  loop
temptext=temptext& "</tr></table></td><td valign=top></td></tr></table></div>" 
end If
rs.close
set rs=nothing
videotw=temptext
end Function
'=============================================视频END===============================================

'=============================================企业服务==================================================
'*************************************************
'标签名：WebMenuServices
'作  用：企业服务栏目显示调用(无级别收缩）
'参  数：依次：ParentID栏目ID号，i，level
'*************************************************
function WebMenuServices(ParentID,i,level)
  dim rs,sql
  set rs = server.createobject("adodb.recordset")
  sql="select * from TianTianCMS_ServicesCategory where ViewFlag"&Language&"="&DN_True&" and ParentID="&ParentID&" order by ID asc"
  rs.open sql,conn,1,1
  if conn.execute("select ID from TianTianCMS_ServicesCategory Where ViewFlag"&Language&"="&DN_True&" and ParentID=0").eof then
    response.write ""&Tian11&""
  end if
  do while not rs.eof
  	If ISHTML = 1 Then
		AutoLink = ""&OtherSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "ServicesList.asp?SortID="&rs("ID")&""
	End If
	if ParentID=0 Then
Response.Write "<tr><td height=""20""><div align=""center""><a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"
	Else
Response.Write "<tr><td height=""20""><div align=""center""><a href="""&AutoLink&""">"&rs("SortName"&Language)&"</a></div></td>"
Response.Write "</tr><TR><TD height=1 colspan=""2"" background=images/naSzarym.gif><IMG height=1 src=""images/1x1_pix.gif"" width=10>"
Response.Write "</TD></TR>"
   end if	 
    i=i+1
	if i<level then call WebMenuServices(rs("ID"),i,level)
	i=i-1
	rs.movenext
  loop 
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：FolderViewServices
'作  用：企业服务栏目显示调用(有级别收缩）
'参  数：
'*************************************************
Function FolderViewServices()
 FoldeServices(0)
End Function
Function FoldeServices(id)
  Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType,ViewFlag
  Dim listclass
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From TianTianCMS_ServicesCategory where ViewFlag"&Language&"="&DN_True&" and ParentID="&id&" order by id"
  rs.open sql,conn,1,1
  if id=0 and rs.recordcount=0 then
    response.write (""&Tian11&"!")
   exit function
  end if  
  i=1
  response.write("<table border='0' cellspacing='0' align='left' cellpadding='0'>")
  while not rs.eof
    ChildCount=conn.execute("select count(*) from TianTianCMS_ServicesCategory where ParentID="&rs("id"))(0)
    if ChildCount=0 then
	  if i=rs.recordcount then
	    FolderType="SortFileEnd"
	  else
	    FolderType="SortFile"
	  end if
	  FolderName=rs("SortName"&Language&"")&"&nbsp;"&ViewFlag
	  onMouseUp=""
	  listclass="list_c2"
    else
	  if i=rs.recordcount then
	 	FolderType="SortEndFolderOpen"
		ListType="SortEndListline"
		onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
		listclass="list_c1"
	  else
		FolderType="SortFolderOpen"
		ListType="SortListline"
		onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
		listclass="list_c1"
	  end if
	  FolderName=rs("SortName"&Language&"")&"&nbsp;"&ViewFlag
    end if
    response.write("<tr>")
If ISHTML = 1 Then
If Instr(LCase(GetUrl),"servicesshow.asp") Then
AutoLink = ""&OtherSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = "html/"&OtherSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
End if
Else
AutoLink = "ServicesList.asp?SortID="&rs("id")&""
End If
    response.write("<TD class="&listclass&" width=20 onMouseUp="&onMouseUp&">&nbsp;&nbsp;&nbsp;</TD><td nowrap id='b"&rs("id")&"' width=""116"" class='"&FolderType&"' onMouseUp="&onMouseUp&"><a href="""&AutoLink&""">"&FolderName&"</a>")
    response.write("</td></tr>")
	response.write("<tr>")
    response.write("<TD height=5></TD><td>")
    response.write("</td></tr>")
    if ChildCount>0 then%>
<tr id="a<%= rs("id")%>" style="display:none"><TD width=1>&nbsp;</TD><td class="<%= ListType%>" nowrap><% FoldeServices(rs("id")) %></td></tr>
    <%end if
    rs.movenext
    i=i+1
  wend
  response.write("</table>")
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：WebLocationServicesList
'作  用：企业服务列表页栏目隶属显示
'参  数：SortID栏目ID号
'*************************************************
function WebLocationServicesList(SortID)
If ISHTML =1 Then
	TempText="&nbsp;<a href=""../index."&HTMLName&""" class='top_m_txt01'>"&Tian09&"</a>&gt;&gt;<a href=""html/"&OtherSortName&"."&HTMLName&""" class='top_m_txt01'>"&Servicesm&"</a> "&VbCrLf
	Else
	TempText="&nbsp;<a href=""index.asp"" class='top_m_txt01'>"&Tian09&"</a>&gt;&gt;<a href=""ServicesList.asp"" class='top_m_txt01'>"&Servicesm&"</a> "&VbCrLf
	End if
  if SortID="" then
    TempText=TempText
  elseif not IsNumeric(SortID) then
    TempText=TempText&""&Tian13&""
  elseif conn.execute("select * from TianTianCMS_ServicesCategory Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then
    TempText=TempText&""&Tian13&""
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_ServicesCategory where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
    rs.open sql,conn,1,1
	TempText=TempText&SortPathTXTServices("TianTianCMS_ServicesCategory",rs("ID"))
    rs.close
    set rs=nothing
  end If
WebLocationServicesList=TempText
end Function

'*************************************************
'标签名：WebLocationServicesShow
'作  用：企业服务详细显示页栏目隶属显示
'参  数：SortID新闻ID号
'*************************************************
function WebLocationServicesShow(SortID)
If ISHTML =1 Then 
	 TempText="&nbsp;&nbsp;<a href=""../index.html"">"&Tian09&"</a>&gt;&gt; <a href=""html/"&OtherSortName&"."&HTMLName&""">"&Servicesm&"</a>"&VbCrLf	 
 Else
	 TempText="&nbsp;&nbsp;<a href=""index.asp"">"&Tian09&"</a>&gt;&gt; <a href=""ServicesList.asp"">"&Servicesm&"</a>"&VbCrLf	 
 End If  

  if SortID="" then
    TempText=TempText
  elseif not IsNumeric(SortID) then   
    TempText=TempText&""&Tian13&""	 
  elseif conn.execute("select * from TianTianCMS_Services Where ViewFlag"&Language&"="&DN_True&" and  ID="&SortID).eof then   
    TempText=TempText&""&Tian13&""	
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_Services where ViewFlag"&Language&"="&DN_True&" and ID="&SortID
    rs.open sql,conn,1,1
	TempText=TempText&SortPathTXTServices("TianTianCMS_ServicesCategory",rs("SortID"))
    rs.close
    set rs=nothing
  end If
  WebLocationServicesShow=TempText
end Function
'*************************************************
'标签名：SortPathTXTServices
'作  用：栏目隶属显示公共块
'参  数：DataFrom数据库名称，ID分类ID号
'*************************************************
function SortPathTXTServices(DataFrom,ID)
  dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From "&DataFrom&" where ViewFlag"&Language&"="&DN_True&" and ID="&ID
  rs.open sql,conn,1,1
  if not rs.eof Then
	If ISHTML = 1 Then
	    'If Instr(LCase(GetUrl),"servicesshow.asp") Then
		'AutoLink = "../"&OtherSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
		'Else
		AutoLink = ""&OtherSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
		'End if
	Else
		AutoLink = "ServicesList.asp?SortID="&rs("ID")&""
	End If
	SortPathTXTServices=SortPathTXTServices(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&"""><span style=""color:#EC0000"">"&rs("SortName"&Language)&"</span></a>"
  end if
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：WebContentServices
'作  用：企业服务标题显示（有分页）
'参  数：DataFrom数据表名,ID栏目一级ID号,SortPath父类数字路径0为全部,lx栏目名称（0不显1显），btw标题长度（以字节计），hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显），img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function WebContentServices(DataFrom,ID,SortPath,lx,btw,hg,xj,tj,gd,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
if xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
  dim rs,sql
  dim HideSort
  set rs = server.createobject("adodb.recordset")
  if ID="" then
	SortPath="0,"
  elseif not IsNumeric(ID) then
    response.write "<center>"&Tian11&"</center>"
	exit function
  elseif conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then
    response.write "<center>"&Tian11&"</center>"
	exit function
  else
	SortPath=conn.execute("select * from "&DataFrom&" Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID)("SortPath")
	conn.execute("update "&DataFrom&" set ClickNumber=ClickNumber+1 Where ID="&ID)
  end if
  sql="select * from "&DataFrom&" Where not(ViewFlag"&Language&"="&DN_True&") and SortPath like '%"&SortPath&"%'"
  rs.open sql,conn,1,1
  while not rs.eof
	HideSort="and not(Instr(SortPath,'"&rs("SortPath")&"')>0) "&HideSort
    rs.movenext
  wend
  rs.close
  dim idCount
  dim pages
      pages=OtherInfo     
  dim pagec
  dim page
      page=clng(request("Page"))
  dim pagenc
      pagenc=5
  dim pagenmax
  dim pagenmin
  dim pageprevious
  dim pagenext
  datafrom="TianTianCMS_Services"
  dim datawhere
	  datawhere="where ViewFlag"&Language&"="&DN_True&" and SortPath like '%"&SortPath&"%' "&HideSort& " "
  dim sqlid
  dim Myself,PATH_INFO,QUERY_STRING
      PATH_INFO = request.servervariables("PATH_INFO")
	  QUERY_STRING = request.ServerVariables("QUERY_STRING")'
      if QUERY_STRING = "" then
	    Myself = PATH_INFO & "?"
	  elseif Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")=0 then
	    Myself= PATH_INFO & "?" & QUERY_STRING & "&"
	  else
	    Myself = Left(PATH_INFO & "?" & QUERY_STRING,Instr(PATH_INFO & "?" & QUERY_STRING,"Page=")-1)
	  end if
  dim taxis
      taxis="order by TopFlag,id desc "
  dim i
  sql="select count(ID) as idCount from ["& datafrom &"]" & datawhere
  set rs=server.createobject("adodb.recordset")
  rs.open sql,conn,0,1
  idCount=rs("idCount")
  if(idcount>0) then
    if(idcount mod pages=0)then
	  pagec=int(idcount/pages)
   	else
      pagec=int(idcount/pages)+1
    end if
    sql="select id from ["& datafrom &"] " & datawhere & taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,1,1
    rs.pagesize = pages
    if page < 1 then page = 1
    if page > pagec then page = pagec
    if pagec > 0 then rs.absolutepage = page
    for i=1 to rs.pagesize
	  if rs.eof then exit for
	  if(i=1)then
	    sqlid=rs("id")
	  else
	    sqlid=sqlid &","&rs("id")
	  end if
	  rs.movenext
    next
  end if
  if(idcount>0 and sqlid<>"") then
    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1
	Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
	Response.Write "  <tr height=""26"">"&VbCrLf
	Response.Write "    <td width=""550"" style=""color:#000000; font-weight:bold; background:url(Images/split.gif) no-repeat right center; background-color:#ececec"">&nbsp;&nbsp;&nbsp;&nbsp;"&Tian17&"</td>"&VbCrLf
	Response.Write "    <td bgcolor=""#ececec"" style=""color:#000000; font-weight:bold"">&nbsp;&nbsp;"&Tian18&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
    while not rs.eof
	If ISHTML = 1 Then
		AutoLink = ""&OtherName&""&Separated&""&rs("ID")&"."&HTMLName&""
		AutoLink_a = ""&OtherSortName&""&Separated&""&conn.Execute("Select id From TianTianCMS_ServicesCategory Where SortPath='"&rs("SortPath")&"'")(0)&""&Separated&"1."&HTMLName&""
	Else
		AutoLink = "ServicesShow.Asp?ID="&rs("ID")&""
		AutoLink_a = "ServicesList.asp?SortID="&conn.Execute("Select id From TianTianCMS_ServicesCategory Where SortPath='"&rs("SortPath")&"'")(0)&""
	End If

	yss=rs("titlecolor")
	If ys=0 Then yss="000000"
	tjs=""
	If tj=1 Then tjs=Jian(Language,rs("CommendFlag"))	
	gds=""
	If gd=1 Then gds=Jacking(Language,rs("TopFlag"))
	hitss=""
    If hits=1 Then hitss="<font color=""#999999"" >["&rs("ClickNumber")&"]</font>"
	imgs=""
    If img=1 Then imgs="<img src=""../images/arrow_6.gif"" width=""11"" height=""11"" align=""absmiddle"" />"
	Response.Write "  <tr height="""&hg&""">"&VbCrLf
	Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom;"" "&bj&">&nbsp;"&imgs&"&nbsp;&nbsp;"&VbCrLf
	If lx=1 Then Response.Write "[<a href="""&AutoLink_a&""">"&conn.Execute("Select SortName"&Language&" From TianTianCMS_ServicesCategory Where SortPath='"&rs("SortPath")&"'")(0)&"</a>]&nbsp;&nbsp;"&VbCrLf	
	Response.Write ""&gds&"<a href="""&AutoLink&"""><SPAN style=""color:#"&yss&";"">"&CutStr(rs("OthersName"&Language),btw,"...")&"</SPAN></a>"&tjs&" "&hitss&"</td>"&VbCrLf
	Response.Write "    <td style=""background:url(Images/bg2.gif) repeat-x left bottom; color:#999999"" "&bj&">&nbsp;&nbsp;&nbsp;"&FormatDate(rs("Updatetime"),sj)&"</td>"&VbCrLf
	Response.Write "  </tr>"&VbCrLf
	rs.movenext
    wend
	Response.Write "</table>"&VbCrLf
  else
    response.write "<center>"&Tian11&"</center>"
	exit function
  end If
  Response.Write "<table width=""98%"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
  Response.Write "  <tr height=""35"">"&VbCrLf
  Response.Write "    <td align=""center"">"&VbCrLf
  Response.Write ""&Tian01&"<strong style=""color:red"">"&idcount&"</strong>"&Tian02&" "&Tian03&"：<strong style=""color:red"">"&page&"</strong>/"&pagec&" "&Tian04&"：<strong style=""color:red"">"&pages&"</strong>"&Tian02&"" & vbCrLf
  pagenmin=page-pagenc
  pagenmax=page+pagenc
  if(pagenmin<1) then pagenmin=1
  If ISHTML = 1 Then
  If ID = "" Then
  if(page>1) then response.write ("<a href="""&OtherSortName&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  Else
  if(page>1) then response.write ("<a href="""&OtherSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&""" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  Else
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title="""&Tian05&"""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  if page-(pagenc*2+1)<=0 then
	pageprevious=1
  else
	pageprevious=page-(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmin>1) then response.write ("<a href="""&OtherSortName&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &"页""><font face=""webdings"" color=""#000000"">3</font></a> ")
  Else
  if(pagenmin>1) then response.write ("<a href="""&OtherSortName&""&Separated&""&ID&""&Separated&""&pageprevious&"."&HTMLName&""" title="""&Tian06&""& pageprevious &"页""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  Else
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title="""&Tian06&""& pageprevious &"页""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  if(pagenmax>pagec) then pagenmax=pagec
  for i = pagenmin to pagenmax
	if(i=page) then
	  response.write ("&nbsp;<strong style=""color:red"">"& i &"</strong>&nbsp;")
	Else
	If ISHTML = 1 Then
	If ID = "" Then
		response.write ("[<a href="""&OtherSortName&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	Else
		response.write ("[<a href="""&OtherSortName&""&Separated&""&ID&""&Separated&""&i&"."&HTMLName&""">"& i &"</a>]")
	End If
	Else
		response.write ("[<a href="""& myself &"Page="&i&""">"& i &"</a>]")
	End If
	end if
  next
  if page+(pagenc*2+1)>=pagec then
    pagenext=pagec
  else
    pagenext=page+(pagenc*2+1)
  end If
  If ISHTML = 1 Then
  If ID = "" Then
  if(pagenmax<pagec) then response.write (" <a href="""&OtherSortName&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&OtherSortName&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  Else
  if(pagenmax<pagec) then response.write (" <a href="""&OtherSortName&""&Separated&""&ID&""&Separated&""&pagenext&"."&HTMLName&""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&OtherSortName&""&Separated&""&ID&""&Separated&""&pagec&"."&HTMLName&""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Else
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title="""&Tian08&""&pagenext&""&Tian07&"""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title="""&Tian08&""&pagec&""&Tian07&"""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Response.Write "    </td>"&VbCrLf
  Response.Write "  </tr>"&VbCrLf
  Response.Write "</table>"&VbCrLf
  rs.close
  set rs=nothing
end Function

'*************************************************
'标签名：Services
'作  用：企业服务标题显示调用（无分页）
'参  数：依次：SortPath类别根据父类数字路径0为全部，sx属性（1推荐、2热门），s显示条数，ls列数，btw标题长度（以字节计），zt字号，hg行高，xj信笺背景0不显1显，tj推荐标志（0不显1显），gd固顶标志（0不显1显）,img标题前缀图标0不显示1显示，sj时间0不显大于按序号1显，ys标题颜色（0不显1显），hits点击数（0不显1显）
'*************************************************
function Services(SortPath,sx,s,ls,btw,zt,hg,xj,tj,gd,img,sj,ys,hits)
If SortPath=0 Then SortPath=""
dim rs,sql,t,TempText,g,iii,i,yss,bCh,bj,datawhere
t=0
bj=""
If xj=1 Then bj="style='BORDER-bottom: #999999 1px dotted'"
if SortPath<>"" then
datawhere=" and SortPath like '%"&SortPath&"%'"
 else
datawhere=""
end if
set rs=server.createobject("ADODB.recordset")
sql = "select * from TianTianCMS_Services where ViewFlag"&Language&"="&DN_True&""&datawhere&""
if sx=1 Then sql=sql&" and CommendFlag="&DN_True&""
if sx=1 Then
sql=sql&" order by id desc"
ElseIf sx=2 then
sql=sql&" order by ClickNumber desc,id desc"
Else
sql=sql&" order by TopFlag,id desc"
end If

rs.open sql,conn,1,1
if rs.eof Then
temptext=""&Tian11&""
else
iii=0
TempText="<table width=""100%""  border=""0"" cellspacing=""2"" cellpadding=""0"">"
do while not rs.eof
			If ISHTML = 1 Then
			    If Instr(LCase(GetUrl),"label.asp") Or Instr(LCase(GetUrl),"index.asp") Then
				AutoLink = "html/"&OtherName&""&Separated&""&rs("ID")&"."&HTMLName&""
				Else
				AutoLink = ""&OtherName&""&Separated&""&rs("ID")&"."&HTMLName&""
				End if
			Else
				AutoLink = "ServicesShow.Asp?ID="&rs("ID")&""
			End If
i=i+1
IF iii Mod ls=0 Then TempText=TempText&"<tr height="""&hg&""">"
TempText=TempText&"<td "&bj&">"
if img=1 Then TempText=TempText&"<img src=""../images/icon_new.gif""> "
if gd=1 then
TempText=TempText&""&Jacking(Language,rs("TopFlag"))&""
end If
TempText=TempText&"<a target=""_blank"" href="""&AutoLink&""" title="&rs("OthersName"&Language)&">"
if rs("titlecolor")<>"" And ys=1 Then
yss=rs("titlecolor")
Else
yss="000000"
End if
TempText=TempText&"<SPAN style=""color:#"&yss&";font-size="&zt&"px"">"&CutStr(rs("OthersName"&Language&""),btw,"...")&"</SPAN></a>"
TempText=TempText&"</a>"
if tj=1 Then TempText=TempText&""&Jian(Language,rs("CommendFlag"))&""
IF hits=1 Then TempText=TempText&"<font color=""#999999"" >["&rs("ClickNumber")&"]</font>" 
If sj>0 Then TempText=TempText&"<td "&bj&" align=""right"">"
TempText=TempText&  " <font color=""#999999"" >"&FormatDate(rs("UpdateTime"),sj)&"</font>" 
If sj>0 Then TempText=TempText&  "</td>"
TempText=TempText&"</TD><td width=8>&nbsp;</td>"
	iii=iii+1
	IF iii Mod ls=0 then TempText=TempText&  "</tr>"
    if i>=s then exit do 
	Rs.movenext
	Loop	
	IF iii Mod ls<>0 then
	Do While not iii Mod ls=0
	TempText=TempText&  "<td></td>"
	iii=iii+1
	Loop
	TempText=TempText&  "</tr>"
	End IF
	TempText=TempText&  "</table>"	
end if
rs.close
set rs=Nothing
Services=TempText
end Function

'*************************************************
'标签名：ContentServices
'作  用：企业服务详细显示
'参  数：依次：id新闻ID号，btzt标题字号，btc标题颜色，sj时间格式（0－15），zt正文字号
'*************************************************
Function ContentServices(id,btzt,btc,sj,zt)  
  if ID="" or not IsNumeric(ID) then
   TempText= "<center>"&Tian11&"</center>"
  elseif conn.execute("select * from TianTianCMS_Services Where ViewFlag"&Language&"="&DN_True&" and  ID="&ID).eof then
  TempText= "<center>"&Tian11&"</center>"
  else
	dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from TianTianCMS_Services where ViewFlag"&Language&"="&DN_True&" and ID="&ID
    rs.open sql,conn,1,3
	If btc=1 Then btc=rs("titlecolor")
	TempText=TempText&"<tr align=""center""><td width=""960"" align=""center"" style=""color:#"&btc&"; font-size:"&btzt&"px; font-weight:bold"" colspan=""2"">"&VbCrLf
	TempText=TempText& "<center>"&rs("OthersName"&Language)&"</center>"&VbCrLf
  End If
TempText=TempText& "</td>"&VbCrLf
If rs("CommendFlag")=True then TempText=TempText& "<td><span style=""position:absolute; height:0px; width:0px;""><img style=""position:absolute; left:-140px; top:-50px;"" src=""images/tuijian.gif"" alt=""本站推荐"" align=""absmiddle"" /></span></td></tr>"&VbCrLf
if ViewNoRight(rs("GroupID"),rs("Exclusive")) Then

TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "<td width=""200"" height=""30"" class="""" style='border-top: 1 solid #666666;border-bottom: 1 solid #666666'>"&Tian30&"：<a href=""javascript:doZoom("&zt+6&")"">"&Tian31&"</a> <a href=""javascript:doZoom("&zt+4&")"">"&Tian32&"</a> <a href=""javascript:doZoom("&zt+2&")"">"&Tian33&"</a></td>"&VbCrLf
TempText=TempText& "<td width=""75%"" align=""center"" class=""top_m_txt01"" style='border-top: 1 solid #666666;border-bottom: 1 solid #666666'>"&VbCrLf
TempText=TempText& ""&Tian72&":"&rs("Author"&Language)&" &nbsp;&nbsp;"&Tian73&":"&rs("source"&Language)&"&nbsp;&nbsp;"&Tian34&":<script language=""javascript"" src=""HitCount.asp?id="&rs("ID")&"&LX=TianTianCMS_Services""></script><script language=""javascript"" src=""HitCount.asp?action=count&LX=TianTianCMS_Services&id="&rs("ID")&"""></script>"&Tian35&"&nbsp;&nbsp;"&FormatDate(rs("UpdateTime"),sj)&"</center> </td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td height=""20"">&nbsp;</td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td style=""line-height:25px; font-size:"&zt&"pt; padding-left: 8px; padding-right: 8px""  colspan=""3""><div style=""FLOAT: left; widht: 280""><script src=""../ads/JS/Inside3.js""></script></div><span id=""zoom"">"&rs("Content"&Language)&"</span></td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
Else
TempText=TempText& "        <tr>"&VbCrLf
TempText=TempText& "          <td align=""center""><img src=""Images/NoRight.jpg""></td>"&VbCrLf
TempText=TempText& "        </tr>"&VbCrLf
end if
rs.update
rs.close
set rs=Nothing
ContentServices=TempText
end Function
%>