/*** 
	browserdetection 
	usage: i.e. 
	
			if(IsBrowser.ns5) { 
				... 
				do something 
				... 
			}

	status: 
			ns2, ns3, ns4, ns4b, ns5
			ie3, ie4, ie5
			op3
***/

function Is()
{
  browser = navigator.userAgent.toLowerCase();
  this.major = parseInt(navigator.appVersion);
  this.minor = parseFloat(navigator.appVersion);
  this.ns = ((browser.indexOf('mozilla')!=-1) && ((browser.indexOf('spoofer')==-1) && (browser.indexOf('compatible')==-1)));
  this.ie = (browser.indexOf('msie') != -1);
  //checking what kind of browser you've got //

  //netscape ? //
  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.ns45 = (this.ns && (this.minor == 4.5));
  this.ns5 = (this.ns && (this.major >= 5));

  //internet explorer ? //
  this.ie3 = (this.ie && (this.major == 2));
  this.ie4 = (this.ie && (this.major == 4));
  this.ie5 = (this.ie && (this.major >= 5));

  // opera //
  this.op3  = (browser.indexOf("opera") != -1);
}

var IsBrowser = new Is();
