function isDefined(property) {
	return (typeof property != 'undefined');
}

function correctPNG() {
	var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
	var itsAllGood = (rslt != null && Number(rslt[1]) >= 5.5);

	for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
		if (itsAllGood && img.src.match(/\.png$/i) != null) {
			img.style.visibility = "hidden";
			var src = img.src;
			var div = document.createElement("DIV");
			div.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizing='scale')"
			div.style.width = img.width + "px";
			div.style.height = img.height + "px";
			if (img.parentElement.href) {
				div.style.cursor = "hand";
			}
			img.replaceNode(div);
			img.style.visibility = "visible";
		}
	}
}

if (isDefined(window.addEventListener)) {
	window.addEventListener("load", runFunctions, false);
}

else if (isDefined(window.attachEvent)) {
	window.attachEvent("onload", runFunctions);
}

function runFunctions() {
		if ((window.attachEvent) && (!isDefined(document.body.style.maxHeight))) {
			correctPNG();
		}
}
