    var agt=navigator.userAgent.toLowerCase();


    // BROWSER VERSION
    var is_major		= parseInt(navigator.appVersion);
    var is_minor		= parseFloat(navigator.appVersion);
    var is_nav  		= ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                		&& (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                		&& (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    var is_nav4			= (is_nav && (is_major == 4));
    var is_nav4up		= (is_nav && (is_major >= 4));
    var is_navonly 		= (is_nav && ((agt.indexOf(";nav") != -1) || (agt.indexOf("; nav") != -1)) );
    var is_nav6			= (is_nav && (is_major == 5));
    var is_nav6up		= (is_nav && (is_major >= 5));
    var is_gecko		= (agt.indexOf('gecko') != -1);
    var is_ie			= ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
    var is_ie5			= (is_ie && (is_major == 4) && (agt.indexOf("msie 5")!=-1) );
    var is_opera		= (agt.indexOf("opera") != -1);

    // PLATFORM DETECTION
    var is_win			= ( (agt.indexOf("win")!=-1) || (agt.indexOf("16bit")!=-1) );
    var is_mac			= (agt.indexOf("mac")!=-1);

	// STYLESHEET PATHBUILDING
	var platform;
	var browser;
	var path 			= cssPath;

	if (is_mac) platform		= "mac";
	else if (is_win) platform	= "win";
	else platform 				= "win";

	//ALERT
	/*alert('isnav : ' +  is_nav);
	alert('isie5 : ' +  is_ie5);
	alert('isie :  ' +  is_ie);
	alert('cssPath : ' + cssPath);
	alert('iswin : ' + is_win);*/


	// NOW SENDING 'M A C' STYLESHEET TO BROWSER
	if ((is_mac) && (is_ie))				document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
	if ((is_mac) && (is_nav))				document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
	if ((is_mac) && (is_opera))				document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
	if ((is_mac) && (is_nav4))				document.write ('<link rel="stylesheet" href="' + path + 'mac' + '_ns4.css' + '" type="text/css">');
	// NOW SENDING 'P C' STYLESHEET TO BROWSER
	if ((is_win) && (is_nav) != (is_nav4))	document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
	if ((is_win) && (is_nav4))				document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ns.css' + '" type="text/css">');
	if ((is_win) && (is_ie) && !(is_ie5))   document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
	if ((is_win) && (is_ie5))               document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie5.css' + '" type="text/css">');
	if ((is_win) && (is_opera))				document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
	// IF PLATFORM IS DIFFERENT THAN MAC OR PC
	if ((is_mac != true) && is_win != true) document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css' + '" type="text/css">');
	// REMOVE UNSUPPORTED FEATURES FOR SPECIFIC BROWSERS
	//if (is_ie5) 							document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css" type="text/css">');
	//if (is_opera)							document.write ('<link rel="stylesheet" href="' + path + 'win' + '_ie.css" type="text/css">');