//Browser sniffer for IE4+ or NN4+

//create string 'agent' with contents of navigator.userAgent
var agent = navigator.userAgent.toLowerCase();
var isMajor = parseInt(navigator.appVersion);
var isMinor = parseFloat(navigator.appVersion);

//check indexOf various sub strings within 'agent'
//if the result is -1 then that substring is not present in 'agent'
var isNav =((agent.indexOf('mozilla')!=-1)&&(agent.indexOf('spoofer')==-1)&&(agent.indexOf('compatible')==-1)&&(agent.indexOf('opera')==-1)&&(agent.indexOf('webtv')==-1)&&(agent.indexOf("firefox")==-1));
//var isNav4up = (isNav && (isMajor>=4));
var isIE = (agent.indexOf("msie") != -1);
//var isIE4up = (isIE && (isMajor >=4));
var isFirefox = (agent.indexOf("firefox")!= -1);
var isWindows=agent.indexOf("win")!=-1;
var isLinux=agent.indexOf("x11")!=-1;



// Dummy function to allow inheritence
function sniff()
  {

  }


// use to find out operating system and browser
function reveal()
	{
		if (isWindows)
			{
				if (isIE)
					{
						alert("Windows - Internet Explorer");
					}
				else if (isNav)
					{
						alert("Windows - Netscape Navigator");
					}
				else if (isFirefox)
					{
						alert("Windows - Firefox");
					}
			}
		if (isLinux)
			{
				if (isNav)
					{
						alert("Linux - Netscape Navigator");
					}
				else if (isFirefox)
					{
						alert("Linux - Firefox");
					}
			}

	}

/*   Sample sniff functions 

function sniff()
			{
				var mysheet=window.document.styleSheets[0];
				if (isIE)
					{
							mysheet.removeRule(10);	mysheet.addRule("li","color:#000000;font-size:8pt;line-height:1.5em;margin-left:0px;",10);
					//	alert(mysheet.cssText);
					}
			}
			
function sniff()
			{
				var mysheet=window.document.styleSheets[0];
				if (isIE)
					{
						mysheet.removeRule(11);	mysheet.addRule("p","font-size:10pt;margin-top:2px;margin-bottom:2px;",11);
						mysheet.removeRule(10);
						mysheet.addRule("li","color:#000080;font-size:10pt;margin-top:3px;margin-left:10px;margin-bottom:0px;line-height:1.15em",10);
						//alert(mysheet.cssText)

					}
			}
// Adjust the position of areas to accomodate NN/IE inconsistencies
		function sniff()
  		{
				var mysheet=window.document.styleSheets[0];
				if ((isNav)||(isFirefox))
					{
						mysheet.deleteRule(10);				mysheet.insertRule("li{color:#000000;font-size:10pt;margin-top:1px;margin-bottom:1px;padding-left:0px}",10);
					}
				if (isIE)
					{
				  	mysheet.removeRule(10);	mysheet.addRule("li","color:#000000;font-size:8pt;margin-top:1px;margin-bottom:1px;margin-left:0px;",10);
					}

				if (isWindows)
					{
						if (isIE)
							{
								window.document.getElementById("sub1").style.top="270px";
								window.document.getElementById("subShadow1").style.top="275px";
								mysheet.removeRule(7);	mysheet.addRule("h1","font-size:12pt;font-weight:bold;color:#930062;margin:0px",7);
							}
						if ((isFirefox)||(isNav))
							{
								mysheet.deleteRule(7);	mysheet.insertRule("h1{font-size:12pt;font-weight:bold;color:#930062;margin:0px}",7);
							}
					}
		  }

*/