/* ========================================================================= */
/* fixPNG() - r003 (26.03.2008)
/* http://www.tigir.com/js/fixpng.js (author Tigirlas Igor)                  */

function fixPng(element, sizingMethod)
{
	if (/MSIE (5\.5|6).+Win/.test(navigator.userAgent)) {
		var src = null;

		if (!sizingMethod)
			sizingMethod = 'image';

		src = element.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i)
		if (element.tagName == 'IMG' && !src) {
			if (/\.png$/.test(element.src)) {
				src = element.src;
				var width = element.width;
				var height = element.height;
				element.src = "img/s.png";
			}
		} else {
			if (src) {
				src = src[1];
				element.runtimeStyle.backgroundImage = 'none';
			}
		}
		if (src) {
			var widthHeight = '';
			var widthHeightStyle = '';
			if (sizingMethod == 'scale') {
				//widthHeight = ',width='+element.offsetWidth+',height='+element.offsetHeight;
				widthHeightStyle = 'width:'+element.offsetWidth+'px; height:'+element.offsetHeight+'px;';
			}
			else
			if (width && height) {
				widthHeight = ',width='+width+',height='+height;
			}

			element.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "',sizingMethod='" + sizingMethod + "'" + widthHeight + ");display:none;z-index:1;"+widthHeightStyle;
		}
	}
}

try {
	document.execCommand('BackgroundImageCache', false, true)
} catch(e) {}
