//CSS select

function getOSType()
{
    var uAgent  = navigator.userAgent.toUpperCase();
    if (uAgent.indexOf("MAC") >= 0) return "MacOS";
    if (uAgent.indexOf("WIN") >= 0) return "Windows";
    if (uAgent.indexOf("X11") >= 0) return "UNIX";
    return "";
}

function getBrowserName()
{
    var aName  = navigator.appName.toUpperCase();
    var uName = navigator.userAgent.toUpperCase();
    if (uName.indexOf("SAFARI") >= 0)  return "Safari";
    if (uName.indexOf("OPERA") >= 0)  return "Opera";
    if (uName.indexOf("FIREFOX") >= 0)  return "Firefox";
    if (aName.indexOf("NETSCAPE") >= 0)  return "Netscape";
    if (aName.indexOf("MICROSOFT") >= 0) return "Explorer";
    return "";
}

var os      = getOSType();
var browser = getBrowserName();
if (os == "MacOS")   var dirName = "mac/";
if (os == "Windows") var dirName = "win/";
if (os == "UNIX")    var dirName = "unix/";
if (browser == "Firefox") dirName += "ff.css";
if (browser == "Netscape") dirName += "nn.css";
if (browser == "Explorer") dirName += "ie.css";
if (browser == "Safari") dirName += "saf.css";
if (browser == "Opera") dirName += "op.css";

document.write("<link rel='stylesheet' href='css/"+dirName+"' type='text/css'>");

//End of CSS select