var flashVersion = 0;
function CheckFlashPlugin() {
   var latestFlashVersion = 8;
   // NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
   if (navigator.plugins != null && navigator.plugins.length > 0) {
      var flashPlugin = navigator.plugins['Shockwave Flash'];
      if (typeof flashPlugin == 'object') { 
         for (var i = latestFlashVersion; i >= 3; i--) {
            if (flashPlugin.description.indexOf(i + '.') != -1) {
               flashVersion = i;
               break;
            }
         }
      }
   }
   // IE4+ Win32:  attempt to create an ActiveX object using VBScript
   else if (is_ie4up && agt.indexOf("16bit")==-1) {
      var doc = '<scr' + 'ipt language="VBScript"\> \n';
      doc += 'On Error Resume Next \n';
      doc += 'Dim obFlash \n';
      doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
      doc += '   Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
      doc += '   If IsObject(obFlash) Then \n';
      doc += '      flashVersion = i \n';
      doc += '      Exit For \n';
      doc += '   End If \n';
      doc += 'Next \n';
      doc += '</scr' + 'ipt\> \n';
      document.write(doc);
   }
   return flashVersion;
}
flashVersion = CheckFlashPlugin();
//status = flashVersion;
if(flashVersion == 0 && is_ie) {
    function GetObjectTags() {
        var new_span_node = document.createElement("SPAN");
        new_span_node.style.padding = '5px';
        new_span_node.style.border = '1px solid #000000';
        var flash_obj = document.body.getElementsByTagName('EMBED');
        //alert('length : '+flash_obj.length);
        for (i=0;i<flash_obj.length;i++) {
            if(flash_obj[i] != undefined) {
                //alert(flash_obj.pluginspage.indexOf('macromedia'));
                if(flash_obj[i].pluginspage.indexOf('macromedia') != -1) {
                    new_span_node.style.width =  flash_obj[i].width;
                    new_span_node.style.height =  flash_obj[i].height;
                    //flash_obj[i].removeNode(true);
                    flash_obj[i].replaceNode(new_span_node);
                    new_span_node.innerHTML = no_flash_text;
                }
            }
        }
    }
    GetObjectTags();
}