* td background set to White to avoid header border shining through
[mediawiki.git] / stylesheets / IEFixes.js
blob25991cc6113a443bc4c47b0ca06987579d88ee66
1 // IE fix javascript
3 // png alpha transparency fixes
4 window.attachEvent("onload", fixalpha);
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         var logoa = document.getElementById('portlet-logo').firstChild;
12         var bg = logoa.currentStyle.backgroundImage;
13         if (bg.match(/\.png/i) != null){
14             var mypng = bg.substring(5,bg.length-2);
15             logoa.style.backgroundImage = "none";
16             logoa.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='image')";
17         }
20     
21     /*
22         for (i=0; i<document.all.length; i++){
23             if(document.all[i].currentStyle && document.all[i].currentStyle.backgroundImage) {
24                 var bg = document.all[i].currentStyle.backgroundImage;
25             } else {
26                 bg = false;
27             }
28             if (bg){
29                 if (bg.match(/\.png/i) != null){
30                     var mypng = bg.substring(5,bg.length-2);
31                     document.all[i].style.backgroundImage = "none";
32                     document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='image')";
33                 }
34             }
35         }*/
36     }