diff options
Diffstat (limited to 'skins/common/IEFixes.js')
-rw-r--r-- | skins/common/IEFixes.js | 41 |
1 files changed, 21 insertions, 20 deletions
diff --git a/skins/common/IEFixes.js b/skins/common/IEFixes.js index 762d7a78..ba4dc66b 100644 --- a/skins/common/IEFixes.js +++ b/skins/common/IEFixes.js @@ -1,23 +1,23 @@ // IE fixes javascript -var isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup ); -var doneIETransform; -var doneIEAlphaFix; +window.isMSIE55 = ( window.showModalDialog && window.clipboardData && window.createPopup ); +window.doneIETransform = undefined; +window.doneIEAlphaFix = undefined; -if ( document.attachEvent ) { - document.attachEvent( 'onreadystatechange', hookit ); -} - -function 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 -function fixalpha( logoId ) { +window.fixalpha = function( logoId ) { // bg if ( isMSIE55 && !doneIEAlphaFix ) { var plogo = document.getElementById( logoId || 'p-logo' ); @@ -61,10 +61,10 @@ function fixalpha( logoId ) { linkFix.style.width = '100%'; } } -} +}; // fix ie6 disappering float bug -function relativeforfloats() { +window.relativeforfloats = function() { var bc = document.getElementById( 'bodyContent' ); if ( bc ) { var tables = bc.getElementsByTagName( 'table' ); @@ -72,8 +72,9 @@ function relativeforfloats() { } setrelative( tables ); setrelative( divs ); -} -function setrelative( nodes ) { +}; + +window.setrelative = function( nodes ) { var i = 0; while ( i < nodes.length ) { if( ( ( nodes[i].style.float && nodes[i].style.float != ( 'none' ) || @@ -84,7 +85,7 @@ function setrelative( nodes ) { } i++; } -} +}; // Expand links for printing String.prototype.hasClass = function( classWanted ) { @@ -95,11 +96,11 @@ String.prototype.hasClass = function( classWanted ) { } } return false; -} +}; -var expandedURLs; +window.expandedURLs = undefined; -onbeforeprint = function() { +window.onbeforeprint = function() { expandedURLs = []; var contentEl = document.getElementById( 'content' ); @@ -117,12 +118,12 @@ onbeforeprint = function() { } } } -} +}; -onafterprint = function() { +window.onafterprint = function() { for ( var i = 0; i < expandedURLs.length; i++ ) { if ( expandedURLs[i] ) { expandedURLs[i].removeNode( true ); } } -} +}; |