/*
  project: www.inmedias.de
  type: javascript
  ddescription: checks browser capabilities and initializes javascript functions
  first edited: 14.04.2003, Stefan Heimann
  last edited: 17.06.2005, Bernd Schnabel
  note: based on a javascript from Netscape DevEdge, http://devedge.netscape.com/
*/


/* global variables */
var dom;
var rootPath = '';
var assetPath = rootPath;

/* DOM methods and collections used in the script */
if (document.getElementsByTagName && document.getElementById
    && document.createElement && document.createTextNode
    && document.insertBefore && document.appendChild && document.replaceChild
    && (navigator.appName != 'Konqueror')) {
    dom = true;
}

/* get javascript files */
if (dom) {
    // unfortunately opera 7 (W32) has a problem inserting these javascript files via DOM Methods
    // so we do it the old-fashioned way ... :-( 
    document.write('<script type="text\/javascript" src="' + assetPath + 'js\/lib.js"><\/script>');
    document.write('<script type="text\/javascript" src="' + assetPath + 'js\/fontsizer.js"><\/script>');
    document.write('<script type="text\/javascript" src="' + assetPath + 'js\/styleswitcher.js"><\/script>');
} else if (document.layers) {
/* add extra stylesheet for Netscape Navigator 4.x */
    document.write('<link rel="stylesheet" type="text\/css" href="' + assetPath + 'css/screen/x_browser/nn4.css" media="screen" \/>');
}

/* onload has to take a function which exits for non DOM capable browsers */
function init() {
    setStyleSheetInternal();
    initTextSize();
}