//check for Flash Player X 

//check the navigator.plugins array exists, IE for Windows will fail on this. 
if(navigator.plugins.length) 
{ 

  //some variables 
  //a counter 
  var i; 

  var xhtmlContent = "<object data=\"c.swf?initialSection=" + initSection + "&quality=" + quality + "\" type=\"application/x-shockwave-flash\" width=\"100%\" height=\"100%\"><param name=\"movie\" value=\"c.swf?initialSection=" + initSection + "&quality=" + quality + "\"><param name=\"menu\" value=\"false\"><param name=\"quality\" value=\"high\"><param name=\"bgcolor\" value=\"#000000\"></object>"; 

  var alternateContent = "<div id=\"nonjs\"><h3>We haven't been able to detect the latest version of Macromedia Flash Player on your computer.</h3><p>This web site makes use of <a href=\"http://www.macromedia.com/software/flash/\">Macromedia<sup>&reg;</sup>Flash<sup>TM</sup></a> software.</p><p>If you know you have Flash version 7 or better, you should proceed to the <em><a href=\"nonjs.html\">From Wireless To Web</a></em> site.</p><p><a href=\"http://www.macromedia.com/go/getflashplayer\"><img src=\"alternate.gif\" width=\"88\" height=\"31\" alt=\"Get Flash Player\"></a></p><p>Otherwise, why not download and install the latest version now? It will only take a moment.</p></div>";

  //loop through all the plugins installed 
  for (i=0; i < navigator.plugins.length; i++) 
  { 
       //put the plugin string in a variable 
       var pluginIdent = navigator.plugins[i].description.split(" "); 
       //The Flash Player identification string is ([] = the array index) [0]Shockwave [1]Flash [2]6.0 [3]r21 


       //if less than Flash Player 7 is detected, run this code. 
       if(pluginIdent[0] == "Shockwave" && pluginIdent[1] == "Flash") 
       { 
          //set a toggle to show that some sort of Flash Player (of versions 1-5) was found 
          var isSwfEnabled = true; 

          //an array of the Flash version number (major.minor) 
          var versionArray = pluginIdent[2].split("."); 

          if(versionArray[0] < 7) 
          { 
             //show alternate content 
             document.write(alternateContent); 
          } 
          else 
          { 
             //Flash Player 7 or greater has been found, roll out the <object> tag. 
             document.write(xhtmlContent); 
          } 

       //need to break this loop as some browsers may have two versions installed 
       //eg my Firebird release has r65 and r79 installed! 
       break; 

       }//end if pluginIdent 


  }//end for 


  //check if no Shockwave Flash was detected in the array (no Flash Player installed) 
  if(!isSwfEnabled) 
  { 
     document.write(alternateContent); 
  }//end if 

}

