//****c* XTools/XEvents // NAME // XStyle // // DESCRIPTION // Manipula folhas de estilo // // AUTHOR // Rodrigo Souza dos Santos // |html
rodrigo.souza@celepar.pr.gov.br // |html
rodrigosouzadossantos@gmail.com // //****** // You can use this space for remarks that should not be included // in the documentation. // ( function( ) { var _head = null; var _new = [ ]; var _loaded = [ ]; function _add( ) { if ( ! ( arguments.length && arguments[ 0 ] && arguments[ 0 ].constructor == String ) ) return false; for ( var i = 0; i < _loaded; i++ ) if ( _loaded[ i ] == arguments[ 0 ] ) return false; if ( _head ) _style( arguments[ 0 ] ); else _new[ _new.length ] = arguments[ 0 ]; } function _style( ) { if ( ! ( arguments.length && arguments[ 0 ] && arguments[ 0 ].constructor == String ) ) return false; var _sheet = document.createElement( 'link' ); _sheet.setAttribute( 'href', arguments[ 0 ] ); _sheet.setAttribute( 'rel', 'StyleSheet' ); _sheet.setAttribute( 'type', 'text/css' ); _head.appendChild( _sheet ); return true; } function Style( ) { } Style.prototype.add = _add; window.XStyle = new Style; XEvents.add( window, 'onload', function( ) { _head = document.getElementsByTagName( 'head' ).item( 0 ); for ( var i = 0; i < _new.length; i++ ) _style( _new[ i ] ); } ); } )( );