Display an image based on array value (loop)

Hello everyone, hope you’re all well.

Here is my code:


if (!goBook)
{
    if (V == "*")
    {
        Response.Write(Price("") + " = \
");

        if ((Session("ListAttributes"))
        &&  (Session("ListAttributes").length > 0))
        {
            for (var j = 0; j < Session("ListAttributes").length; j++)
            {
                var aa = String(Session("ListAttributes")[j][0]);
                %>
	
	<table>
	<tr>
	<td width="400"><p style="font-family:arial;font-size:10pt;color:#666666;margin-bottom:10px;margin-left:20px;"><% Response.Write(aa + "\
"); %></p>

	<img style="margin-left:20px;margin-bottom:25px;" src="/images/carpic.JPG" width="150" height="90" />
	
	</td>
	
	<td align="left"><% Response.Write(Price(aa)); %></td>
	</tr>
	</table>


<%

            }
        }
    }
    else
    {
        Response.Write(Price(V));
    }

    Response.End();
}

It displays 8 different vehicle types and their respective prices, it currently displays like this:

http://www.londonheathrowcars.com/example.jpg

What I am trying to do is display a different image for each car type in the loop (eg carpic1, carpic2, carpic3 etc). Having a bit of trouble achieving this, can anyone help?

Thanks
Antony

hello, just letting you know i got it working via another forum. here is the solution, i just rename my images carpic1, carpic2 etc and it loops through them

if ((Session("ListAttributes")) &&  (Session("ListAttributes").length > 0))
{
        ImageID = 1
        for (var j = 0; j < Session("ListAttributes").length; j++)
        {

          var aa = String(Session("ListAttributes")[j][0]);
 %>
	
	<table>
	<tr>
	<td width="400"><p style="font-family:arial;font-size:10pt;color:#666666;margin-bottom:10px;margin-left:20px;"><% Response.Write(aa + "\
"); %></p>

	<img style="margin-left:20px;margin-bottom:25px;" src="/images/carpic<%=ImageID%>.JPG" width="150" height="90" />
	
	</td>
	
	<td align="left"><% Response.Write(Price(aa)); %></td>
	</tr>
	</table>


<%
	ImageID = ImageID +1

            }
        }
    }
    else
    {
        Response.Write(Price(V));
    }

    Response.End();
}