<script language="JavaScript">
<!--
function demo(Page,scrl){
if (false)window.close();
 if  (!window.win || win.closed)  
 {
 win=open(Page,"gouwu","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=2,width=450,height=350,scrollbars="+scrl+",resizable=1");
 }
 else{
  win.close();
  win=open(Page,"gouwu","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,top=2,width=450,height=350,scrollbars="+scrl+",resizable=1");
  } 
}
//-->
</script>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td align="center"> 
      <%set rs=server.CreateObject("adodb.recordset")
		  rs.open "select Top 8 * from shop_books where newsbook=1 order by bookid desc",conn,1,1
		  if rs.eof and rs.bof then
		  response.write "<center><br><font color=red size=2>对不起，暂无新品！</font></font>"
		  'response.End
		  else
		  %>

      <table cellspacing=0 cellpadding=0 border=0 width="100%">
        <%
							  dim i_1,i_count
							  i_1=int((rs.recordcount+1)/2)
							  if i_1>5 then 
							  	i_1=5
							  end if
							  'response.write i_1
							  for i_count=1 to i_1%>
        <tr> 
          <td valign=top width="300"> 
            <table cellspacing=0 cellpadding=0 width="100%">
              <tr> 
                <td valign=top width="41%" style="PADDING-LEFT: 6px"><br>
                  <%if rs("bookpic")="" then 
	response.write "<div align=center><a href=list.asp?id="&rs("bookid")&" target=_blank><img src=images/emptybook.gif width=75 height=75 border=0></a></div>"
	else%>
                  <div align="center"><a href=list.asp?id=<%=rs("bookid")%> target=_blank><img src="<%=trim(rs("bookpic"))%>"  width=75 border=0 height="75" alt="<%=trim(rs("bookname"))%>"></a> 
                    <%end if%>
                  </div>
                </td>
                <td valign=top width="59%"><a class=a4 
                        href=list.asp?id=<%=rs("bookid")%> target=_blank><font color=#FF6600><br>
                  &nbsp;</font></a><a href=list.asp?id=<%=rs("bookid")%> target=_blank> 
                  <font color="#800000"> <u><strong> 
                  <%if len(trim(rs("bookname")))>7 then
	response.write left(trim(rs("bookname")),7)&".."
	else
	response.write trim(rs("bookname"))
	end if%>
                  </strong></u> </font> </a><br>
                  &nbsp;市场价：<s><%=formatnumber(rs("shichangjia"),2)&"元"%></s><br>
                  &nbsp;会员价：<font color=#FF0000><%=formatnumber(rs("huiyuanjia"),2)&"元"%></font><br>
                  &nbsp;VIP 价：<font color=#FF0000><strong><%=formatnumber(rs("Vipjia"),2)&"元"%></strong></font><br>
                  <font color="#999999">&nbsp; </font> 
                  <table cellpadding=0 cellspacing=0>
                    <tbody> 
                    <tr> 
                      <td>&nbsp;<a href="javascript:demo('gouwu.asp?id=<%=rs("bookid")%>&action=add');"><img src="images/goumai.gif" width="43" height="12" border=0></a><a href="javascript:;" onClick="javascript:window.open('shoucang.asp?id=<%=rs("bookid")%>&action=add','shouchang','width=450,height=350,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><img src="images/shoucang1.gif" width="49" height="13" border=0></a></td>
                    </tr>
                    </tbody> 
                  </table>
                </td>
              </tr>
              <tr align="right"> 
                <td valign=top colspan="2" style="PADDING-LEFT: 6px"><font color="#999999">&nbsp; 
                  </font> <font color="#999999"> 
                  <%rs.movenext%>
                  </font></td>
              </tr>
            </table>
          </td>
          <td valign=top width="1" background="images/bj_x1.gif"></td>
          <td valign=top width="300"> 
            <%if rs.eof then%>
            &nbsp; 
            <%else%>
            <table cellspacing=0 cellpadding=0 width="100%">
              <tr> 
                <td valign=top width="41%" style="PADDING-LEFT: 6px"><br>
                  <%if rs("bookpic")="" then 
	response.write "<div align=center><a href=list.asp?id="&rs("bookid")&" target=_blank><img src=images/emptybook.gif width=75 height=75 border=0></a></div>"
	else%>
                  <div align="center"><a href=list.asp?id=<%=rs("bookid")%> target=_blank><img src="<%=trim(rs("bookpic"))%>"  width=75 border=0 height="75" alt="<%=trim(rs("bookname"))%>"></a> 
                    <%end if%>
                  </div>
                </td>
                <td valign=top width="59%"><a class=a4 
                        href=list.asp?id=<%=rs("bookid")%> target=_blank><font color=#FF6600><br>
                  &nbsp;</font></a><a href=list.asp?id=<%=rs("bookid")%> target=_blank> 
                  <font color="#800000"> <strong><u> 
                  <%if len(trim(rs("bookname")))>7 then
	response.write left(trim(rs("bookname")),7)&".."
	else
	response.write trim(rs("bookname"))
	end if%>
                  </u></strong> </font> </a><br>
                  &nbsp;市场价：<s><%=formatnumber(rs("shichangjia"),2)&"元"%></s><br>
                  &nbsp;会员价：<font color=#FF0000><%=formatnumber(rs("huiyuanjia"),2)&"元"%></font><br>
                  &nbsp;&nbsp;VIP 价：<font color=#FF0000><strong><%=formatnumber(rs("Vipjia"),2)&"元"%></strong></font><br>
                  <font color="#999999">&nbsp; </font> 
                  <table cellpadding=0 cellspacing=0>
                    <tbody> 
                    <tr> 
                      <td>&nbsp;<a href="javascript:demo('gouwu.asp?id=<%=rs("bookid")%>&action=add');"><img src="images/goumai.gif" width="43" height="12" border=0></a><a href="javascript:;" onClick="javascript:window.open('shoucang.asp?id=<%=rs("bookid")%>&action=add','shouchang','width=450,height=350,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');"><img src="images/shoucang1.gif" width="49" height="13" border=0></a></td>
                    </tr>
                    </tbody> 
                  </table>
                </td>
              </tr>
              <tr> 
                <td valign=top colspan="2" style="PADDING-LEFT: 6px"><font color="#999999">&nbsp; 
                  </font> 
                  <%rs.movenext%>
                </td>
              </tr>
            </table>
            <%end if%>
          </td>
        </tr>
        <tr> 
          <td valign=top colspan="3" background="images/bj_x1.gif" height="1"></td>
        </tr>
        <%next%>
        <%
				rs.close
				set rs=nothing%>
      </table>
      <%end if%>
    </td>
  </tr>
</table>
