patch from fomafix - bug33703 - remove black border-bottom-color for abbr
[lhc/web/wiklou.git] / skins / common / IEFixes.js
index 469daa4..427d41c 100644 (file)
@@ -4,16 +4,16 @@ window.isMSIE55 = ( window.showModalDialog && window.clipboardData && window.cre
 window.doneIETransform = undefined;
 window.doneIEAlphaFix = undefined;
 
-if ( document.attachEvent ) {
-       document.attachEvent( 'onreadystatechange', hookit );
-}
-
 window.hookit = function() {
        if ( !doneIETransform && document.getElementById && document.getElementById( 'bodyContent' ) ) {
                doneIETransform = true;
                relativeforfloats();
                fixalpha();
        }
+};
+
+if ( document.attachEvent ) {
+       document.attachEvent( 'onreadystatechange', window.hookit );
 }
 
 // png alpha transparency fixes
@@ -61,6 +61,12 @@ window.fixalpha = function( logoId ) {
                        linkFix.style.width = '100%';
                }
        }
+};
+
+if( isMSIE55 ) {
+       // Legacy modules are loaded from the bottom
+       // No need to wait for DOMContentReady or window.onload
+       fixalpha();
 }
 
 // fix ie6 disappering float bug
@@ -69,10 +75,11 @@ window.relativeforfloats = function() {
        if ( bc ) {
                var tables = bc.getElementsByTagName( 'table' );
                var divs = bc.getElementsByTagName( 'div' );
+               setrelative( tables );
+               setrelative( divs );
        }
-       setrelative( tables );
-       setrelative( divs );
-}
+};
+
 window.setrelative = function( nodes ) {
        var i = 0;
        while ( i < nodes.length ) {
@@ -84,7 +91,7 @@ window.setrelative = function( nodes ) {
                }
                i++;
        }
-}
+};
 
 // Expand links for printing
 String.prototype.hasClass = function( classWanted ) {
@@ -95,7 +102,7 @@ String.prototype.hasClass = function( classWanted ) {
                }
        }
        return false;
-}
+};
 
 window.expandedURLs = undefined;
 
@@ -117,7 +124,7 @@ window.onbeforeprint = function() {
                        }
                }
        }
-}
+};
 
 window.onafterprint = function() {
        for ( var i = 0; i < expandedURLs.length; i++ ) {
@@ -125,4 +132,4 @@ window.onafterprint = function() {
                        expandedURLs[i].removeNode( true );
                }
        }
-}
+};