<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">This is my own little script I whipped together once, works for me :)<DIV><BR class="khtml-block-placeholder"></DIV><DIV>function iePNG() {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>var images = document.getElementsByTagName("img");</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>if (images[0].style.filter != null) {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>var src;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>for (var i = 0; i < images.length; i++) {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>src = images[i].src;</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>if (src.indexOf(".png") > 0) {</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                                </SPAN>images[i].src = "images/blank.gif";</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                                </SPAN>images[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "')";</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                        </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">                </SPAN>}</DIV><DIV><SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>}</DIV><DIV>}</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I don't really understand why you need all those complex span solutions and such, but if there's something wrong with my code I'd very much appreciate the feedback.</DIV><DIV>btw, the blank.gif is a transparent 1*1 gif.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Andreas</DIV><DIV><BR><DIV><DIV>On Jun 19, 2006, at 23:16 , Sam wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P><FONT face="Arial" size="2">Ken,<BR><BR>Thanks for the snippet. It was so short even I could understand the code.<BR><BR>Here's a snippet to modify the filename on mouseover / mouseout for pngs in IE or whatever browser. IT checks for the filter style and if present, modifies that attribute, not the src attribute.</FONT></P><P><FONT face="Arial" size="2"><BR>function pngHover(event) {<BR> if(event.type == 'mouseover') {<BR> if(this.style.filter) // add -hover to filename on mouseover<BR> this.style.filter = this.style.filter.replace('.png', '-hover.png');<BR> else<BR> this.src = this.src.replace('.png', '-hover.png');<BR> } else {<BR> if(this.style.filter) // remove -hover from filename on mouseout<BR> this.style.filter = this.style.filter.replace('-hover.png', '.png');<BR> else<BR> this.src = this.src.replace('-hover.png', '.png');<BR> }<BR>}<BR></FONT></P><FONT face="Arial" size="2"></FONT><DIV> <BR class="khtml-block-placeholder"></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Rails-spinoffs mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:Rails-spinoffs@lists.rubyonrails.org">Rails-spinoffs@lists.rubyonrails.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs">http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs</A></DIV> </BLOCKQUOTE></DIV><BR></DIV></BODY></HTML>