// Fix the PNG Transparency issue
function CheckImage() {
	setTimeout("FixImage()", 1000);
}

function FixImage() {
	var supported = /MSIE ((5\.5)|[6789])/.test(navigator.userAgent) &&
					navigator.platform == "Win32";
	if (supported) {
		for (var i=0; i < document.images.length; i++) {
			var img = document.images[i];
			var imgID = img.id;
			var imgName = img.src;
			
			if (/imagetype=png/i.test(imgName) && !(/usetransparency=false/i.test(imgName))) {
				if (img.align == "left") {
					imgStyle = "float:left;" + imgStyle;
				}
				else if (img.align == "right") {
					imgStyle = "float:right;" + imgStyle;
				}
				
				var filterTxt = GetFilterText(img.src);
				var strNewHTML = "<span id=\"" + imgID
				+ "\" style=\"display:inline-block;width:200px;height:120px;"
				+ "filter:" + filterTxt + "\"></span>";
				img.outerHTML = strNewHTML;
				i = i-1;
			}
		}
	}
}

function GetFilterText(url) {
	return "progid:DXImageTransform.Microsoft.AlphaImageLoader"
			+ "(src=\'" + url + "\', sizingMethod='scale');";
}

