503b306173879b6efd6ad8ff9ce094da515f380f
3 // png alpha transparency fixes
4 window
.attachEvent("onload", fixalpha
);
8 var rslt
= navigator
.appVersion
.match(/MSIE (\d+\.\d+)/, '');
9 if (rslt
!= null && Number(rslt
[1]) >= 5.5)
11 for (i
=0; i
<document
.all
.length
; i
++){
12 var bg
= document
.all
[i
].currentStyle
.backgroundImage
;
14 if (bg
.match(/\.png/i) != null){
15 var mypng
= bg
.substring(5,bg
.length
-2);
16 document
.all
[i
].style
.filter
= "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng
+"', sizingMethod='image')";
17 document
.all
[i
].style
.backgroundImage
= "none";
22 for(var i
=0; i
<document
.images
.length
; i
++)
24 var img
= document
.images
[i
]
25 var imgName
= img
.src
.toUpperCase()
26 if (imgName
.substring(imgName
.length
-3, imgName
.length
) == "PNG")
28 var imgID
= (img
.id
) ? "id='" + img
.id
+ "' " : ""
29 var imgClass
= (img
.className
) ? "class='" + img
.className
+ "' " : ""
30 var imgTitle
= (img
.title
) ? "title='" + img
.title
+ "' " : "title='" + img
.alt
+ "' "
31 var imgStyle
= "display:inline-block;" + img
.style
.cssText
32 if (img
.align
== "left") imgStyle
= "float:left;" + imgStyle
33 if (img
.align
== "right") imgStyle
= "float:right;" + imgStyle
34 if (img
.parentElement
.href
) imgStyle
= "cursor:hand;" + imgStyle
35 var strNewHTML
= "<span " + imgID
+ imgClass
+ imgTitle
36 + " style=\"" + "width:" + img
.width
+ "px; height:" + img
.height
+ "px;" + imgStyle
+ ";"
37 + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
38 + "(src=\'" + img
.src
+ "\', sizingMethod='scale');\"></span>"
39 img
.outerHTML
= strNewHTML