<!--  
function nop(strMessage, strURL, strLine) {return true;}
window.onerror = nop;
              
var brsr;
var plat;
var vers, minorVersion, majorVersion;
var userAgentString;
var indexOfVersionStart, indexOfVersionEnd;

brsr = navigator.appName;
vers = navigator.appVersion;
plat = navigator.platform;
userAgentString = navigator.userAgent;

//The next to code blocks pull out the major and minor versions from the Browsers appVersion reply
//IE version
if (brsr=="Microsoft Internet Explorer"){
	//Get the detailed minor and major version information
	//If IE version 3 then the string is in a different format (<4)
	if (vers<"4") {
		majorVersion="3"
		minorVersion="0"
		plat = "Unknown"
		}
	else {
		//The IE version is labelled as MSIE and the information is ";" delimited ending in ")"
		indexOfVersionStart = vers.indexOf("MSIE ", 0)
		if (indexOfVersionStart!=-1) {
			//MSIE version found in string, look for the ";" delimiter
			indexOfVersionEnd = vers.indexOf(";", indexOfVersionStart)
			//May be the last item in the list (!)
			if (indexOfVersionEnd == -1) {
				vers.indexOf(")", indexOfVersionStart);}
			if (indexOfVersionEnd != -1) {
				//We have the start of "MSIE " and the end of the limiter ";" or ")"
				dotLocation = vers.indexOf(".", indexOfVersionStart);
				//If we don't have a dot in the version then consider it invalid
				if (dotLocation!=-1) {
					majorVersion = vers.substring( indexOfVersionStart+5, dotLocation )
					minorVersion = vers.substring( dotLocation+1, indexOfVersionEnd)
					}
				}
			}
			//Platform String
			if (plat.length>=3) {plat = plat.substring(0,3)}
		}
	if (minorVersion==null) {minorVersion=="0"}
	if (majorVersion==null) {minorVersion=="3"}
	}

//Netscape version
if (brsr=="Netscape"){
	//Check for version 3 which doesn't support indexOf etc.
	//The version type of the version string will be less than 4 if it is a version 3 browser
	if (vers<"4") {
		majorVersion="3"
		minorVersion="0"
		plat = "Unknown"
		}
	else {
		//Check for version 6
		if (userAgentString.indexOf( "Netscape6", 0 ) != -1) {
			majorVersion="6"
			minorVersion="0"
			}
		else if (userAgentString.indexOf( "Netscape/7", 0 ) != -1) {
			majorVersion="7"
			minorVersion="0"
			}
		else {
			//Assume 4 or 5 and use the vers string
			//Get the detailed minor and major version information
			//The IE version is at the front of the version string, space delimited
			indexOfVersionStart = 0
			indexOfVersionEnd = vers.indexOf(" ", indexOfVersionStart)
			if (indexOfVersionEnd>0) {
				dotLocation = vers.indexOf(".", indexOfVersionStart);
				//If we don't have a dot in the version then consider it invalid
				if (dotLocation!=-1) {
					majorVersion = vers.substring( indexOfVersionStart, dotLocation )
					minorVersion = vers.substring( dotLocation+1, indexOfVersionEnd)
					}
				}
			if (minorVersion==null) {minorVersion=="0"}
			if (majorVersion==null) {minorVersion=="3"}
			}
			//Platform String
			if (plat.length>=3) {plat = plat.substring(0,3)}
		}
	}

//Style sheet switches according to platform, browser and version
var sCSS
if ((brsr=="Microsoft Internet Explorer")&&(plat=="Win")){
	if (majorVersion=="4"){
		sCSS = '<link href="/styles/pcie.css" rel="stylesheet" type="text/css">';}
	else {
		sCSS = '<link href="/styles/pcie.css" rel="stylesheet" type="text/css">';}
	}
	
if ((brsr=="Microsoft Internet Explorer")&&(plat!="Win")){
	if (majorVersion=="4"){
		sCSS = '<link href="/styles/pcie.css" rel="stylesheet" type="text/css">';}
	else {
		sCSS = '<link href="/styles/pcie.css" rel="stylesheet" type="text/css">';}
	}

if ((brsr=="Netscape")&&(plat=="Win"))
	{
	if (majorVersion=="7") 
		{
		sCSS = '<link href="/styles/pcns.css" rel="stylesheet" type="text/css">';
		}
	else if (majorVersion=="6")
		{
		sCSS = '<link href="/styles/pcns.css" rel="stylesheet" type="text/css">';
		}
	else
		{
		sCSS = '<link href="/styles/pcns.css" rel="stylesheet" type="text/css">';
		}
	}
		
if ((brsr=="Netscape")&&(plat!="Win"))
	{
	if (majorVersion=="7") 
		{
		sCSS = '<link href="/styles/pcns.css" rel="stylesheet" type="text/css">';
		}
	else if (majorVersion=="6")
		{
		sCSS = '<link href="/styles/pcns.css" rel="stylesheet" type="text/css">';
		}
	else
		{
		sCSS = '<link href="/styles/pcns.css" rel="stylesheet" type="text/css">';
		}
	}

if (sCSS == null) 
	{
	sCSS = '<link href="/styles/pcns.css" rel="stylesheet" type="text/css">';
	}

//alert( "Browser:" + brsr + "\nVersion:" + majorVersion + "." + minorVersion + "\nPlatform:" + plat  + "\nCSS String:" + sCSS);
		
document.write(sCSS) ;
//-->
