function detector(){
	this.lastModified="v2.0 06/07/06";
	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=writeFlash;
}
	
	


function writeFlash(fVersion, swf, w, h, bgcolor, altpg) {
	//if(!alttarget){alttarget="self";}
	if(!fVersion){fVersion=3;}
	var insHTML="";
	var insIMG="";
	//
	var doc_url=document.URL;
	//alert(doc_url);
	//
	//var altImage = ('<img src="' + altimg + '.' + altimgtype + '" alt="' + alttext + '" width="' + w + '" height="' + h + '" border="0">');
	//var altLink = ('<a href="' + althref + '.html" target="_' + alttarget + '">');
	//
	var flashcheck = new detector();
	flashcheck.DetectFlash();
	if(flashcheck.Flash >= fVersion) {
		//insHTML  = ('\n<object type="application/x-shockwave-flash" width="' + w + '" height="' + h + '" />');
		insHTML  = ('\n<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="' + w + '" height="' + h + '" />');
		insHTML += ('\n\t<param name="movie" value="' + swf + '" />');
		//insHTML += ('\n\t<param name="bgcolor" value="#' + bgcolor + '" />');
		insHTML += ('\n\t<param name="quality" value="high" />');
		insHTML += ('\n\t<param name="wmode" value="transparent" />');
		insHTML += ('\n\t<param name="scale" value="noscale" />');
		
		insHTML += ('\n\t<embed src="' + swf + '" quality="high" scale="noscale" wmode="transparent"');
		insHTML += ('width="' + w + '" height="' + h + '" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');
		insHTML += ('\n<\/object>');
		document.write(insHTML);
	}
	else
	{
		//insIMG  = ('\n<a href="' + althref + '.html" target="' + alttarget + '">');
		//insIMG += ('<img src="' + altimg + '.' + altimgtype + '" alt="' + alttext + '" width="' + w + '" height="' + h + '" border="0">');
		//insIMG += ('</a>');
		//document.write(insIMG);
		insIMG = altpg;
		document.location = insIMG;
	}
}