removed the img part for now because it messes the layout up
[lhc/web/wiklou.git] / stylesheets / IEFixes.js
1 // IE fix javascript
2
3 // png alpha transparency fixes
4 window.attachEvent("onload", fixalpha);
5
6 function fixalpha(){
7 // bg
8 var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
9 if (rslt != null && Number(rslt[1]) >= 5.5)
10 {
11 for (i=0; i<document.all.length; i++){
12 var bg = document.all[i].currentStyle.backgroundImage;
13 if (bg){
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";
18 }
19 }
20 }
21 }
22 }