function ieMakeTransparentPNGs() {

        var RXP = /MSIE (\d+\.\d+);/.test(navigator.userAgent); //Grab IE version, assuming it is even there.
        var ieVersion = new Number(RegExp.$1);                      //Get the number out of the IE version.
        if(ieVersion >= 7){
                //Do nothing, PNG transparency is supported in IE 7 and above.
        }
	else if ( 
		((navigator.userAgent.toLowerCase()).indexOf('msie') + 1) && 		//'+1' because indexOf returns -1 if string is not found
		((navigator.userAgent.toLowerCase()).indexOf('windows') + 1)  && 
		!((navigator.userAgent.toLowerCase()).indexOf('opera') + 1) 		//Opera reports itself as MSIE/Windows, but also adds an 'Opera' string
		) { 	

		for (i=0;i<document.images.length;i++) {
			if (document.images[i].src.toLowerCase().indexOf('.png') + 1) {

				var pngImage = document.images[i];
				pngImage.style.width = pngImage.offsetWidth;
				pngImage.style.height = pngImage.offsetHeight;
				pngImage.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+pngImage.src+"',sizingMethod='scale');";
				pngImage.src = 'http://firstvoicesproject.ca/wp-content/themes/default/js/x.gif';

			}
		}
	}
	
}

ieMakeTransparentPNGs();
