// JavaScript Document
<!--

var flashinstalled = 0;
var flashversion = 0;
MSDetect = "false";
if (navigator.plugins && navigator.plugins.length)
{
	x = navigator.plugins["Shockwave Flash"];
	if (x)
	{
		flashinstalled = 2;
		if (x.description)
		{
			y = x.description;
			flashversion = y.charAt(y.indexOf('.')-1);
		}
	}
	else
		flashinstalled = 1;
	if (navigator.plugins["Shockwave Flash 2.0"])
	{
		flashinstalled = 2;
		flashversion = 2;
	}
}
else if (navigator.mimeTypes && navigator.mimeTypes.length)
{
	x = navigator.mimeTypes['application/x-shockwave-flash'];
	if (x && x.enabledPlugin)
		flashinstalled = 2;
	else
		flashinstalled = 1;
}
else
MSDetect = "true";
/*  create the VB Script flash check block */
document.write (" <scr" + "ipt language=\"VBScript\" type=\"text/vbscript\">\n");
document.write (" on error resume next \n");
document.write (" If MSDetect = \"true\" Then \n");
document.write ("	For i = 2 to 6 \n");
document.write ("		If Not(IsObject(CreateObject(\"ShockwaveFlash.ShockwaveFlash.\" & i))) Then \n");

document.write ("		Else \n");
document.write ("			flashinstalled = 2 \n");
document.write ("			flashversion = i \n");
document.write ("		End If \n");
document.write ("	Next \n");
document.write (" End If \n");

document.write (" If flashinstalled = 0 Then \n");
document.write (" 	flashinstalled = 1 \n");
document.write (" End If \n");

document.write ("</scr" + "ipt>");
// -->

// 
<!--
if (flashinstalled == 2)
{
	if (flashversion)
		document.write("<!-- You have Flash version " + flashversion + " installed. -->");
	else
		alert("You have Flash installed, but I can't detect the version.");
}
else if (flashinstalled == 1) alert("You don't have Flash installed.");
else alert("I can't find out if you have Flash installed.");
// -->

<!--//
function  genflash(rmfv,swf,pwmode,fvars,fw,fh,bg,altimg,alttxt,alink){
var x = flashversion;
var xplay ="";
var wm ="";
var fv ="";
var bgc ="";
	xplay += ("<!--// "+ rmfv +", "+ swf +", "+ pwmode +", "+ fvars +", "+ fw +", "+ fh +", "+ bg +", "+ altimg +", "+ alttxt +", "+ alink +" //-->\n");
	if (x >= rmfv ){

	xplay += (" <object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\" width=\""+ fw +"\" height=\"" + fh +"\" > \n");
	xplay += (" <param name=\"movie\" value=\"" + swf + "\" />\n");
	xplay += (" <param name=\"quality\" value=\"high\" /> \n");
	
	if(!(pwmode) == ""){
	xplay += (" <param name=\"wmode\" value=\"" + pwmode + "\" />\n ");
	wm = (" wmode=\"" + pwmode + "\" ");

	}	
	
	if(!(fvars) == ""){
	xplay += (" <param name=\"flashvars\" value=\"" + fvars + "\" />\n ");
	fv= (" flashvars =\"" + fvars + "\" / ");
//		document.write (" param name=\"flashvars\" value=\"" + fvars + "\" /\n ");

	}
	
	if(!(bg) == ""){
	xplay += (" <param name=\"BGCOLOR\" value=\"" + bg + "\" />\n ");
	bgc = (" bgcolor =\"" + bg + "\" / ");
	}	
	xplay += (" <embed src=\"" + swf +"\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + fw +"\" height=\"" + fh +"\" "+ wm + fv + bgc +" ></embed> \n");
	xplay += (" </object>\n");


	} else {
		if(!(altimg) == ""){
		xplay += ("<a href=\""+ alink +"\" >");
		xplay += ("<img src=\""+ altimg +"\" alt =\""+ alttxt +"\" border =\"0\" />");
		xplay += ("<a>");
		}
		
	}
/*
		xplay += ("<a href=\""+ alink +"\" >");
		xplay += ("<img src=\""+ altimg +"\" alt =\""+ alttxt +"\" border =\"0\" />");
		xplay += ("<a>");
*/
	document.write (xplay);
}

//	genflash(rmfv,swf,pwmode,fvars,fw,fh,bg,altimg,alttxt,alink)
//	genflash(6,'images/billiardssnooker.com.swf','transparent','',410,180,'#FFFFFF','images/logo.gif','TEXT','http://www.yahoo.com');

// -->

