<!--#include file="Include/Const.asp" -->
<!--#include file="Include/NoHackSql.Asp" -->
<!--#include file="Include/ConnSiteData.asp" -->
<%
headid=1
call SiteInfo
if ISHTML = 1 then
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
End If
if request.QueryString("SortID")="" then
SeoTitle="公司产品"
elseif not IsNumeric(request.QueryString("SortID")) then
SeoTitle="参数错误"
elseif conn.execute("select * from LiangJing_ProductSort Where ViewFlag and  ID="&request.QueryString("SortID")).eof then
SeoTitle="参数错误"
else
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJing_ProductSort where ViewFlag and ID="&request.QueryString("SortID")
rs.open sql,conn,1,1
SeoTitle=rs("SortName")
rs.close
set rs=nothing
end if
%>

<!--#include file="Head.Asp" -->
<style>

<style>
body
{
font-size:12px;
}
a{text-decoration:none;cursor:pointer;}
a:hover{text-decoration:underline;}
li{list-style-type:none;}
ul,li,ol,p,div,span,img,label,select,tr,td,h1,h3{border:0px;margin:0px;padding:0px;}
.periodbox{width:560px;margin:0 auto;margin-top:20px;}
.periodbox ul li{width:600px;margin-top:10px;padding-bottom:20px;padding:0px 0px 5px 0px;border-bottom:1px dashed #cbcbc9;}

.periodleft{float:left;width:280px;margin-right:20px;padding-top:5px;display:inline;}
.periodright{float:left;width:280px;padding-top:5px;}
.periodtext{line-height:24px;}
.periodbg{float:left;width:167px;height:128px;background:url(images/period_bg.jpg) no-repeat;position:relative;}
.periodimg{width:160px;height:122px;margin-top:4px;margin-left:4px;margin-bottom:4px;text-align:top;}
.periodicon{width:105px;height:105px;position:absolute;top:36px;left:72px;}
.periodlist{float:left;width:96px;margin-left:10px;display:inline;}
.periodgray{color:#3c3c3c;text-decoration:line-through;font-weight:bold;}
.group_thirteen{font-size:13px;color:#3c3c3c;}
.group_rourteen{font-size:14px;color:#7e5e2f;}

.periodright b
{
font-size:12px;
font-weight:bold;
color:#ff6105;
}
.periodleft b
{
font-size:12px;
font-weight:bold;
color:#ff6105;
}
#bestsss
{
	margin-top: 4px;
	overflow: hidden;

}





</style>

<div id='index_wrapper'>
<div style="clear:both;background-image:url('images/mybuzhou.jpg');width:800px;height:85px;margin-bottom:10px;" id="mySitep">
<div style="height:20px;margin-bottom:26px;text-align:right;" ><div onclick="stepcoclose()" style="width:20px;height:20px;cursor:pointer;float:right">&nbsp;</div></div>
<div style="clear:both;font-size:14px;font-weight:bold;color:#5A552B;">
<div style="width:100px;float:left;">&nbsp;</div>
<div style="width:200px;float:left;">查看今日团购价</div>
<div style="width:36px;float:left;">&nbsp;</div>
<div style="width:200px;float:left;">付款并获得优惠凭证码</div>
<div style="width:66px;float:left;">&nbsp;</div>
<div style="width:180px;float:left;">凭优惠凭证码享受超级折扣</div>
</div>
</div>
<div id=best-r class="best" style="width:586px;float:left">
<div id=best-sc>
<div class=best-tb>
<a style="width:80px">当前位置：</a>
<%=WebLocation%>
    
</div>
</div>
<div id=bestsss>

<table cellspacing="0" cellpadding="0" width="100%px" align="center" bgcolor="#ffffff" border="0" style="margin:0px;padding;0px">
    <tbody>
        <tr>
           <td>
<%=WebContent("LiangJing_ProductSort",request.QueryString("SortID"),"")%>

            </td>
        </tr>
    </tbody>
</table>
</div>
</div>

<div style="width:200px; float:right;">
<div id=best-r class="best" style="width:200px; float:right;">
<div id=best-sc>
<div class=best-tb>
<a style="width:80px;font-size:14px;font-weight:bold;">团购资讯</a>  
<span id="sishowsitep" onclick="stepcoclose1()" style="display:none;padding-top:7px;padding-left:6px;"><font style="color:red;">查看步骤</font></span>
</div>
</div>
<div id=bests>
<table cellpadding="0" cellspacing="0" width="100%px">
<tr><td>
<%Call News("0,1,",6)%>
</td></tr>
</table>
</div>
</div>
<div id=best-r class="best" style="width:200px; float:right;margin-top:10px;">
<div id=best-sc>
<div class=best-tb>
<a style="width:80px;font-size:14px;font-weight:bold;">信息订阅</a>       
</div>
</div>

<div id=bests>
<table cellpadding="0" cellspacing="0" width="100%px" style="padding:6px;">
<tr><td align="center">
<% Call LiangjingCMSEMail() %>
</td></tr>
</table>

</div>
</div>
</div>
<div style="clear:both;;*display:inline;overflow:;hidden;">
</div>
<div style="float:none;height:10px;"></div>
</div></div>
</div></div>
<!--#include file="Foot.Asp"-->
<%


function News(SortPath,number)
  dim rs,sql,NewsName,NewFlag
  set rs = server.createobject("adodb.recordset")
  sql="select top "&number&" * from LiangJing_News where ViewFlag"&" and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
  rs.open sql,conn,1,1
  if rs.eof then
 Response.Write"<ul style=""width:180px;""><li class=""newslist"">暂无相关信息</li></ul>"
  Else
Dim i
i=1
Response.Write "<ul style=""width:180px;"">"
 do while not rs.eof
	  if now()-rs("AddTime")<=2 then 
	    NewsName=StrLeft(rs("NewsName"),20)
	    NewFlag=" <img src=""Images/new.gif"" align=""absmiddle"">"
	  else
	    NewsName=StrLeft(rs("NewsName"),20)
	    NewFlag=""
	  end If
		If ISHTML = 1 Then
			AutoLink = ""&NewName&""&Separated&""&rs("ID")&"."&HTMLName&""
		Else
			AutoLink = "NewsView.asp?ID="&rs("id")&""
		End If
  Response.Write"<li style=""font-size:14px;text-align:left;width:160px;height:18px""><img src='images/"&i&".jpg'/><a href="""&AutoLink&""" target=""_self"" style=""font-size:13px"">"&NewsName&"</a></li>"
      rs.movenext
	  i=i+1
    loop 
  end If
  Response.Write "</ul>"
  rs.close
  set rs=nothing
end Function


function LiangjingCMSEMail()

       Response.Write "         <form action="""" method=""post"" name=""LiangjingCMSEmail"">"&VbCrLf
       Response.Write "      <div class=""mail_list_box_input_position"">"&VbCrLf
       Response.Write "          <input type=""text"" name=""LiangjingCMSSubscribe"" class=""mail_list_input"" onblur=""this.className='LiangjingCMSSubscribe';if(this.value==''){this.value='请输入您的Email地址';}"" onfocus=""this.className='LiangjingCMSSubscribe';this.focus();if(this.value=='请输入您的Email地址'){this.value='';}"" value=""请输入您的Email地址"" />"&VbCrLf
       Response.Write "        </div>"&VbCrLf
       Response.Write "        <div class=""mail_list_box_bt_position""><br /><span>"&VbCrLf
       Response.Write "   <input type=""image"" name=""Subscribe"" src=""images/bt_mail_list_01.png"" onclick=""document.LiangjingCMSEmail.action='Subscribe.Asp?Action=Add'"" />"&VbCrLf
       Response.Write "          </span>"&VbCrLf
       Response.Write "<span><input type=""image"" name=""Unsubscribe"" src=""images/tuiding_mail_list_01.png""  value=""退订"" onclick=""document.LiangjingCMSEmail.action='Subscribe.Asp?Action=Del'"" />"&VbCrLf
       Response.Write "          </span>"&VbCrLf
	   Response.Write "  	<div style=""height:6px;""></div> </div>"&VbCrLf
       Response.Write "       <div class=""clear""></div>"&VbCrLf
       Response.Write "      </form>"&VbCrLf
end Function


'最新产品展示
Function ListProducts(SortPath,trs,tds,PicW,PicH,Oderder)
  dim rs,sql,tr,td,ProductName,SmallPicPath
  set rs = server.createobject("adodb.recordset")
  If Oderder="Products" Then
  sql="select top "&trs*tds&" * from liangjing_Products where Instr(SortPath,'"&SortPath&"')>0 and [AddTime] between dateadd('ww',-1,now()) and now() order by AddTime desc"
  Else 
  sql="select top "&trs*tds&" * from liangjing_Products where NewFlag  and Instr(SortPath,'"&SortPath&"')>0 order by "&Oderder&" desc,id desc"
  End If 
  rs.open sql,conn,1,1
  if rs.eof then
    response.write "暂无相关信息"
  Else
	for tr=1 to trs
        for td=1 to tds
	      if StrLen(rs("ProductName"))<=18 then
            ProductName=rs("ProductName")
	      else
	        ProductName=rs("ProductName")
	      end If
			If ISHTML = 1 Then
				AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
			Else
				AutoLink = "ProductView.asp?ID="&rs("id")&""
			End If
			SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
		ChildCount=conn.execute("select count(*) from liangjing_Order where IsokMoney=true and ProductNo='"&rs("ProductNo")&"'")(0)
Response.Write "<tr><td align=""center"">"
Response.Write " <div id=""mian_border"">"
Response.Write "<div id=""mian_border_title""><a href="""&AutoLink&""">"&ProductName&"</a></div>"
Response.Write "<div id=""mian_border_1""><a href="""&AutoLink&""" target=""_blank"">"
Response.Write "<img src="""&SmallPicPath&""" alt="""" width="""&PicW&""" height="""&PicH&""" border=""0""></a></div>"
Response.Write "<div class=""Pricelist"">现价:<font style=""color:red;"">￥"&rs("N_Price")-rs("P_Price")&"</font>原价:￥"&rs("N_Price")&" <br/>节省:￥"&rs("P_Price")&"</div>"
Response.Write "<div><font style=""color:red;font-size:16px;"">"&ChildCount&"</font>人已订购 <a href="""&AutoLink&"""><img src=""images/dinggou.jpg"" width=""75px"" height=""25px""></a></div>"
Response.Write "</div>"
Response.Write " </td></tr>"
	      rs.movenext
		  if rs.eof then exit for
		Next
		if rs.eof then exit for
	Next
  end if
  rs.close
  set rs=nothing
End Function




function WebLocation()
  WebLocation="<a href=""index.asp"" class=""agray"">首页</a><a href=""ProductList.asp"" class=""agray"">以往团购</a>"&VbCrLf
  if request.QueryString("SortID")="" then
    WebLocation=WebLocation
  elseif not IsNumeric(request.QueryString("SortID")) then
    WebLocation=WebLocation&"参数错误"
  elseif conn.execute("select * from LiangJing_ProductSort Where ViewFlag and  ID="&request.QueryString("SortID")).eof then
    WebLocation=WebLocation&"参数错误"
  else
    dim rs,sql
    set rs = server.createobject("adodb.recordset")
	sql="select * from LiangJing_ProductSort where ViewFlag and ID="&request.QueryString("SortID")
    rs.open sql,conn,1,1
	WebLocation=WebLocation&SortPathTXT("LiangJing_ProductSort",rs("ID"))
    rs.close
    set rs=nothing
  end if
end Function

function SortPathTXT(DataFrom,ID)
  dim rs,sql
  Set rs=server.CreateObject("adodb.recordset")
  sql="Select * From "&DataFrom&" where ViewFlag 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 = "ProductClass-"&rs("ID")&"-1.html"
	End If
	SortPathTXT=SortPathTXT(DataFrom,rs("ParentID"))&" - <a href="""&AutoLink&""">"&rs("SortName")&"</a>"
  end if
  rs.close
  set rs=nothing
end function

function WebContent(DataFrom,ID,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>暂无相关信息</center>"
	exit function
  elseif conn.execute("select * from "&DataFrom&" Where ViewFlag and  ID="&ID).eof then
    response.write "<center>暂无相关信息</center>"
	exit function
  else
	SortPath=conn.execute("select * from "&DataFrom&" Where ViewFlag and  ID="&ID)("SortPath")
	conn.execute("update "&DataFrom&" set ClickNumber=ClickNumber+1 Where ID="&ID)
  end if
  sql="select * from "&DataFrom&" Where not(ViewFlag) and Instr(SortPath,'"&SortPath&"')>0"
  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="LiangJing_Products"
  dim datawhere
	  datawhere="where ViewFlag and Instr(SortPath,'"&SortPath&"')>0 "&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 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 "<div class=""periodbox"" style=""width:580px;margin:0 auto;margin-top:0px;""><ul>" 
    sql="select * from ["& datafrom &"] where id in("& sqlid &") "&taxis
    set rs=server.createobject("adodb.recordset")
    rs.open sql,conn,0,1
    dim tr,td
	dim ProductName,SmallPicPath,Content,hh
	hh=1
	for tr=1 to ProInfo/2
	Response.Write "<li style=""width:580px;margin-top:0px;padding-bottom:20px;padding:0px 0px 5px 0px;border-bottom:1px dashed #cbcbc9;clear:both;"">"
        for td=1 to 2
	      if StrLen(rs("SeoDescription"))<=18 then
            ProductName=rs("SeoDescription")
	      else
	        ProductName=StrLeft(rs("SeoDescription"),60)
	      end If
			If ISHTML = 1 Then
				AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
			Else
				AutoLink = "ProductView.asp?ID="&rs("ID")&""
			End If
			SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
ChildCount=conn.execute("select count(*) from liangjing_Order where IsokMoney=true and ProductNo='"&rs("ProductNo")&"'")(0)
 If IsDate(rs("EndTime")) Then 
  yy = CStr(Year(rs("EndTime")))
  y = Mid(CStr(Year(rs("EndTime"))),3)
  m = CStr(Month(rs("EndTime")))
  If Len(m) = 1 Then m = "0" & m
  d = CStr(Day(rs("EndTime")))
  If Len(d) = 1 Then d = "0" & d
  h = CStr(Hour(rs("EndTime")))
  If Len(h) = 1 Then h = "0" & h
  mi = CStr(Minute(rs("EndTime")))
  If Len(mi) = 1 Then mi = "0" & mi
  s = CStr(Second(rs("EndTime")))
  If Len(s) = 1 Then s = "0" & s
End If 
If hh Mod 2=0 Then 
Response.Write "<div class=""periodright"">"&VbCrLf
Else 
Response.Write "<div class=""periodleft"">"&VbCrLf
End If 
Response.Write "<p class=""periodtext group_thirteen""><b>"&yy&"年"&m&"月"&d&"日</b></p>"&VbCrLf
Response.Write "<p class=""periodtext group_thirteen""><a href="""&AutoLink&""" title="""&rs("SeoDescription")&""">"&ProductName&"</a></p>"&VbCrLf
Response.Write "<div class=""periodbg"">"&VbCrLf
Response.Write "<a href="""&AutoLink&""">"&VbCrLf
Response.Write "<img class=""periodimg"" src="""&SmallPicPath&""" />"&VbCrLf
Response.Write "<p class=""periodicon"">"&VbCrLf
If CInt(rs("Stock"))<0 Or CInt(rs("Stock"))=0 Then 
Response.Write "<img src=""images/icon_17.gif"" />"&VbCrLf
Else 
If CDate(rs("EndTime"))<Now() Then 
Response.Write "<img src=""images/icon_18.gif"" />"&VbCrLf
Else
Response.Write "<img src=""images/icon_19.gif"" />"&VbCrLf
End If 
End If 
Response.Write "</p></a>"&VbCrLf
Response.Write "</div>"&VbCrLf
Response.Write "<div class=""periodlist"">"&VbCrLf
Response.Write "<p class=""periodtext group_fontnine""><span class=""group_fonteight""><b>"&ChildCount&"</b></span>人购买</p>"&VbCrLf
Response.Write "<p class=""graytext group_fontnine"">原价：<span class=""periodgray""><b>"&rs("N_Price")&"￥</b></span></p>"&VbCrLf
Response.Write "<p class=""periodtext group_fontnine"">折扣：<span><b>"&rs("K_Price")&"折</b></span></p>"&VbCrLf
Response.Write "<p class=""periodtext group_fontnine"">现价：<span><b>"&Formatnumber(rs("P_Price"),2,-1,-1,0)&"￥</b></span></p>"&VbCrLf
Response.Write "<p class=""periodtext group_fontnine"">节省：<span><b>"&Formatnumber(rs("N_Price")-rs("P_Price"),2,-1,-1,0)&"</b></span></p>"&VbCrLf
Response.Write "</div>"&VbCrLf
Response.Write "<p class=""clear""></p>"&VbCrLf
Response.Write "</div>"&VbCrLf
hh=hh+1
	      rs.movenext
		  if rs.eof then exit for
		Next
	Response.Write "</li>"
		if rs.eof then exit for
	  Next
	  Response.Write "</ul></div>"
  else
    response.write "<center>暂无相关信息</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 "共<strong style=""color:red"">"&idcount&"</strong>条记录 页次：<strong style=""color:red"">"&page&"</strong>/"&pagec&" 每页：<strong style=""color:red"">"&pages&"</strong>条记录" & 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=""回到第一页""><font face=""webdings"" color=""#000000"">9</font></a> ")
  Else
  if(page>1) then response.write ("<a href="""&ProSortName&""&Separated&""&ID&""&Separated&"1."&HTMLName&""" title=""回到第一页""><font face=""webdings"" color=""#000000"">9</font></a> ")
  End If
  Else
  if(page>1) then response.write ("<a href="""& myself &"Page=1"" title=""回到第一页""><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=""第"& pageprevious &"页""><font face=""webdings"" color=""#000000"">3</font></a> ")
  Else
  if(pagenmin>1) then response.write ("<a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pageprevious&"."&HTMLName&""" title=""第"& pageprevious &"页""><font face=""webdings"" color=""#000000"">3</font></a> ")
  End If
  Else
  if(pagenmin>1) then response.write ("<a href="""& myself &"Page="& pageprevious &""" title=""第"& 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="""&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=""跳转到第"&pagenext&"页""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&pagec&"."&HTMLName&""" title=""跳转到第"&pagec&"页""><font face=""webdings"" color=""#000000"">:</font></a>")
  Else
  if(pagenmax<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pagenext&"."&HTMLName&""" title=""跳转到第"&pagenext&"页""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""&ProSortName&""&Separated&""&ID&""&Separated&""&pagec&"."&HTMLName&""" title=""跳转到第"&pagec&"页""><font face=""webdings"" color=""#000000"">:</font></a>")
  End If
  Else
  if(pagenmax<pagec) then response.write (" <a href="""& myself &"Page="& pagenext &""" title=""跳转到第"&pagenext&"页""><font face=""webdings"" color=""#999999"">:</font></a> ")
  if(page<pagec) then response.write (" <a href="""& myself &"Page="& pagec &""" title=""跳转到第"&pagec&"页""><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
%>