//************** Browser Sniffing Functions **************************
    var yourOS="unknown"
    var browserType = null;
    var agt=navigator.userAgent.toLowerCase();
	 var optAgt = navigator.userAgent;
    
    // *** BROWSER VERSION ***

    var is_major = parseInt(navigator.appVersion);
    var is_minor = parseFloat(navigator.appVersion);

    var is_nav  = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
                && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
                && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
    
    if (is_nav && (is_major == 2))
		browserType= "Netscape Navigator 2";
    if (is_nav && (is_major == 3))
		browserType= "Netscape Navigator 3";
    if (is_nav && (is_major == 4))
		browserType= "Netscape Navigator 4";
    if (is_nav && (is_major >= 4))
		browserType= "Netscape Navigator " + is_minor;
    if (is_nav && (is_major == 5))
		browserType= "Netscape Navigator 6";
    if (is_nav && (is_major >= 5))
		browserType= "Netscape Navigator " + is_minor;

    var is_ie     = ((agt.indexOf("msie") != -1) && (agt.indexOf("opera") == -1));
	if (is_ie && (is_major < 4))
		browserType= "Internet Explorer 3";
    if (is_ie && (is_major == 4) && (agt.indexOf("msie 5")==-1) )
		browserType= "Internet Explorer 4";
    if (is_ie && (is_major == 4) && (agt.indexOf("msie 5.0")!=-1) )
		browserType= "Internet Explorer 5";
    if (is_ie && (is_major == 4) && (agt.indexOf("msie 5.5") !=-1))
		browserType= "Internet Explorer 5.5";
    if (is_ie && (is_major == 4) && (agt.indexOf("msie 6") !=-1))
		browserType= "Internet Explorer 6";





//-- Get platform information and store in yourOS.

if ((optAgt.indexOf("Win95")!=-1)||(optAgt.indexOf("Windows 95")!=-1))
   {yourOS='Windows 95'}
if ((optAgt.indexOf("Win98")!=-1)||(optAgt.indexOf("Windows 98")!=-1))
   {yourOS='Windows 98'}
if ((optAgt.indexOf("WinNT")!=-1)||(optAgt.indexOf("Windows NT")!=-1))
   {yourOS='Windows NT'}
if ((optAgt.indexOf("Windows NT 5.0")!=-1))
   {yourOS='Windows 2000'}
if ((optAgt.indexOf("Win16")!=-1)||(optAgt.indexOf("Windows 3.1")!=-1))
   {yourOS='Windows 3.1'}
if (optAgt.indexOf("Macintosh")!=-1) {
   if (optAgt.indexOf("PC)")!=-1) {yourOS='Mac PPC'} else {yourOS='Mac 68K'}
	}
if (optAgt.indexOf("SunOS")!=-1) {yourOS='Unix Sun'}
if (optAgt.indexOf("IRIX")!=-1) {yourOS='Unix SGI'}
if (optAgt.indexOf("HP-UX")!=-1) {yourOS='Unix HP'}
if (optAgt.indexOf("AIX")!=-1) {yourOS='Unix IBM'; }

function Is() {
  var agent = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible') == -1)));
  this.ns2 = (this.ns && (this.major == 2));
  this.ns3 = (this.ns && (this.major == 3));
  this.ns4b = (this.ns && (this.minor < 4.04));
  this.ns4 = (this.ns && (this.major >= 4));
  this.ns6 = (this.ns && (this.major == 5));
  this.ns6up = (this.ns && (this.major >= 5));
  this.ie = (agent.indexOf("msie") != -1);
  this.ie3 = (this.ie && (this.major == 2));
  this.ie4up = (this.ie && (this.major >= 4));
  this.ie5 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0")!=-1));
  this.ie4 = (this.ie && (this.major == 4) && (agent.indexOf("msie 5.0")==-1));
  this.op7 = (agent.indexOf("opera 7") != -1);
  this.win = (agent.indexOf("win")!=-1);
  this.mac = (agent.indexOf("mac")!=-1);
  this.unix = (agent.indexOf("x11")!=-1);
  this.dom =  ((!document.all && document.getElementById) ? true : false);
  this.getid = ((document.getElementById) ? true : false);
  
  this.width = 0;
  this.height= 0;
  
  if (window.screen) {
	 this.width = window.screen.width;
	 this.height  = window.screen.height;
  }

}

var is = new Is();

function isNetscape()
{
  return is.ns;

}

function isNetscape6Up()
{ 

   return is.ns6up;

}


function isNetscape6()
{ 

   return is.ns6;

}

function isNetscape4x()
{ 
   
   return (is.ns4 && !is.ns6up);

}


function isIE()
{
   
   return is.ie4up;


}

function isIE4()
{

   return is.ie4 && !document.getElementById;

}

function isIE5()
{
   return is.ie5;

}

function isOpera7()
{ 
  
   return is.op7;

}

function getOS()
{  
   return yourOS;
}

function getBrowser()
{  
   return browserType;
}

function getMajor()
{  
   return is_major;
}

function getMinor()
{  
   return is_minor;
}

function getJavaEnable()
{  
   return navigator.javaEnabled();
}


function getWidth()
{  
	return is.width;
}

function getHeight()
{  
	return is.height;
}




