// Files and directory structures
var cssDir = "/styles/";
var winNSCSS = "style_pcn.css";
var winIECSS = "style_ie.css";
var macCSS = "style_macn.css";
var unixCSS = "style_linux.css";

// convert all characters to lowercase to simplify testing 
var agt=navigator.userAgent.toLowerCase(); 


//  Select the appropriate stylesheet
if ((is_nav4up || is_ie4up) || (!is_nav && !is_ie)) {
  ChooseStyleSheet();
}


// Function to choose the style sheet for use based on the platform and browser version
function ChooseStyleSheet() {

var fileHead = cssDir;
var styles;

//Windows
if (is_win) {
  //Netscape Win
  if (is_nav) {
    styles = fileHead + winNSCSS;
  } 
  else 
  {
  // Windows Netscape fonts need to be larger than those for IE
  styles = fileHead + winIECSS;
  }
} 

//Mac
else if (is_mac) {
  //Internet Explorer 5
  if (is_ie5up) {
    // Default font settings for Mac IE5 match Win IE fonts
    styles = fileHead + winIECSS;
  }
  else
  {
    //rest of Mac
    styles = fileHead + macCSS;
  }
} 

//Unix
else if (is_unix) {
  styles = fileHead + unixCSS;
}

//rest
else 
{
  // Default style = macCSS,
  // Macintosh stylesheets have the largest font sizes, which will ensure readability
  styles = fileHead + macCSS;
}

  document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"" + styles + "\">");
  return true;
}
