function getOSType()

{

var RetCode="";

var uAgent=navigator.userAgent.toUpperCase();

if (uAgent.indexOf("MAC")>=0) RetCode="MacOS";

if (uAgent.indexOf("WIN")>=0) RetCode="Windows";

if (uAgent.indexOf("X11")>=0) RetCode="UNIX";



return RetCode;

}



function getBrowserName()

{

var aName=navigator.appName.toUpperCase();

var uName=navigator.userAgent.toUpperCase();

if (aName.indexOf("NETSCAPE")>=0) return "Netscape";

if (aName.indexOf("MICROSOFT")>=0) return "Explorer";

return "";

}



function setCSS(theURL)

{

var os=getOSType();

var browser=getBrowserName();



var dirName=theURL;

if (os =="MacOS") dirName="mac/";

if (os =="Windows") dirName="win/";

if (os =="UNIX") dirName="unix/";

if (browser =="Netscape") dirName +="nn.css";

if (browser =="Explorer") dirName +="ie.css";



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

}

