( function( ) { var _configuration = ExpressoLivre( ).JSON( ); var _xconnector = null; var _xlink = null; window.array_lang = [ ]; var _language = [ ] function _go( ) { _xconnector.go.apply( _xconnector, arguments ); } function _lang( ) { if ( ! ( arguments.length && arguments[ 0 ].constructor == String ) ) return false; var module = arguments[ 0 ]; var lang = document.getElementsByTagName( 'html' ).item( 0 ).getAttribute( 'xml:lang' ); _xconnector.go( { 'access' : 'phpgwapi.expressolivre.lang&lang=' + lang + '&module=' + module, 'cache' : true, 'handler' : function( data ) { data = data.JSON( ); for ( var key in data ) window.array_lang[ key ] = _language[ key ] = data[ key ]; } } ); } function _link( ) { _xlink.click.apply( _xlink, arguments ); } function _path( ) { return window.location.protocol + "//" + window.location.host + _configuration.url; } function _template( ) { return _configuration.template; } function _theme( ) { return _configuration.theme; } function _translate( ) { if ( ! ( arguments.length && arguments[ 0 ].constructor == String ) ) return false; var _phrase = arguments[ 0 ]; if ( _language[ _phrase.toLowerCase( ) ] ) return _language[ _phrase.toLowerCase( ) ]; else return _phrase + '*'; } function _ExpressoLivre( ) { return ( new function( ) { this.go = _go; this.lang = _lang; this.link = _link; this.path = _path; this.theme = _theme; this.template = _template; this.translate = _translate; } ); } window.ExpressoLivre = _ExpressoLivre( ); _xlink = new XLink( ExpressoLivre.path( ) ); _xconnector = new XConnector( { "path" : ExpressoLivre.path( ), "controller" : "?menuaction=" } ); XEvents.add( window, 'onload', function( ) { document.getElementsByTagName( 'body' ).item( 0 ).style.overflowY = 'scroll'; var _scripts = document.getElementsByTagName( 'head' ).item( 0 ).getElementsByTagName( 'script' ); var _loaded = [ ]; for ( var i = 0; i < _scripts.length; i++ ) if ( _scripts.item( i ).getAttribute( 'src' ) != null ) _loaded[ _loaded.length ] = _scripts.item( i ).getAttribute( 'src' ).substr( _path.length - 1, _scripts.item( i ).getAttribute( 'src' ).indexOf( '?' ) - _path.length + 1 ); new XScript( _loaded ); var _links = document.getElementsByTagName( 'a' ); for ( var i = 0; i < _links.length; i++ ) _xlink.intercept( _links.item( i ) ); } ); } )( );