/* getStylesheet.js
 * Make link to cascading stylesheets according to browser/OS.
 *  - They are *cascading*, i.e., we call the default stylesheet 
 *    in the page, in case they have javascript turned off
 *    (defaulting to the most common, MSIE browsers), and then
 *    provide stylesheet with diffs for other browsers/OSs.
 *
 *   5 jun 2003 - wrote.
 */

  // All our stylesheets begin with this name:
  var cssname = 'ecotibet';
  var csslib  = '/lib/';
  // Our common stuff:
  var stylesheet_beg = '<link rel="stylesheet" type="text/css" media="all" href="';
  var stylesheet_end = '" />';
  // Now determine OS and browser, and give alternate(s):
  var name = navigator.appName;
  var version = navigator.appVersion;
  // var agent = navigator.userAgent;

  var stylesheet = '';

  // Now determine OS and browser, and give alternate(s):
  if ( navigator.appVersion.indexOf("X11") > 0 ) {
    stylesheet = cssname + '-linux.css';
  }
  if ( navigator.appName.indexOf("Mozilla") > 0 ) {
    stylesheet = cssname + '-linux.css';
  }
  if ( navigator.appName.indexOf("Netscape") > 0 ) {
    stylesheet = cssname + '-linux.css';
  }
  if ( navigator.appVersion.indexOf("Mac") > 0 ) {
    stylesheet = cssname + '-mac.css';
  }

  document.write(stylesheet_beg + csslib + stylesheet + stylesheet_end);

// -- EOF 

