myimgOrPage = null;
flashCanPlay = false;
function testFlash(theVersion,imgOrPage,altfile){
flashVersion = theVersion //version to test for, if fail do you want an image to replace or go to an html page (values are "image" or "page". alt is either the html page or image file
plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
		words = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (i = 0; i < words.length; ++i){
		if (isNaN(parseInt(words[i])))
		continue;
		pluginVersion = words[i]; 
	    }
	flashCanPlay = pluginVersion >= flashVersion;
	
}else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
   && (navigator.appVersion.indexOf("Win") != -1)) {
	document.write('<scr' + 'ipt type="text/vbscript"\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
	document.write('on error resume next \n');
	document.write('flashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & flashVersion)))\n');
	document.write('</scr' + 'ipt\> \n');
}




if ( !flashCanPlay ) {//if they don't have flash or a high enough versin of flash
	if (imgOrPage =="page"){
		window.location = altfile;// if page is chosen, go to the get flash page chosen
		}else{
		myimgOrPage = "image";
		}	
	}
}



function putswf(flashfile,width,height,altimg,vars,myID,wmode){
	if((navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Mac")!= -1)){
			flashfile = flashfile+"?"+vars; /*this allows Mac IE to see flash vars. Mac IE can't read flash Vars it needs to attach them to the swf in the form of file.swf?flashVars */
	}
	altTitle="You need a more recent version of the Macromedia Flash Player";
if ((myimgOrPage == "image") && (flashCanPlay == false)){
	document.write('<a href="http://www.macromedia.com/go/getflashplayer" target="_blank" title="'+altTitle+'"><img src='+altimg+' alt="'+altTitle+'"  width="'+width+'" height="'+height+'"/></a>');
	}else{
		if ((navigator.userAgent.indexOf("MSIE") != -1) && (navigator.userAgent.indexOf("Win")!= -1) && (navigator.userAgent.indexOf("Opera") == -1) && (navigator.userAgent.indexOf("Omni") == -1)){
			msie="&msie=true";
		}else{
			msie="&msie=false";
		}
		document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="'+myID+'" width="'+width+'" height="'+height+'">');
		document.write('<param name="movie" value="'+flashfile+'" />');
		document.write('<param name="FlashVars" value="'+vars+msie+'" />');
		document.write('<param name="wmode" value="'+wmode+'" />');
		document.write('<embed src="'+flashfile+'" width="'+width+'" height="'+height+'" wmode="'+wmode+'" type="application/x-shockwave-flash" FlashVars="'+vars+msie+'" />');
		document.write('</object>');
		
	} 
}