var detect = navigator.userAgent.toLowerCase();
var OS, browser, version, total, thestring;

	if(checkIt('konqueror'))
	{
	  browser = "Konqueror";
	  OS = "Linux";
	}
	else if (checkIt('opera')) browser = "Opera"
	else if (checkIt('msie')) browser = "Internet Explorer"
	else if (!checkIt('compatible'))
	{
		browser = "Netscape Navigator"
		version = detect.charAt(8);
	}
	else browser = "An unknown browser";

if (!version) version = detect.charAt(place + thestring.length);
if (!OS)
{
	if (checkIt('linux')) OS = "Linux";
	else if (checkIt('x11')) OS = "Unix";
	else if (checkIt('mac')) OS = "Mac"
	else if (checkIt('win')) OS = "Windows"
	else OS = "an unknown operating system";
}

function checkIt(string)
{
	place = detect.indexOf(string)+1;
	thestring = string;
	return place;
}

if((browser == "Netscape Navigator") && (OS == "Windows"))
{
	document.write("<LINK rel='stylesheet' href='../include/style.css' type = text/css>");
}
else if ((browser == "Internet Explorer") && (OS == "Windows"))
{
	document.write ("<LINK rel='stylesheet' href='../include/style.css' type = text/css >");	
}
else if ((browser=="Netscape Navigator") && (OS="Linux"))
{	
	document.write ("<LINK rel='stylesheet' href='../include/Linux-styles-Mozilla.css' type = text/css >");
}
else if ((browser=="Konqueror") && (OS="Linux"))
{	
	document.write ("<LINK rel='stylesheet' href='../include/Linux-styles-Mozilla.css' type = text/css >");
}
else if ((browser=="Opera"))
{	
	document.write ("<LINK rel='stylesheet' href='../include/style.css' type = text/css >");	
}

function aSearchLink()
{
	if (browser == "Netscape Navigator")
	{
		document.write("<a href='../Search/AdvanceSearchMoz.asp' onmouseover = 'javascript:MM_Mouseover(2);' onmouseout = 'javascript:MM_Mouseout(2);'>");
	}
	else
	{
		document.write("<a href='../Search/AdvanceSearch.asp'  onmouseover = 'javascript:MM_Mouseover(2);' onmouseout = 'javascript:MM_Mouseout(2);'>");
	}
}

function pdMenuItemLink()
{
	if (browser == "Netscape Navigator")
	{
		document.write("<a href='../Browse/BySubject.asp'>By Subject</a>");
		document.write("<a href='../Browse/byPubMoz.asp'>By Publisher</a>");
		document.write("<a href='../browse/contstatus.asp'>Latest Updates</a>");
	}
	else
	{
		document.write("<a href='../Browse/BySubject.asp'>By Subject</a>");
		document.write("<a href='../Browse/byPubFrame.asp'>By Publisher</a>");
		document.write("<a href='../browse/contstatus.asp'>Latest Updates</a>");
	}
}