/* 
Correctly handle PNG transparency in Win IE 5.5 &amp; 6. 
Copyright 2007 Ignia, LLC 
Based in part on code from from http://homepage.ntlworld.com/bobosola. 
 
Use in  with DEFER keyword wrapped in conditional comments: 
 
<script type="text/javascript" defer="true" src="pngfix.js"></script> 
 
*/ 
 
function fixPng() { 
	var arVersion = navigator.appVersion.split("MSIE") 
	var version = parseFloat(arVersion[1]) 
	if ((version >= 5.5) && (document.body.filters)) 
	{ 
		 for(var j=0; j<document.images.length; j++) 
		 { 
				var img = document.images[j];
				var imgName = img.src.toUpperCase();
				if (imgName.indexOf(".PNG") > 0) {
					var width = img.width;
					var height = img.height;
					var sizingMethod = (img.className.toLowerCase().indexOf("scale") >= 0)? "scale" : "image"; 
					img.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + img.src.replace('%23', '%2523').replace("'", "%27") + "', sizingMethod='" + sizingMethod + "')"; 
					img.src="../image/blank.gif";
					mce_src="../image/blank.gif";
					img.width = width; 
					img.height = height; 
				} 
		 } 
	}     
} 
window.attachEvent("onload", fixPng); 
