<!--begin flash detection script if flash not detected then plugin set to "0"; "1" or "true" if flash is detected-->
 <!--Define the plugin variable and set its value to "0"-->
 var plugin = 0;
 function isFlashAvailable()
 {
  <!--Check Mozilla browsers to see if flash is detected, if so, set the value of the plugin variable to "1"-->
  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;
   }
  }
  <!--Check Microsoft browsers to see if flash is detected, if so, set the value of the plugin variable to "true"-->  
  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)) 
  {
   document.writeln('<script language="VBScript" type="text/vbscript"> \n');
   document.writeln(' Function detectPlugin()');
   document.writeln(' on error resume next ');
   document.writeln(' detectPlugin = False');
   document.writeln(' detectPlugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4")))\n');
   document.writeln(' If ( detectPlugin <= 0 ) Then detectPlugin = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5")))');
   document.writeln(' If ( detectPlugin <= 0 ) Then detectPlugin= ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6")))');
   document.writeln(' End Function');
   document.writeln('</script>');

   var p = false;
   p = detectPlugin();
   if(p == true)
	{
	   plugin = 1;
	   history.go(-1);
	}
  }
 }
 <!-- method to be called to open flash content. It checks and opens flash content --> 
 function openFlash(flashLinkUrl, flashTitle, options,nonFlashURL)
 {
  isFlashAvailable();
  if(plugin == 1)
  {
    window.open(flashLinkUrl, "fTitle", options);
  }
  else
  {
   var errorLocation = ""+location;
   var startindex = errorLocation.indexOf("index.wss");
   var urlPrefix = errorLocation.substring(0,startindex);  
   var flashErrorPath = urlPrefix+"index.wss/flash_not_found"+"?nonFlashUrl="+nonFlashURL;
   location.href = flashErrorPath;
  }
 }
<!--end flash detection script -->