    var agt=navigator.userAgent.toLowerCase();

    // *** BROWSER VERSION ***
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);

    // Note: Opera and WebTV spoof Navigator.  We do strict client detection.
    // If you want to allow spoofing, take out the tests for opera and webtv.
    this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    this.nav6up = (this.nav && (this.major >= 5));

    this.ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    this.ie3    = (this.ie && (this.major < 4));
    this.ie4    = (this.ie && (this.major == 4) && (agt.indexOf("msie 4")!=-1) );
    this.ie4up  = (this.ie  && (this.major >= 4));
    this.ie5    = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) );
    this.ie5_5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.5") !=-1));
    this.ie5up  = (this.ie  && !this.ie3 && !this.ie4);
    this.ie5_5up =(this.ie && !this.ie3 && !this.ie4 && !this.ie5);
    this.ie6    = (this.ie && (this.major == 4) && (agt.indexOf("msie 6.")!=-1) );
    this.ie6up  = (this.ie  && !this.ie3 && !this.ie4 && !this.ie5 && !this.ie5_5);

    // *** PLATFORM ***
    this.win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    this.mac    = (agt.indexOf("mac")!=-1);

    if (this.mac) 
    {
 	if (this.ie5up || this.nav6up)  
 	{
		document.write('<LINK REL=StyleSheet HREF="/css/mac_ie.css" TYPE="text/css" />'); 
	}
	else  
	{
		document.write('<LINK REL=StyleSheet HREF="/css/mac_ns.css" TYPE="text/css" />'); 
	}
    }
    else  
    {
	if  (this.ie5up)  
	{
		document.write('<LINK REL=StyleSheet HREF="/css/win_ie.css" TYPE="text/css" />'); 
	}
	else
	{
		document.write('<LINK REL=StyleSheet HREF="/css/win_ns.css" TYPE="text/css" />'); 
	}
     }
