// Browser & platform check for corresponding CSS

var platform = navigator.platform;
var browser = navigator.appName;
var bversion = parseInt(navigator.appVersion);
var protocol = location.protocol;
var path = location.pathname;
var pathCount;
var pathArray; 
var dirPath;

var relPath = '<link rel="stylesheet" type="text/css" href="';

if (protocol == "http:") {
	dirPath = 0;
	relPath += "/empldoc/"
} else if (protocol == "file:") {
	var delimiter;
	if (browser=="Netscape") { 
		delimiter = '/';
		pathCount=6;
	} else {
		delimiter = '\\';
		pathCount=5;
	}
	pathArray = location.pathname.split(delimiter);
	dirPath = pathArray.length - pathCount;
}

while (dirPath > 0) {
	relPath += ".." + delimiter;
	dirPath--;
}

var nnCSS =  relPath + 'd-nn.css\">';		// ** nnCSS still needs to be fixed
var nnMacCSS = relPath + 'd-nn-mac.css\">';
var ieCSS = relPath + 'default.css\">';

/*  NETSCAPE 5+ USES ieCSS  
if (browser == "Netscape" && parseInt(navigator.appVersion) < 5) {
	if (platform.substring(0,3) == "Mac") document.write(nnMacCSS);
	else document.write(nnCSS);		// ** if problems, use ieCSS default 
} else document.write(ieCSS);
*/


if (browser == "Netscape") {
	if (platform.substring(0,3) == "Mac") document.write(nnMacCSS);
	else document.write(nnCSS);		// ** if problems, use ieCSS default 
} else document.write(ieCSS);
