/*
 
Correctly handle PNG transparency in Win IE 5.5 & 6.
http://homepage.ntlworld.com/bobosola. Updated 18-Jan-2006.

Use in <HEAD> with DEFER keyword wrapped in conditional comments:
<!--[if lt IE 7]>
<script defer type="text/javascript" src="pngfix.js"></script>
<![endif]-->

*/

function correctPNG() {
    var arVersion = navigator.appVersion.split("MSIE")
    var version = parseFloat(arVersion[1])
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) //IE 7 directly supports png transparency
    {
        var myImages = document.getElementsByTagName("img")
        for (var i=0; i < myImages.length; i++) {
            var currentSrc = myImages[i].src    //this might pick up a couple of images that aren't PNGs, but that won't matter
            if (currentSrc.indexOf("png") != -1) {     //also, if any of your PNG file paths don't contain "PNG", substitute this line with "if (true) {"
                myImages[i].style.filter = "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader (src=\"" + myImages[i].src + "\")"
            }
        }
    }
}

window.attachEvent("onload", correctPNG) //not cross-browser compatible, but hey--all we're dealing with is IE5.5/6.0 =)
