<!-- #include file="../inc/conexao.asp" -->
<%

'RELAÇÃO DE CATEGORIAS
'--------------------------------------------------------------------------
SQL = "select * from CATEGORIAS A where A.catId in (select catId from SUBCATEGORIAS) order by catNome"
	set rsCat = createObject("adodb.recordset")
	rsCat.Open(SQL), DB, 1
'--------------------------------------------------------------------------

%>
<html>
<head>
<title>OPERMAK ... Produtos</title>
<META NAME="author" CONTENT="Rodrigo Alexandre Queiroz">
<script language="JavaScript" src="../inc/javaScript.js"></script>
<link rel="stylesheet" href="../inc/estilos.css" type="text/css">
</head>
<body>

<!-- #include file="../inc/cabecalho.asp" -->

<p>Clique em uma categoria para visualizar os equipamentos dispon&iacute;veis: </p>

	<%
	while not rsCat.EOF
	a = a + 1
	%>
  
	<table width="100%">
	  <tr> 
	    <td width="1"><a href="#" onClick="javascript:maisMenos('img<%= a %>');exibeMenu('menu<%= a %>')"><img src="icon_mais.gif" width="11" height="9" hspace="4" border="0" name="img<%= a %>" id="img<%= a %>"></a></td>
	    <td><a href="#" onClick="javascript:maisMenos('img<%= a %>');exibeMenu('menu<%= a %>')" class="font1"><%= rsCat("catNome") %></a></td>
	  </tr>
	</table>
	<div id="menu<%= a %>" style="display: none" onClick="event.cancelBubble=true">
	<table width="100%">

		<%
		'RELAÇÃO DE SUBCATEGORIAS
		'--------------------------------------------------------------------------
		SQL = "select * from SUBCATEGORIAS A where A.subCatId in (select subCatId from EQUIPAMENTOS where equPublicado = true) and A.catId = " & rsCat("catId") & " order by subCatNome"
			set rsSub = createObject("adodb.recordset")
			rsSub.Open(SQL), DB, 1
		'--------------------------------------------------------------------------
		while not rsSub.EOF
		%>

		  <tr>
		    <td width="40"><img src="../../imagens/spacer.gif" width="40" height="10"></td>
		    <td width="12"><img src="../../imagens/form_indicador.gif"></td>
		    <td><p><a href="equipamentos.asp?subCatId=<%= rsSub("subCatId") %>" class="font2"><%= rsSub("subCatNome") %></a></p></td>
		  </tr>

		<%
		rsSub.movenext
		wend
		%>

	</table>
	</div>
	<br>

	<%
	rsCat.movenext
	wend
	%>

<!-- #include file="../inc/rodape.asp" -->

</body>
</html>

	<%
		rsSub.close()
		set rsSub = nothing
	rsCat.close()
	set rsCat = nothing
	%>

<!-- #include file="../inc/fechar.asp" -->