// #################
// browserdetection
// #################
function browserdata(){
  this.vers  = navigator.appVersion.toLowerCase();
  this.agent = navigator.userAgent.toLowerCase();
  this.win   = this.agent.indexOf("win") != -1;
  this.mac   = this.agent.indexOf("mac") != -1;
  this.linux = this.agent.indexOf("inux") != -1;
  this.dom   = document.getElementById? 1 : 0;
  this.op5   = (this.agent.indexOf("opera 5") != -1)? 1 : 0;
  this.ie6   = (this.vers.indexOf("msie 6") != -1 && this.dom && !this.opera5) ? 1 : 0;
  this.ie5   = (this.vers.indexOf("msie 5") != -1 && this.dom && !this.opera5) ? 1 : 0;
  this.ie4   = (document.all && !this.dom && !this.opera5)? 1 : 0;
  this.ie    = this.ie4 || this.ie5 || this.ie6;
  this.ns6   = (this.dom && parseInt(this.vers) >= 5)? 1 : 0;
  this.ns4   = (document.layers && !this.dom)? 1 : 0 ;
  this.ns    = this.ns4 || this.ns6;
  this.dhtml = (this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.op5);
  return this;
}

brwsr = new browserdata();
// ##################
// select stylesheet
// ##################
var usestyle = '<link rel="STYLESHEET" type="text/css" href="../../styles/pcie.css">' // default stylesheet (IE4+ on a PC)
if (brwsr.ns6)      // use this stylesheet for Netscape6+
    usestyle = '<link rel="STYLESHEET" type="text/css" href="../../styles/ns6.css">';
else if (brwsr.ns4 && !brwsr.mac)         // use this stylesheet for Netscape4+ on a PC
    usestyle = '<link rel="STYLESHEET" type="text/css" href="../../styles/pcns4.css">';
else if (brwsr.ns4 && brwsr.mac)     // use this stylesheet for Netscape4+ on a Mac
    usestyle = '<link rel="STYLESHEET" type="text/css" href="../../styles/macns4.css">';
else if (brwsr.ie5 && brwsr.mac)      // use this stylesheet for InternetExplorer5+ on a Mac
    usestyle = '<link rel="STYLESHEET" type="text/css" href="../../styles/macie5.css">';
else if (brwsr.ie4 && brwsr.mac)      // use this stylesheet for InternetExplorer4+ on a Mac
    usestyle = '<link rel="STYLESHEET" type="text/css" href="../../styles/macie4.css">';
document.writeln(usestyle);