// Determine platform and browser and use the appropriate style sheet
// Also adds a global boolean var for general browser detection - isIE
//

var cssPath = '/style/';
var isMac = (navigator.appVersion.indexOf("Mac") != -1);
var isIE = true;
var isIE6 = false;

// always load this CSS
//document.write('<LINK REL=STYLESHEET TYPE="text/css" HREF="' + cssPath + 'bso.css" TITLE="MASTER">');


debug = 0;

// Use CSS for PC / IE 4.0+
if((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 ) && (navigator.appVersion.indexOf("MSIE 7.0") == -1) && !isMac) {
  isIE6 = true;
  document.write('<link rel="stylesheet" href="' + cssPath + 'style-bso-ie6.css" type="text/css">');
  if (debug) alert("bso_ie6.css"); 
}
else if ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.indexOf("MSIE 7.0") > -1) && !isMac) {
  document.write('<link rel="stylesheet" href="' + cssPath + 'style-bso-ie7.css" type="text/css">');
  if (debug) alert("bso_ie7.css"); 
 
}
// Use CSS for PC / NN 4.0+
else if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4) && !isMac && (navigator.userAgent.toLowerCase().indexOf('safari')==-1)) {
  document.write('<link rel="stylesheet" href="' + cssPath + 'style-bso-firefox.css" type="text/css">');
	isIE = false;
  if (debug) alert("bso_firefox.css"); 
}
// Use CSS for MAC / IE 4.0+
else if ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4) && isMac) {
  document.write('<link rel="stylesheet" href="' + cssPath + 'style-bso-mac.css" type="text/css">');
  if (debug) alert("bso_mac.css"); 
  
}
// Use default
else if ( (navigator.userAgent.toLowerCase().indexOf('safari')!=-1)/*&&(navigator.userAgent.toLowerCase().indexOf('mac')!=-1 )*/ ) {
  document.write('<link rel="stylesheet" href="' + cssPath + 'style-bso-safari.css" type="text/css">'); // was safari.css
  if (debug) alert("bso_safari.css"); 
}
// Use CSS for MAC / NN 4.0+
else if ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4) && isMac) {
  document.write('<link rel="stylesheet" href="' + cssPath + 'style-bso-firefox.css" type="text/css">');
 	isIE = false;
  if (debug) alert("bso_firefox.css"); 

}


// themed stylesheets
//document.write('<link rel="stylesheet" href="' + cssPath + 'bso_theme_brown.css" type="text/css">');
//document.write('<link rel="stylesheet" href="' + cssPath + 'bso_theme_white.css" type="text/css">');
