function genPageFlash(flashFile,flashSubstitute)
{
	var plugin = 0;
	if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
		if (navigator.plugins && navigator.plugins["Shockwave Flash"])
			plugin = 1;
	}
	else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 
	   && (navigator.userAgent.indexOf("Windows 95")>=0 || navigator.userAgent.indexOf("Windows 98")>=0 || navigator.userAgent.indexOf("Windows NT")>=0)) {
		// Use eval() so Netscape won't try to parse the try/catch commands, which it doesn't recognize.
		eval('try{var axObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");	if( axObj==null ) { axObj = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.4"); if( axObj == null ){axObj=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.5"); if( axObj==null ) plugin = 0;	else plugin = 1;} else plugin = 1;}	else plugin = 1; } catch(e){ plugin = 0; }');	

// Don't use VBScript in .js file; the browser won't execute the generated script.
//		document.write('<SCRIPT LANGUAGE=VBScript\> \n');
//		document.write('on error resume next \n');
//		document.write('plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3")))\n');
//		document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
//		document.write('if ( plugin <= 0 ) then plugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))\n');
//		document.write('</SCRIPT\> \n');
	}
	if ( plugin ) {
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('  codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=3,0,0,0" ');
		document.write(' ID=banner WIDTH=650 HEIGHT=250>');
		document.write(' <PARAM NAME=movie VALUE="' + flashFile + '"> <PARAM NAME=quality VALUE=best> <PARAM NAME=bgcolor VALUE=#FFFFFF>  '); 
		document.write(' <EMBED src="' + flashFile + '" quality=best bgcolor=#FFFFFF  ');
		document.write(' swLiveConnect=FALSE WIDTH=650 HEIGHT=250');
		document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
		document.write(' </EMBED>');
		document.write(' </OBJECT>');
	} else if (!(navigator.appName && navigator.appName.indexOf("Netscape")>=0 && navigator.appVersion.indexOf("2.")>=0)){
		document.write('<IMG SRC="' + flashSubstitute + '" WIDTH=650 HEIGHT=250  BORDER=>');
	}
}