// If the browser is IE 5, 5.5 or 6, we have to do some CSS tweaking in order to display the PNG images correctly.
if (/MSIE (5\.5|6\.)/.test(navigator.userAgent)) {

	function addCSSRule (selectorText, declarations) {
		var styleSheet;
		if (document.styleSheets) {
			if (document.styleSheets.length === 0) {
				var styleElement;
				if (document.createElement && (styleElement = document.createElement('style'))) {
					styleElement.type = 'text/css';
					document.getElementsByTagName('head')[0].appendChild(styleElement);
					styleSheet = styleElement.sheet;
				}
			}
			if (document.styleSheets.length > 0) {
				styleSheet = document.styleSheets[document.styleSheets.length - 1];
				if (styleSheet.insertRule) {
					styleSheet.insertRule(selectorText + ' { ' + declarations + ' }', styleSheet.cssRules.length);
				}
				else if (styleSheet.addRule) {
					styleSheet.addRule(selectorText, declarations);
				}
			}
		}
	}
	
	addCSSRule('img.pngfix', "behavior: url('assets/png_fix/png_fix_image.htc')");
}
