<public:component lightWeight="true">
<public:attach event="onpropertychange" onevent="onPropertyChange()" />
<public:attach event="onload" onevent="onPropertyChange()" />

<script type="text/javascript">

// IE5.5+ PNG Alpha Fix v1.0RC4
// (c) 2004-2005 Angus Turnbull http://www.twinhelix.com

// This is licensed under the CC-GNU LGPL, version 2.1 or later.
// For details, see: http://creativecommons.org/licenses/LGPL/2.1/

var isSupported = /MSIE (5\.5|6\.)/gi.test(navigator.userAgent);

// This must be a path to a blank image. That's all the configuration you need.
var blankImg = '/images/none.gif';
if (typeof  window.oPNGElements == 'undefined') { 
	window.oPNGElements = []; 
	window.oPNGElementInterval = null; 
	window.CheckPNGElements = function() {
		if (PageConfig.initialized === true) {
			for (var i = 0; i < window.oPNGElements.length; i++) {
				doFix(true, oPNGElements[i]);
				window.oPNGElements.splice(i, 1);
			}
		}
		if ((window.oPNGElements.length == 0) && (window.oPNGElementInterval != null)) { window.clearInterval(window.oPNGElementInterval); window.oPNGElementInterval = null; }
	};
}
var f = 'DXImageTransform.Microsoft.AlphaImageLoader';


function onPropertyChange() {
	if (!isSupported) return;
	if (!(event && /(background|src)/.test(event.propertyName))) return;
	doFix(false, this);
}

function filt(forced, oElement, s, m) {
	if (forced === true) { if (s) oElement.style.filter = 'progid:'+f+'(src="'+s+'",sizingMethod="'+m+'")'; }
	if ((forced === false) && (oElement.filters) && (oElement.filters[f])) {
		oElement.filters[f].enabled = (s != "" ? true : false);
		if (s) with (oElement.filters[f]) { src = s; sizingMethod = m; }
 	}
}

function doFix(forced, oElement) {
	var found = false;
	if (!oElement) { oElement = this; }
	var bgImg = oElement.currentStyle.backgroundImage || oElement.style.backgroundImage;
	if ((oElement.tagName != 'IMG') && (!bgImg) && (!bgImg.match(/^url[("']+(.*\.png)[)"']+$/i))) { return ; }
		
	if ((blankImg == "") && (typeof PageConfig != 'undefined') && (typeof PageConfig.initialized != 'undefined')) { 
		if (PageConfig.initialized === false) {
			for (var i = 0; i < window.oPNGElements.length; i++) {
				if (window.oPNGElements[i] === oElement) { found = true; break; }
			}
			if (found == false) { window.oPNGElements[window.oPNGElements.length] = oElement; }
			if (window.oPNGElementInterval == null) { window.oPNGElementInterval = window.setInterval("window.CheckPNGElements()", 10); }
			return;
		} else if (PageConfig.initialized === true) {
			blankImg = General.baseUrl + 'blank.gif';
		}
	}
	
	if (oElement.tagName == 'IMG') {
  		if ((/\.png$/i).test(oElement.src)) {
			if (oElement.currentStyle.width == 'auto' && oElement.currentStyle.height == 'auto') { oElement.style.width = oElement.offsetWidth + 'px'; oElement.style.height = oElement.offsetHeight + 'px'; }
			filt(forced, oElement, oElement.src, 'scale');
			oElement.src = blankImg;
		}
		else if (oElement.src.indexOf(blankImg) < 0) filt(forced, oElement);
	}
	else if (bgImg && bgImg != 'none') {
		if (bgImg.match(/^url[("']+(.*\.png)[)"']+$/i)) {
			var s = RegExp.$1;
			if (oElement.currentStyle.width == 'auto' && oElement.currentStyle.height == 'auto') { oElement.style.width = oElement.offsetWidth + 'px'; oElement.style.height = oElement.offsetHeight + 'px'; }
			oElement.style.backgroundImage = 'none';
			filt(forced, oElement, s, 'crop');
			// IE link fix.
			for (var n = 0; n < oElement.childNodes.length; n++) if (oElement.childNodes[n].style) oElement.childNodes[n].style.position = 'relative';
		}
		else filt(forced, oElement);
	}
}

if (isSupported) doFix(true, this);

</script>
</public:component>