// Determine platform and browser and use the appropriate style sheet
// Also adds a global boolean var for general browser detection - isIE
//

var cssPath = contextroot + "style/";
var isMac = (navigator.appVersion.indexOf("Mac") != -1);
var isIE = true;

// always load this CSS
//document.write('<LINK REL=STYLESHEET TYPE="text/css" HREF="' + cssPath + 'nycoStyles.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) {
  document.write('<link rel="stylesheet" href="' + cssPath + 'nyco_ie6.css" type="text/css">');
  if (debug) alert("nyco_ie6.css"); 
}
else if ((navigator.appName == "Microsoft Internet Explorer") && (navigator.appVersion.indexOf("MSIE 7.0") > -1) && !isMac) {
  document.write('<link rel="stylesheet" href="' + cssPath + 'nyco_ie7.css" type="text/css">');
  if (debug) alert("nyco_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 + 'nyco_firefox.css" type="text/css">');
	isIE = false;
  if (debug) alert("nyco_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 + 'nyco_mac.css" type="text/css">');
  if (debug) alert("nyco_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 + 'nyco_safari.css" type="text/css">'); // was safari.css
  if (debug) alert("nyco_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 + 'nyco_firefox.css" type="text/css">');
 	isIE = false;
  if (debug) alert("nyco_firefox.css"); 

}



