Hola
¿Te a quedado tal que así?
Código asp:
Ver original<%
inmueble=rs7("id_inmueble")
ssql = "select filename, nombre, (SELECT MIN(a.id) FROM fotos_inmuebles a WHERE a.id_inmueble=fotos_inmuebles.id_inmueble) from fotos_inmuebles where id_inmueble ="&inmueble
set mima=conn.Execute(ssql)
if mima.eof and mima.bof then%>
<td width="100"><% response.write ("<img src='../../imagenes/FOTO-NO-DISPONIBLE.jpg' alt='no disponible' />")%></td>
<%
else
%>
<td width="100">
<a href="javascript:;" onclick="MM_openBrWindow('Imagen.asp?imagID=<%=mim a( "filename" )%>');">
<img src="../fotos_inmuebles/<%=mima( "filename" )%>" height="100" width="100" border="0"></a><br />
</td>
</tr>
<br />
<%
end if
mima.Close
set mima=nothing
rs7.MoveNext
loop
rs7.Close
end if
set rs7 = nothing
%>
Suerte