<!--#include file="top.asp" -->
<style>
.bu{ display:inline-block; text-align:center; width:85px; height:30px; margin:0px; margin-left:-5px; line-height:30px; border:1px solid white;}
.bu1{ display:inline-block; text-align:center; width:85px; height:30px; margin:0px; margin-left:-5px; line-height:30px; border:1px solid white; border-bottom:1px solid #e2e2e2;}
.bu1 a { color:#039; font-weight:bold; text-decoration:none}
.bu:hover{ background:#eee}
.bu a{ color:#999; text-decoration:none}
.bu:hover a{ color:#999; text-decoration:none; }
.show{width:90%; border:1px solid white; margin-left:-5px; margin-top:-1px; padding:5px 20px;z-index:-9 }
</style>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background:url(images/p_top.jpg) #e2e2e2 no-repeat center bottom">
  <tr>
    <td>&nbsp;</td>
    <td width="1000"><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
      <%
	  dim fid
	  fid=cint(request("fid"))
sql="select name,parentid,fid from forum where fid="&fid&" and tid='p'"
rs.open sql,conn,1,1
if rs.eof then response.Redirect "index.asp"
rs.close
%>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td height="50" align="center"><fieldset style=" margin:10px; text-align:left; padding:20px; border: 1px solid #FFF">
          <legend>Category</legend>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td align="right" style="color:#fff; font-weight:bold">Cross Reference
              </td>
              <td width="300" align="right"><table width="284" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <form id="form2" name="form2" method="post" action="?key=keys&amp;fid=3">
                    <td height="29"><input name="keys" type="text" id="keys" style="background:url(images/button.jpg) left; height:29px; border:0px; width:204px; margin:0px; padding-left:20px; line-height:29px; color:#999" value="Type Part No." onfocus="this.value=''" onblur="this.value='Type Part No.'"/></td>
                    <td height="29"><input type="submit" name="button2" id="button2" value="" style="background:url(images/button.jpg) right; height:29px; border:0px; width:40px; margin:0px; line-height:29px"/></td>
                    <td width="20">&nbsp;</td>
                    </form>
                  </tr>
                </table></td>
              </tr>
            </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="35">
    			<%
				dim cid,ccid
				cid=cint(request("cid"))
				ccid=cint(request("ccid"))
				
				sql="select * from category where fid=3 and parentid=0 order by orders,cid desc"
				rs.open sql,conn,1,1

					sql="select * from category where cid="&cid&""
					rs2.open sql,conn,1,1
					if rs2.eof then 
						rs.movefirst
						cid=rs("cid")
					end if
					rs2.close

				do while not rs.eof
				%>
                <span class="bu<% if cid=rs("cid") then response.write "1" end if%>"><a href="products.asp?fid=3&amp;cid=<%=rs("cid")%>"><%=rs("name")%></a></span>
                <%
				rs.movenext
				loop
				rs.close

			  sql="select * from category where cid="&cid&""
			  rs.open sql,conn,1,1
			  'do while not rs.eof
			  	sql="select * from category where parentid="&rs("cid")&" order by orders, cid desc"
				rs2.open sql,conn,1,1
			  %>
              <div class="show">
                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td height="30">
                    <%
					do while not rs2.eof
					response.write "&nbsp;●&nbsp;<a href='products.asp?fid=3&amp;cid="&cid&"&ccid="&rs2("cid")&"' class='"
					if ccid=rs2("cid") then response.write "red" else response.write "gray2" end if 
					response.write "'>"&rs2("name")&"</a>&nbsp;&nbsp;"
					rs2.movenext
					loop
					rs2.close
			  			sql="select * from category where cid="&ccid&" order by orders, cid desc"
						rs3.open sql,conn,1,1
					%>
                    </td>
                  </tr>
                  <tr>
                    <td height="30"><%=rs3("item1")%></td>
                  </tr>
                </table>
              </div>             
              <%
			  	rs3.close
			  'rs.movenext
			  'loop
			  rs.close
			  %>
              </td>
              </tr>
            </table>
          </fieldset></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
    </table></td>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td><table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
      <tr>
        <td height="25" style="background:url(images/position.jpg) no-repeat bottom left; color:#999; font-size:14px; font-weight:bold">　　　Position &gt; <a href="?fid=3" class="grayb">Products</a></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="1000" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top"><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#CCCCCC">
      <tr>
        <td align="center" class="tb1">Part Number</td>
        <td align="center" class="tb1">Supply Voltage(V)</td>
        <td align="center" class="tb1">Duplex</td>
        <td align="center" class="tb1">DataRate<br />
          (bps)</td>
        <td align="center" class="tb1">ESD Air/<br />
          Contact (kV) </td>
        <td align="center" class="tb1">Transceivers <br />
          On Bus<br /></td>
        <td width="150" align="center" class="tb1">Slew Rate Limited &amp;<br /> 
          Receiver Input Filtering</td>
        <td align="center" class="tb1">Low Power Shutdown</td>
        <td align="center" class="tb1">Number of Pins</td>
        <td align="center" class="tb1">Datasheet</td>
      </tr>
      <tr>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
        <td align="center" bgcolor="#1980c3">&nbsp;</td>
      </tr>
      <tr>
      <%
	  dim str,sql2,sql3
	  sql="select * from product where fid="&fid
	  if ccid<>0 then 
	  	sql=sql&" and cid="&ccid
	  elseif cid<>0 then 
	  	sql=sql&" and cid in (select cid from category where parentid="&cid&")"
	  end if
	  if request("key")="item" then 
		sql=sql&" and name like '%"&request("name")&"%'"
	  	for j=1 to 8
		  sql=sql&" and item"&j&" like '%"&request("item"&j)&"%'"
		next
	  end if 
	  sql=sql&" order by cid,orders,pid"
	  if request("key")="keys" then
	 	sql="select * from product where fid="&fid&" and ("
		for j=1 to 9
		  sql=sql&"key"&j&" like '%"&request("keys")&"%' or "
		next
		'sql=left(sql,len(sql)-4)
	  	sql=sql&" name like '%"&request("keys")&"%') order by cid,orders,pid"
	  end if 
	  'sql2=replace(sql,"order by cid,orders,pid","group by item")
	  rs.open sql,conn,1,1
	  %>
      <form id="form1" name="form1" method="post" action="?key=item&fid=3&cid=<%=cid%>&ccid=<%=ccid%>">
        <td height="30" align="center" bgcolor="#FFFFFF">
          <select name="name" id="name">
            <option value="" selected="selected">---</option>
            <%
			do while not rs.eof
			%>
            <option value="<%=rs("name")%>"<% if rs("name")=request("name") then response.write " selected"%>><%=rs("name")%></option>
            <%
			rs.movenext
			loop
			rs.movefirst
			%>
          </select>
        </td>
        <% for j=1 to 8 %>
        <td height="30" align="center" bgcolor="#FFFFFF">
          <select name="item<%=j%>" id="item<%=j%>">
            <option value="" selected="selected">---</option>
            <%
	  if ccid<>0 then 
			sql3="select item"&j&" from product where fid="&fid&" and cid="&ccid&" group by item"&j
	  elseif cid<>0 then 
			sql3="select item"&j&" from product where fid="&fid&" and cid in (select cid from category where parentid="&cid&") group by item"&j
	  end if
			rs2.open sql3,conn,1,1
			do while not rs2.eof
			%>
            <option value="<%=rs2("item"&j)%>"<% if rs2("item"&j)=request("item"&j) then response.write " selected"%>><%=rs2("item"&j)%></option>
            <%
			rs2.movenext
			loop
			rs2.close
			%>
          </select>
        </td>
        <% next %>
        <td height="30" align="center" bgcolor="#FFFFFF"><input type="submit" name="button" id="button" value="Search" /></td>
      </form>
      </tr>
      <%
	  i=0
	  do while not rs.eof
	  i=i+1
	  if i mod 2=0 then temp="#e2f3fd" else temp="#FFFFFF" end if
	  %>
      <tr>
        <td height="30" align="center" bgcolor="<%=temp%>"><a href="product.asp?fid=<%=rs("fid")%>&cid=<%=rs("cid")%>&pid=<%=rs("pid")%>" class="blue"><%=rs("name")%></a></td>
        <% for j=1 to 8%>
        <td height="30" align="center" bgcolor="<%=temp%>"><%=rs("item"&j)%></td>
        <% next %>
        <td height="30" align="center" bgcolor="<%=temp%>">
        <% 
			if len(trim(rs("pdf")))=0 or isnull(rs("pdf")) then 

			else 
				if rs("pdf_sign")=1 then
					if session("user")="true" then
						if cint(session("sign"))=1 then
		%>
        				&nbsp;&nbsp;&nbsp;<a href="<%=rs("pdf")%>" target="_blank"><img src="images/pdf.gif" width="16" height="16" border="0" /></a>&nbsp;<span style="color:red">*</span>
        <%
                        else
		%>
        				&nbsp;&nbsp;&nbsp;<a href="login.asp?act=nosign" target="_blank"><img src="images/pdf.gif" width="16" height="16" border="0" /></a>&nbsp;<span style="color:red">*</span>
        <%
                        end if                      
					else
		%>
        				&nbsp;&nbsp;&nbsp;<a href="login.asp" target="_blank"><img src="images/pdf.gif" width="16" height="16" border="0" /></a>&nbsp;<span style="color:red">*</span>
        <%
					end if
				elseif cint(rs("pdf_sign"))=0 then
		%>
        			&nbsp;&nbsp;&nbsp;<a href="<%=rs("pdf")%>" target="_blank"><img src="images/pdf.gif" width="16" height="16" border="0" /></a>&nbsp;&nbsp;&nbsp;
        <% 
				end if
			end if
		%>
        </td>
      </tr>
      <%
	  rs.movenext
	  loop
	  rs.close
	  %>
    </table></td>
  </tr>
</table>
<!--#include file="bottom.asp" -->