//This JavaScript accomplishes two tasks: sniffs for browsers/platform and writes style sheets 
//according to browser/platform. 

function Is () 
{   // convert all characters to lowercase to simplify testing 
    var agt=navigator.userAgent.toLowerCase(); 

    // *** BROWSER VERSION *** 
    // Note: On IE5, these return 4, so use is.ie5up to detect IE5. 
    this.major = parseInt(navigator.appVersion); 
    this.minor = parseFloat(navigator.appVersion); 

    this.nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1) 
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1) 
                && (agt.indexOf('webtv')==-1)); 
    this.nav2 = (this.nav && (this.major == 2)); 
    this.nav3 = (this.nav && (this.major == 3)); 
    this.nav4 = (this.nav && (this.major == 4)); 
    this.nav4up = (this.nav && (this.major >= 4)); 
    this.navonly      = (this.nav && ((agt.indexOf(";nav") != -1) || 
                          (agt.indexOf("; nav") != -1)) ); 
  this.nav5 = (this.nav && (this.major == 5)); 
   this.nav5up = (this.nav && (this.major >= 5)); 

    this.ie   = (agt.indexOf("msie") != -1); 
    this.ie3  = (this.ie && (this.major < 4)); 
    this.ie4  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")==-1) ); 
    this.ie4up  = (this.ie  && (this.major >= 4)); 
   this.ie5  = (this.ie && (this.major == 4) && (agt.indexOf("msie 5.0")!=-1) ); 
   this.ie5up  = (this.ie  && !this.ie3 && !this.ie4); 

   
    // *** JAVASCRIPT VERSION CHECK *** 
    if (this.nav2 || this.ie3) this.js = 1.0 
    else if (this.nav3 || this.opera) this.js = 1.1 
    else if ((this.nav4 && (this.minor <= 4.05)) || this.ie4) this.js = 1.2 
    else if ((this.nav4 && (this.minor > 4.05)) || this.ie5) this.js = 1.3 
    else if (this.nav5) this.js = 1.4 
    // NOTE: In the future, update this code when newer versions of JS 
    // are released. For now, we try to provide some upward compatibility 
    // so that future versions of Nav and IE will show they are at 
    // *least* JS 1.x capable. Always check for JS version compatibility 
    // with > or >=. 
    else if (this.nav && (this.major > 5)) this.js = 1.4 
    else if (this.ie && (this.major > 5)) this.js = 1.3 
    // HACK: no idea for other browsers; always check for JS version with > or >= 
    else this.js = 0.0; 

    // *** PLATFORM *** 
    this.win   = ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) ); 
    
    this.mac    = (agt.indexOf("mac")!=-1); 
    this.macppc = (this.mac && ((agt.indexOf("ppc")!=-1) || 
                               (agt.indexOf("powerpc")!=-1))); 
    this.linux = (agt.indexOf("inux")!=-1); 
    
}

//Write the Style Sheet



var is; 
is = new Is();

if (is.win && is.nav4up){
      document.write("<style type='text/css'><!--  #pageillustration{font-family: 11px verdana, arial, helvetica, sans-serif; margin: 0px; color: #333333; position: absolute; left:0px; top:82px; height: 99px; width: 700px; background-color: #669933;  layer-background-color: #669933;  height: 99px; padding-bottom: 0px;} --></style>");
    } 



else if (is.win && is.ie || is.win && is.nav5up){
        document.write("<style type='text/css'><!--  #pageillustration{font-family: 11px verdana, arial, helvetica, sans-serif; margin: 0px; color: #333333; position: absolute; left:0px; top:82px; height: 99px; width: 700px; background-color: #669933; layer-background-color: #669933; height: 99px;  padding-bottom: 0px;} --></style>");
        }



else if (is.mac && is.nav4up){
        document.write("<style type='text/css'><!--  #pageillustration{font-family: 11px verdana, arial, helvetica, sans-serif; margin: 0px; color: #333333; position: absolute; left:0px; top:82px; height: 99px; width: 700px; background-color: #669933;  layer-background-color: #669933;} --></style>");
        }

if (is.mac && is.nav5up){
        document.write("<style type='text/css'><!--  #pageillustration{font-family: 11px verdana, arial, helvetica, sans-serif; margin: 0px; color: #333333; position: absolute; left:0px; top:82px; height: 99px; width: 700px; background-color: #669933;  layer-background-color: #669933;} --></style>");
    } 
		
else if (is.mac && is.ie4){
        document.write("<style type='text/css'><!--  #pageillustration{font-family: 11px verdana, arial, helvetica, sans-serif; margin: 0px; color: #333333; position: absolute; left:0px; top:82px; height: 99px; width: 700px; z-index: -5; background-color: #669933; } --></style>");
        }

else if (is.mac && is.ie5){
       document.write("<style type='text/css'><!--  #pageillustration{font-family: 11px verdana, arial, helvetica, sans-serif; margin: 0px; color: #333333; position: absolute; left:0px; top:82px; height: 99px; width: 700px; z-index: -5; background-color: #669933;} --></style>");
        }
        
else if (is.linux && is.nav){
        document.write("<style type='text/css'><!--  #pageillustration{font-family: 11px verdana, arial, helvetica, sans-serif; margin: 0px; color: #333333; position: absolute; left:0px; top:82px; height: 99px; width: 700px; background-color: #669933; background: #669933; vertical-align: middle; layer-background-color: #669933;} --></style>");
        }

