/* ========================================================================= */
/* fixPNG() - r009 (30.06.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 = "framework/themes/img/s.png";
			}
		} else {
			if (src) {
				src = src[1];
				element.runtimeStyle.backgroundImage = 'none';
			}
		}
		if (src) {
			var widthHeight = '';
			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";
		}
	}
}

try {
	document.execCommand('BackgroundImageCache', false, true)
} catch(e) {}
