var OpSys="Other";

var vers = navigator.appVersion;

if (navigator.appName == "Microsoft Internet Explorer") {
 pos = vers.lastIndexOf('.'); // find last period (the dot like in 3.0)
 vers = vers.substring(pos-1,vers.length); // eliminate everything before pos-1
}

vers = parseFloat(vers); // pick the number off the front of vers

if(navigator.userAgent.indexOf('Win')!=-1){

	if (navigator.userAgent.indexOf('95')!=-1){
			OpSys="Windows95";
			whichbrowser(OpSys,vers) 
		}
        else if(navigator.userAgent.indexOf('98')!=-1){
			OpSys="Windows95";
			whichbrowser(OpSys,vers)  
		}
        else if(navigator.userAgent.indexOf('Win')!=-1){
			OpSys="Windows3.1 or NT";
			whichbrowser(OpSys,vers) 
		}
	}
    
else if(navigator.userAgent.indexOf('Mac') != -1){
	OpSys="Macintosh";
	whichbrowser(OpSys,vers) 		
	//put link to other style here    
}


function whichbrowser(opsystem,opversion){
	if (navigator.appName == "Microsoft Internet Explorer" && opsystem=="Macintosh"){
		document.write('<link href="/nav-includes/stylesheets/stylesheet_iemac.css" rel="STYLESHEET" type="text/css">');
//document.write('iemac.css');
	}	
	else if (navigator.appName == "Netscape" && opsystem=="Macintosh" && opversion < 5){
		document.write('<link href="/nav-includes/stylesheets/stylesheet_nnmac.css" rel="STYLESHEET" type="text/css">');
//document.write('nnmac.css');
		}
		
	// Mac and Netscape 5 or above - ie Netscape 6
	else if (navigator.appName == "Netscape" && opsystem=="Macintosh"){
		document.write('<link href="/nav-includes/stylesheets/stylesheet_netmac6.css" rel="STYLESHEET" type="text/css">');
//document.write('netmac6.css');
	         }
	
	// not mac assume windows
	else if (navigator.appName == "Microsoft Internet Explorer"){
		document.write('<link href="/nav-includes/stylesheets/stylesheet_iewin.css" rel="STYLESHEET" type="text/css">');
//document.write('iewin.css');

	}
	else if (opversion < 5) {
		document.write('<link href="/nav-includes/stylesheets/stylesheet_nnwin.css" rel="STYLESHEET" type="text/css">'); 
//document.write('nnwin.css');
	}
	else {
		document.write('<link href="/nav-includes/stylesheets/stylesheet_nn6.css" rel="STYLESHEET" type="text/css">'); 
//document.write('nn6.css');
	}
}

function openExternalURL(url)
{	window.open( url, 'external' );
}

