non sapevo come altro chiamarla!!

ho questo codice:
codice:
max=2
response.Write"<div align='center'><table border='0' cellspacing='0' cellpadding='0'bordercolor='#000000' ><tr>"	

do while not rs01.EOF

if (rs01.Fields.Item("immagine").Value) <> "" then
x=x+1
response.Write("<td>")


if x<7 then



response.Write"tabbella con vetrine"

if x=max then
	max=max+2
	response.Write"<tr></tr>"
	end if
response.Write("</td>")

end if
end if
rs01.movenext
loop

response.Write("</tr></table>")
questo codice mi fa vedere delle immagini fino ad un massimo di 6 mettendo sempre l'ultima inserita per prima e fin qui nessun problema!
adesso arriva il difficile (x me!)
dovrei fare in modo che se le vetrine sono 3, me ne faccia vedere 2, se invece sono 5 ne vedo 4 e basta...cioè sempre un numero pari!!

avete qualche suggerimento??

grazie!