/**
 * glossar window functions
 *
 * @author <a href="mailto:vsctech@fiz-chemie.de">Eike Jordan</a>
 * @version  $Revision: 11074 $
 *
 * $HeadURL: http://trac.gruen.fiz-chemie.de/svn/vs/vscms/trunk/src/vsengine/static/javascript/init-glossar.js $
 *
 * Copyright 2004,2007 FIZ CHEMIE Berlin
 */

/**
 *  Changes:
 *
 */

/**
 * ToDo:
 *
 */

/**
   global variables

*/

var _rootname = 'gloss';
var _tabsname = 'footer';

function init() {

    if (! browser.plugins.mathml()) {
        Common.replaceMathML();
    }
    // Test auf Dummy-Eintrag
    _dummy = document.getElementById('dummy');
    if (!_dummy) {
        mtoggle('entries');
    } else {
        mtoggle('ref');
    }
    _glossdiv = document.getElementById('gloss');
    if (document.body && document.body.currentStyle && !window.opera) {
    // Opera hat keine Unterstuetzung fuer die erweiterten
    // Javascript Methoden :-(
    // http://www.opera.com/docs/specs/js/dom/css/
        _current_fontSize = parseInt(document.body.currentStyle.fontSize);
        _header_space = parseInt(_current_fontSize  * 2);
//         alert('_current_fontSize: [' + _current_fontSize +
//               ']\n_header_space: [' + _header_space +
//               ']\nCommon.getInsideWindowHeight: [' + Common.getInsideWindowHeight() + ']');
        _glossdiv.style.height = (Common.getInsideWindowHeight() - (2 * _header_space))+'px';
    }
        //  window.setTimeout("mtoggle('entries')",500);
        //  window.setTimeout("mtoggle('ref')",3500);
        //  window.setTimeout("mtoggle('search')",6500);

    // link target modifications
    Common.setLinkTarget();
    // aktivate molecule rendering; wait for browser object init
    Common.activateMolecules();
    Common.activateApplets();
    Common.activateModels();
    // Common.LimeSurvey();
}

Common.addLoadEventListener(init);
