var ie6 = /MSIE 6.0/.test(navigator.userAgent);
var clear = "/public/img/vide.gif";

function pngfix() {
	if (ie6) {
		var els=document.getElementsByTagName('*');
		for (i=0; i<els.length; i++) {
			var el = els[i];
			var es = el.style;
			if (el.src && el.src.match(/\.png/i) && es.filter == '') {
				el.height = el.height;
				el.width = el.width;
				es.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+el.src+"', sizingMethod='crop')";
				el.src = clear;
			} else {
				var elb = el.currentStyle.backgroundImage;
				if (elb.match(/\.png/i)) {
					var path = elb.split('"');
					var rep = (el.currentStyle.backgroundRepeat=='no-repeat')?'crop':'scale';
					es.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+path[1]+"', sizingMethod='"+rep+"')";
					es.height = el.clientHeight+'px';
					es.backgroundImage = "none";
				}
			}
			/*if (el.currentStyle.position !='absolute' && !es.filter && !el.tagName.match(/(body|html|script)/gi)) {
				es.position = "relative";
			}
			if (es.filter && el.currentStyle.position == "relative") {
				es.position = "static";
			}*/
		}
	}
}

if (window.attachEvent)
{
    window.attachEvent('onload', pngfix);
}
