function doFix(A){doPngFix($ES("*"),A)}function doPngFix(A,B){A.each(function(H){var F=H.getStyle("background-image");if(F.test(/(\.png)[\"\']\)$/)){var I=F.match(/\((.+)\)/)[1];var E=H.getStyle("background-repeat")=="no-repeat"?"crop":"scale";var C=H.getStyle("position")=="absolute";if(C){var G=H.clone();G.setStyle("background-image","none");G.injectAfter(H);doPngFix(G.getChildren(),B);H.getChildren().each(function(J){J.setStyle("display","none")})}H.setStyles({height:H.clientHeight+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod='"+E+"', src="+I+")","background-image":"none"})}else{if(H.getTag()=="img"&&H.src.test(/\.png$/)){var D=new Element("img",{"class":H.className,alt:H.getProperty("alt"),id:H.getProperty("id"),src:B,styles:{background:"transparent",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', sizingMethod='crop', src='"+H.getProperty("src")+"')"}}).setStyles(H.getStyles("position","top","left","right","bottom","height","width"));H.replaceWith(D)}}})}function doAbsFix(D,F){var E=$ES(D);if(E.length>0){for(var B=0;B<E.length;B++){var C=E[B];var A=C.getStyle("background-image");if(A.test(/(\.png)[\"\']\)$/)){if(C.getStyle("position")!="absolute"){C.setStyle("position","relative")}new Element("img",{src:A.match(/\([\'\"](.+)[\'\"]\)/)[1],styles:{position:"absolute",top:F[0],right:F[1],bottom:F[2],left:F[3]}}).injectInside(C);C.setStyle("background-image","none")}}}};