function detectFlash(objnon,objtrue,w,h)
	{	
		var flash = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH='+w+' HEIGHT='+h+'><PARAM NAME=movie VALUE="images/'+objtrue+'"><PARAM NAME=quality VALUE=high><PARAM NAME=bgcolor VALUE=#FFFFFF><EMBED src="images/'+objtrue+'" quality=high bgcolor=#FFFFFF  WIDTH='+w+' HEIGHT='+h+' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED></OBJECT>';
		var noflash = '<img src="images/'+objnon+'" WIDTH='+w+' HEIGHT='+h+' ALT="" BORDER="0">';
		
		if (navigator.plugins){								// does navigator.plugins exist?
			if (navigator.plugins["Shockwave Flash 2.0"] 	// yes>> then is Flash 2 
			|| navigator.plugins["Shockwave Flash"]){		// or flash 3+ installed?
	
				// set convenient references to flash 2 and the plugin description
				var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
				var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
				// a flash plugin-description looks like this: Shockwave Flash 4.0 r5
				// so we can get the major version by grabbing the character before the period
				// note that we don't bother with minor version detection. do that in your movie with $version
				var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
	
				// we know the version, now set appropriate version flags
				flash2Installed = flashVersion == 2;		
				flash3Installed = flashVersion == 3;
				flash4Installed = flashVersion == 4;
				flash5Installed = flashVersion == 5;
			}
		}
		
		// loop through all versions we're checking, and set actualVersion to highest detected version
		for (var i = 2; i <= maxVersion; i++) {	
			if (eval("flash" + i + "Installed") == true) actualVersion = i;
		}
		// if we're on webtv, the version supported is 2 (pre-summer2000, or 3, post-summer2000)
		if(navigator.userAgent.indexOf("WebTV") != -1) actualVersion = 2;
	
		if (actualVersion >= requiredVersion) { 		// user has a new enough version
			document.write(flash);
		} else {	// user doesn't have a new enough version.
			document.write(noflash);
		}
	}