<html>
<!--#INCLUDE FILE="imgsz.asp"-->
<!--#INCLUDE FILE="propresize.asp"-->

<!--#include file="includes/db.asp"-->
<%set rs=objConn.execute("select * from intros where introid=1")
if not rs.eof then
intro=rs("intro")
end if

if request.querystring("id")>"" then

set rs2=objConn.execute("select * from cats where catid=" & request.querystring("id"))
	if not rs2.eof then
	category=rs2("category")
	else
	category="error"
	end if
set rs3=objConn.execute("select * from qyphotos where catid=" & category & " ORDER BY photoid")%>
<table>
        <tr>
          <td align="left" valign="top" class="body">
		  <%=intro%></td>
        </tr>
<a href="photos.asp">Gallery</a> &gt; <%=rs2("category")%><br><br>
  <P align="center">Click on a thumbnail to expand the image.</P> </span>
	</td>
    <td bgcolor="#9CC1CB"><img src="images/spacer.gif" width="1" height="1" alt=""></td>
  </tr>
  <tr>
    <td height="30" rowspan="2" valign="top" background="images/index_21.jpg"><img src="images/index_21.jpg" width="13" height="30" alt=""></td>
    <td bgcolor="#9CC1CB"><img src="images/spacer.gif" width="1" height="5" alt=""></td>
  </tr>
  <tr>
    <td height="25" bgcolor="#9CC1CB"><img src="images/spacer.gif" width="1" height="25" alt=""></td>
  </tr>
  <tr>
    <td height="100%" colspan="2" valign="top" background="images/index_23.jpg"><div align="left">
      <p><br>
            <br>
            <br>
            <img src="images/ice.gif" width="200" height="200"><br>
            <span class="style6">.......</span>Japanese symbol for &quot;ice&quot;    </p>
      <p align="center"><br>
        <a href="https://www.bbb.org/online/consumer/cks.aspx?ID=108082816244" target="_blank"><img src="images/bbbsealh1.gif" alt="." width="90" height="34"></a></p>
    </div></td>
    <td width="10" height="100%" valign="top" background="images/index_24.jpg">&nbsp;</td>
    <td height="100%" colspan="2" valign="top" bgcolor="#9CC1CB"><br>
      <br>
      <table width="100%" border="0" align="center">
	  	<!--START THE CATEGORIES HERE-->
<%
'iColumnSpan is used as a column counter 
iColumnSpan=0
allrecords=allrecords-1
response.write "<tr>"
'If there are records then loop through the fields
	if not rs3.eof then
	
		Do While Not rs3.EOF
		
		If iColumnSpan=2 Then
		response.write "</tr><tr>"
		iColumnSpan=0
		End If
		
		iColumnSpan=iColumnSpan + 1
		allrecords=allrecords+1
		%>
		<td align="center" valign="top"><a href="view.asp?id=<%=request.querystring("id")%>&photo=<%=allrecords%>"><img src="<%=rs2("catDir")%>/<%=rs3("photoImage")%>" <%=ImageResize(Server.MapPath(rs2("catDir") & "/" & rs3("photoImage")), 200, 200)%> style="border-width:thin; border-color:#000099; border-style:solid"></a>
		<%
		
		'move on to the next record
		rs3.MoveNext
		Loop
	else
	response.write "<tr><td>There are no images in this gallery at this time.</tr>"
	end if
%>
		<!--END CATEGORIES HERE-->
    </table>    

      <div align="center"><br>
        <br>
        &laquo; <a href="#top">BACK TO TOP</a> &raquo;
      </div>
<%else
response.write "You have reached this page in err.  Please return to the main site."
end if%>
	
