/************************  FixPNGTransparencyForIE() ************************/
/**
 * @desc Makes IE 5.5 and higher render the transparency for PNG files.
 *
 * Takes a string to point to a blank image, like a 1x1 transparent gif.
 *
 * To use this, add this to the onload event for the body.  One will also
 * need to have a style for the image.  That style should include a width
 * and height (preferably matching that of the image) and a position.
 *
 * This works by looping through all of the img tags.  If the source ends
 * with png, then it adds the filter style and changes the image source
 * to the blank image.
 * 
 * 2005-06-12
 * @param string strBlankImageSrc
 * @author K. Adam Christensen
 */
function FixPNGTransparencyForIE(strBlankImageSrc) {
	if (navigator.appName == 'Microsoft Internet Explorer') {
		var domListOfImages = document.getElementsByTagName('img');
		for (i = 0; i < domListOfImages.length; i++) {
			var arrSplitSourceImageName = domListOfImages[i].src.split('.');
			if (arrSplitSourceImageName[arrSplitSourceImageName.length-1] == 'png') {
				domListOfImages[i].style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+domListOfImages[i].src+'", sizingMethod="scale")';
				domListOfImages[i].src = strBlankImageSrc;
			}
		}
	}
}
