

//　Macintosh           　->  MacOS
//　Windows95/98/NT/2000/XP  ->　Windows
//　UNIX                  ->　UNIX
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 "";
}
//　Netscape Navigator ->  Netscape
//　Internet Explorer  ->　Explorer
//　Safari  ->　Safari
//　Opera  ->　Opera
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 (aName.indexOf("NETSCAPE") >= 0)  return "Netscape";
    if (aName.indexOf("MICROSOFT") >= 0) return "Explorer";
    return "";
}
function getBrowserVersion()
{
	var browser = getBrowserName();
	var version = 0;
	var s = 0;
	var e = 0;
	var appVer  = navigator.appVersion;
	var uName  = navigator.userAgent.toUpperCase();
	if (browser == "Safari")
	{
		version = eval(appVer.substring(0,3)) - 4;
	}
	if (browser == "Opera")
	{
		s = uName.indexOf("OPERA ",0) + 6;
		e = uName.indexOf(" ",s);
		version = eval(uName.substring(s,e));
	}
	if (browser == "Netscape")
	{
		s = appVer.indexOf(" ",0);
		version = eval(appVer.substring(0,s));
		if (version >= 5) version++;
	}
	if (browser == "Explorer")
	{
		appVer  = navigator.userAgent;
		s = appVer.indexOf("MSIE ",0) + 5;
		e = appVer.indexOf(";",s);
		version = eval(appVer.substring(s,e));
	}
	return version;
}

os      = getOSType();
browser = getBrowserName();
version = getBrowserVersion();
if (os == "MacOS")   dirName = "mac_";
if (os == "Windows") dirName = "win_";
if (os == "UNIX")    dirName = "unix_";
if (browser == "Netscape") dirName += "nn";
if (browser == "Explorer") dirName += "ie";
if (browser == "Safari") dirName += "saf";
if (browser == "Opera") dirName += "op";
if ((version >= 1) && (version < 2))   dirName += "1";
if ((version >= 2) && (version < 3))   dirName += "2";
if ((version >= 3) && (version < 4))   dirName += "3";
if ((version >= 4) && (version < 5))   dirName += "4";
if ((version >= 5) && (version < 5.5)) dirName += "5";
if ((version >= 5.5) && (version < 6)) dirName += "5.5";
if ((version >= 6) && (version < 7))   dirName += "6";
if ((version >= 7) && (version < 8))   dirName += "7";


document.write('<style type="text/css">');
document.write('<!--');
document.write('body {background-color: #FFFFFF;margin-left: 0px;margin-top: 0px;margin-right: 0px;margin-bottom: 0px;}');
document.write('a:link {color: #0083BA;}');
document.write('a:visited {color: #0083BA;}');
document.write('a:hover {color: #182D7A;}');
document.write('a:active {color: #0083BA;}');
document.write('.black {color: #000000;}');
document.write('.gray {color: #333333;}');
document.write('.white {color: #FFFFFF;}');
document.write('.orange {color: #FF6600;}');
document.write('.blue {color: #0033FF;}');

if ((dirName == "win_ie5.5") || (dirName == "win_ie6"))
{
document.write('body,td,th {font-size: 12px;color: #333333; font-family: Arial, Helvetica, sans-serif;}');
//document.write('.size10 {  font-size: 10px; line-height: 140%;}');
document.write('.size12 {  font-size: 12px; line-height: 140%;}');
document.write('.size16 {  font-size: 16px; line-height: 140%;}');
document.write('.size24 {  font-size: 24px; line-height: 140%;}');
}
else if (dirName == "win_nn4") 
{
document.write('body,td,th {font-size: 14px;color: #333333;}');
//document.write('.size10 {  font-size: 12px; line-height: 100%;}');
document.write('.size12 {  font-size: 14px; line-height: 140%;}');
document.write('.size16 {  font-size: 18px; line-height: 140%;}');
document.write('.size24 {  font-size: 24px; line-height: 140%;}');
}
else if (dirName == "win_nn6") 
{
document.write('body,td,th {font-size: 12px;color: #333333; font-family: Arial, Helvetica, sans-serif;}');
document.write('.size10 {  font-size: 10px; line-height: 140%;}');
document.write('.size12 {  font-size: 12px; line-height: 140%;}');
document.write('.size16 {  font-size: 16px; line-height: 140%;}');
document.write('.size24 {  font-size: 24px; line-height: 140%;}');
}
else if (dirName == "mac_ie5") 
{
document.write('body,td,th {font-size: 12px;color: #333333; line-height: 140%; font-family: Arial, Helvetica, sans-serif;}');
document.write('.size10 {  font-size: 10px; line-height: 140%;}');
document.write('.size12 {  font-size: 12px; line-height: 140%;}');
document.write('.size16 {  font-size: 16px; line-height: 140%;}');
document.write('.size24 {  font-size: 18px; line-height: 140%; font-weight:bolder;}');
}
else if (dirName == "mac_nn4") 
{
document.write('body,td,th {font-size: 12px;color: #333333;}');
document.write('.size10 {  font-size: 10px; line-height: 140%;}');
document.write('.size12 {  font-size: 12px; line-height: 140%;}');
document.write('.size16 {  font-size: 18px; line-height: 140%;}');
document.write('.size24 {  font-size: 24px; line-height: 140%;}');
}
else if (dirName == "mac_nn6") 
{
document.write('body,td,th {font-size: 12px;color: #333333; line-height: 140%; font-family: Arial, Helvetica, sans-serif;}');
document.write('.size10 {  font-size: 10px; line-height: 140%;}');
document.write('.size12 {  font-size: 12px; line-height: 140%;}');
document.write('.size16 {  font-size: 18px; line-height: 140%;}');
document.write('.size24 {  font-size: 24px; line-height: 140%;}');
}
else if (dirName == "mac_saf1") 
{
document.write('body,td,th {font-size: 14px;color: #333333; line-height: 140%; font-family: Arial, Helvetica, sans-serif;}');
document.write('.size10 {  font-size: 10px; line-height: 140%;}');
document.write('.size12 {  font-size: 14px; line-height: 140%;}');
document.write('.size16 {  font-size: 16px; line-height: 140%;}');
document.write('.size24 {  font-size: 24px; line-height: 140%;}');
}
else
{
document.write('body,td,th {font-size: 12px;color: #333333; line-height: 140%; font-family: Arial, Helvetica, sans-serif;}');
document.write('.size10 {  font-size: 10px; line-height: 140%;}');
document.write('.size12 {  font-size: 12px; line-height: 140%;}');
document.write('.size16 {  font-size: 16px; line-height: 140%;}');
document.write('.size24 {  font-size: 24px; line-height: 140%;}');
}

document.write('-->');
document.write('</style>');
