function detector() {
	this.lastModified="v1.0 01/10/05";
	http="http:/\/";
	this.v=parseFloat(navigator.appVersion);
	this.uA=navigator.userAgent;
	this.ns=false;
	this.ns6=false;
	this.ie=false;
	this.ie5=false;
	this.opera=false;
	this.AOL=false;
	this.mac=false;
	this.pc=false;
	this.dhtml=false;
	this.Java=false;
	this.Flash_Download=http+"www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash";
	this.Flash_Codebase=http+"download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0";
	this.Flash="Not Detected";
	this.loaded=false;
	navigator.appVersion.indexOf('Mac')!=-1?(this.mac=true):(this.pc=true);
	var ns6pos=this.uA.indexOf('Netscape6/');
	var iepos=this.uA.indexOf('MSIE');
	var oppos=this.uA.indexOf('Opera');
	var AOLpos=this.uA.toUpperCase().indexOf('AOL');
	if(oppos>=0) {
		this.v=parseFloat(this.uA.substring(oppos+6,this.uA.length));
		this.opera=true;
	} else {
		navigator.appName.indexOf('Netscape')!=-1?(this.ns=true):(this.ie=true);
	}
	if(iepos!=-1) {
		ie5cut=this.uA.substring(iepos+5,this.uA.length);
		this.v=parseFloat(ie5cut.substring(0,ie5cut.indexOf('\;')));
		if(this.v>=5)
			this.ie5=true;
	}
	this.guy=true;
	if(ns6pos!=-1) {
		this.v=parseFloat(this.uA.substring(ns6pos+10,this.uA.length));
		this.ns6=true;
	}
	if(AOLpos!=-1) {
		this.AOL=parseFloat(this.uA.substring((AOLpos+3),this.uA.length));
	}
	if(this.v>=4) {
		this.dhtml=this.opera?false:true;
		this.Java=navigator.javaEnabled();
	}
	detector.prototype.DetectFlash=DetectFlash;
	detector.prototype.EmbedFlash=DetectEmbedFlash;
	detector.prototype.EmbedFlashWithParamVars=DetectEmbedFlashWithParamVars;
}
function DetectFlash() {
	if(this.Flash!="Not Detected") {
		return;
	}
	ActiveX='<SCRIPT LANGUAGE="VBScript">\n';
	ActiveX+='Function GetFlashValue\n';
	ActiveX+='on error resume next\n';
	ActiveX+='dim tmpobj, FlashInstalled\n';
	ActiveX+='FlashInstalled = 0\n';
	ActiveX+='tmpobj = 0\n';
	ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.3")\n';
	ActiveX+='if IsObject(tmpobj) then FlashInstalled = 3\n';
	ActiveX+='tmpobj = 0\n';
	ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.4")\n';
	ActiveX+='if IsObject(tmpobj) then FlashInstalled = 4\n';
	ActiveX+='tmpobj = 0\n';
	ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.5")\n';
	ActiveX+='if IsObject(tmpobj) then FlashInstalled = 5\n';
	ActiveX+='tmpobj = 0\n';
	ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.6")\n';
	ActiveX+='if IsObject(tmpobj) then FlashInstalled = 6\n';
	ActiveX+='tmpobj = 0\n';
	ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.7")\n';
	ActiveX+='if IsObject(tmpobj) then FlashInstalled = 7\n';
	ActiveX+='tmpobj = 0\n';
	ActiveX+='GetFlashValue = FlashInstalled\n';
	ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.8")\n';
	ActiveX+='if IsObject(tmpobj) then FlashInstalled = 8\n';
	ActiveX+='tmpobj = 0\n';
	ActiveX+='GetFlashValue = FlashInstalled\n';
	ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.9")\n';
	ActiveX+='if IsObject(tmpobj) then FlashInstalled = 9\n';
	ActiveX+='tmpobj = 0\n';
	ActiveX+='GetFlashValue = FlashInstalled\n';
	ActiveX+='set tmpobj = CreateObject("ShockwaveFlash.ShockwaveFlash.10")\n';
	ActiveX+='if IsObject(tmpobj) then FlashInstalled = 10\n';
	ActiveX+='GetFlashValue = FlashInstalled\n';
	ActiveX+='End Function\n';
	ActiveX+='<\/SCRIPT>\n';
	if(navigator.plugins&&navigator.plugins.length>0) {
		nparray=navigator.plugins;
		nparraylen=nparray.length;
		for(i=0;i<nparraylen;i++) {
			npplugin=nparray[i];
			npname=npplugin.name;
			npdesc=npplugin.description;
			if(npdesc.indexOf("Shockwave Flash 3")!=-1) {
				this.Flash=3;
			}
			if(npdesc.indexOf("Shockwave Flash 4")!=-1) {
				this.Flash=4;
			}
			if(npdesc.indexOf("Shockwave Flash 5")!=-1) {
				this.Flash=5;
			}
			if(npdesc.indexOf("Shockwave Flash 6")!=-1) {
				this.Flash=6;
			}
			if(npdesc.indexOf("Shockwave Flash 7")!=-1) {
				this.Flash=7;
			}
			if(npdesc.indexOf("Shockwave Flash 8")!=-1) {
				this.Flash=8;
			}
			if(npdesc.indexOf("Shockwave Flash 9")!=-1) {
				this.Flash=9;
			}
			if(npdesc.indexOf("Shockwave Flash 10")!=-1) {
				this.Flash=10;
			}
		}
	} else if(this.ie) {
		if(!this.mac||(this.mac&&this.ie&&this.v>=5)) {
			document.write(ActiveX);
			this.Flash=GetFlashValue();
			if(!this.Flash) {
				this.Flash=false;
			}
		} else {
			this.Flash=-1;
		}
	}
	disableFlash=document.URL.toLowerCase().indexOf("flash=false")>document.URL.indexOf("?");
	if(disableFlash) {
		this.Flash=false;
	}
}

function DetectEmbedFlash(file,width,height,fVersion,autostart,quality,bgcolor,FlashVars,force) {
	if(this.Flash=="Not Detected") {
		this.DetectFlash();
	}
	var insHTML="";
	if(!fVersion) {
		fVersion=3;
	}
	if(!width) {
		width=10;
	}
	if(!height) {
		height=10;
	}
	if(!autostart) {
		autostart=false;
	}
	file_ID=(file.indexOf(".")==0||file.indexOf("/")==0)?"Flashfile":file.substring(0,file.indexOf('.'));
	if((this.Flash>=parseFloat(fVersion))||(force&&this.mac&&this.ie&&this.v<5)) {
		insHTML=('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+this.Flash_Codebase+'" HEIGHT='+height+' WIDTH='+width+' ID='+file_ID+'>\n');
		insHTML+=('<PARAM NAME="movie" VALUE="'+file+'">\n');
		insHTML+=('<PARAM NAME="quality" VALUE="'+quality+'">\n');
		insHTML+=('<PARAM NAME="autostart" VALUE="'+autostart+'">\n');
		insHTML+=('<PARAM NAME="bgcolor" VALUE="'+bgcolor+'">\n');
		insHTML+=('<PARAM NAME="FlashVars" VALUE="'+FlashVars+'">\n');
		insHTML+=('<EMBED src="'+file+'" quality="'+quality+'" autostart="'+autostart+'" bgcolor="'+bgcolor+'" FlashVars="'+FlashVars+'" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="'+this.Flash_Download+'" ');
		insHTML+=('></EMBED>\n');
		insHTML+=('</OBJECT>\n');
		document.write(insHTML);
		return true;
	} else {
		return false;
	}
}

function DetectEmbedFlashWithParamVars(file,width,height,fVersion,autostart,quality,bgcolor,FlashVars,force,paramVars) {
	if(this.Flash=="Not Detected") {
		this.DetectFlash();
	}
	var insHTML="";
	if(!fVersion) {
		fVersion=3;
	}
	if(!width) {
		width=10;
	}
	if(!height) {
		height=10;
	}
	if(!autostart) {
		autostart=false;
	}
	file_ID=(file.indexOf(".")==0||file.indexOf("/")==0)?"Flashfile":file.substring(0,file.indexOf('.'));
	if((this.Flash>=parseFloat(fVersion))||(force&&this.mac&&this.ie&&this.v<5)) {
		insHTML=('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="'+this.Flash_Codebase+'" HEIGHT='+height+' WIDTH='+width+' ID='+file_ID+'>\n');
		insHTML+=(paramVars+'\n');
		insHTML+=('<EMBED src="'+file+'" quality="'+quality+'" autostart="'+autostart+'" bgcolor="'+bgcolor+'" FlashVars="'+FlashVars+'" width="'+width+'" height="'+height+'" type="application/x-shockwave-flash" pluginspage="'+this.Flash_Download+'" ');
		insHTML+=('></EMBED>\n');
		insHTML+=('</OBJECT>\n');
		document.write(insHTML);
		return true;
	} else {
		return false;
	}
}