Display attachment icons based on file type - Web

I’d like to display a different icon for file attachments depending on the file type; ppt, doc,pdf,wks, other. Each document can have multiple attachments. I’m using computed text with this formula, but need some help with the dynamic icons;

@Transform(@AttachmentNames; “myVAR” ; “
<A TARGET = "_blank" HREF='”+@Text(@DocumentUniqueID)+“/$file/”+ myVAR +“'>”+ " " + @Left(myVAR; 38 ))

Subject: Display attachment icons based on file type - Web

The easy way to do it would be to create application icons that have names like “doc.gif”, “xls.gif”, “pdf.gif” and so forth and just use @RightBack(myVar;“.”) to get the file extension, but then you’d need to make sure you covered all cases.