function Browser() {
    agent = navigator.userAgent.toLowerCase();
    this.major = parseInt(navigator.appVersion);
    this.minor = parseFloat(navigator.appVersion);

    //Browser Detection
    this.ns = ((agent.indexOf('mozilla')!=-1) && ((agent.indexOf('spoofer')==-1) && (agent.indexOf('compatible')==-1)));
    this.ns4 = (this.ns && (this.major==4));
    this.ns6 = (this.ns && (this.major>=5));
    this.ie = (agent.indexOf("msie")!=-1);
    this.ie3 = (this.ie && (this.major<4));
    this.ie4 = (this.ie && (this.major==4) && (agent.indexOf("msie 4.")!=-1));
    this.ie5 = (this.ie && (this.major==4) && (agent.indexOf("msie 5.0")!=-1));
    this.ie55 = (this.ie && (this.major==4) && (agent.indexOf("msie 5.5")!=-1));
    this.ie6 = (this.ie && (agent.indexOf("6.0")!=-1));
    
    this.ns4up = (this.ns4 || this.ns6);
    this.ie4up = (this.ie4 || this.ie5 || this.ie55 || this.ie6);
    this.ie5up = (this.ie5 || this.ie55 || this.ie6);
    this.ie55up = (this.ie55 || this.ie6);
   
    this.mac = (agent.indexOf("Mac")!=-1);
    
    //Flash Detection
	if (this.ie && !this.mac) {
		
		document.write('<scr' + 'ipt language="VBScript"\> \n');
		document.write('On Error Resume Next \n');
		document.write('Dim flashversion \n');
		document.write('flashversion = 0 \n');
		
		document.write('If IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")) Then \n');
		document.write('If Err.Number = 0 Then flashversion = 6 \n');
		document.write('End If \n');
		document.write('Err.Clear \n');
		
		document.write('If flashVersionn < 6 And IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")) Then \n');
		document.write('If Err.Number = 0 Then flashversion = 5 \n');
		document.write('End If \n');
		document.write('Err.Clear \n');
		
		document.write('If flashVersion < 5 And IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")) Then \n');
		document.write('If Err.Number = 0 Then flashversion = 4 \n');
		document.write('End If \n');
		document.write('Err.Clear \n');
		
		document.write('If flashVersion < 4 And IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")) Then \n');	
		document.write('If Err.Number = 0 Then flashversion = 3 \n');
		document.write('End If \n');
		document.write('Err.Clear \n');
		
		document.write('</scr' + 'ipt\> \n'); 
		
		this.flashversion = flashversion;
	}
	// NS3+ and Opera3+ (support plugin array):  check for Flash plugin in plugin array
	else if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			if (flashPlugin.description.indexOf('6.') != -1) this.flashversion = 6;
			else if (flashPlugin.description.indexOf('5.') != -1) this.flashversion = 5;
			else if (flashPlugin.description.indexOf('4.') != -1) this.flashversion = 4;
			else if (flashPlugin.description.indexOf('3.') != -1) this.flashversion = 3;
		}
	}
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashversion = 3;
	this.flash = (this.flashversion != 0);
}
var Browser = new Browser();
