<%
	set con=server.createObject("adodb.connection")
	con.open Application("Product")
%>
<%
	function getImage(con,id)
	    dim rez,strID
	    strID = rs("ID")
	    set rs=server.createObject("adodb.recordset")
	    rs.open "select image from ITEMS where id=" & request("id") ,con
	    while not rs.eof
		if rs.bof then break
		rez=rs("IMAGE").value
		rs.moveNext
	    wend
	    rs.close
	    set rs=nothing
	    end function

	function getName(con,id)
		dim rez
		rez=""
		set rs=server.createObject("adodb.recordset")
		rs.open "select name from ITEMS where id=" & request("id") ,con
		while not rs.eof
		    if rs.bof then break
		    rez=rs("NAME").value
		    rs.moveNext
		wend
		rs.close
		set rs=nothing
		if rez="" then rez="Main"
		end function

%>
<html>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0" rightmargin=0 marginwidth=0 marginheight=0 bottommargin=0 link="#000000" alink="#000000" vlink="#000000">
  <table width="100%" cellspacing="2" cellpadding="3" border="0" vspace="0" hspace="0">
  <tr><td colspan=3 width="100%" style="FONT: 12px Tahoma"><font face=tahoma color="red"><b></b></font></td></tr>
  <%
      set rs=server.createObject("adodb.recordset")
      rs.open "select * from ITEMS where id=" & request("id") ,con
      while not rs.eof
  	if rs.bof then
  	    break
  	end if

%>
  <tr><td><p>&nbsp;</p></td></tr>
  <tr><td align="center"><center><img src="<%="productImages/" & rs("image")%>"></center></td></tr>
  <tr><td><p>&nbsp;</p></td></tr>
  <tr><td align="center" style="FONT: 13px Tahoma"><center><font face="Tahoma"><b><%=rs("name")%></b></center></font></td></tr>
<%
	rs.moveNext
    wend

    rs.close
    con.close
    set rs= nothing
    set con=nothing
%>
</table>
</body>
</html>