IE6 problem "Click to activate and use this control"

Since Servicepack2 Microsoft Internet Explorer has a problem with flash files because of the Eolas patent issue: By rolling over any flash object lines appear around the flash object what has the message "click to activate and use this control".
There are several solutions to fix that problem, but all point on (to my knowledge) using javascript to load the HTML tags for embedding flash objects into the page. I use the following methode, explained in 3 easy steps:

1.) Copy and paste the javascript

Copy the javascript in the box bellow and paste it into a texteditor (not word!). Save it as ieupdate.js and upload it to your server/ webspace.


var bo_ns_id = 0;

function startIeFix(){
if(isIE()){
document.write('<div id="bo_ns_id_' + bo_ns_id + '"><!-- ');
}
}

function endIeFix(){
if(isIE()){
document.write('</div>');
var theObject = document.getElementById("bo_ns_id_" + bo_ns_id++);
var theCode = theObject.innerHTML;
theCode = theCode.substring(4 ,9+theCode.indexOf("</object>"))
document.write(theCode);
}
}

function isIE(){
// only for Win IE 6+
// But not in Windows 98, Me, NT 4.0, 2000
var strBrwsr= navigator.userAgent.toLowerCase();
if(strBrwsr.indexOf("msie") > -1 && strBrwsr.indexOf("mac") < 0){
if(parseInt(strBrwsr.charAt(strBrwsr.indexOf("msie")+5)) < 6){
return false;
}
if(strBrwsr.indexOf("win98") > -1 ||
strBrwsr.indexOf("win 9x 4.90") > -1 ||
strBrwsr.indexOf("winnt4.0") > -1 ||
strBrwsr.indexOf("windows nt 5.0") > -1)
{
return false;
}
return true;
}else{
return false;
}
}

2.) Include the script within the <HEAD> tags of your HTML site

After the little script you just have created (ieupdate.js) is uploaded to your server, you need to include it within the <HEAD> tags of your HTML site.
Copy the tag in the box bellow and paste it within the <HEAD>...</HEAD> tags of your HTML document.

<script type="text/javascript" src="ieupdate.js"></script>

Note:
You need to include it in every page you want to display flashfiles.
If ieupdate.js is stored in another folder than your HTML-file, you better change
src="ieupdate.js"
into
src="http://www.yourdomain.com/ieupdate.js"

3.) Finally include 2 further lines of code to your HTML document

The third and last step is, that you add a line directly before, and directly after the <object> tags of the HTML code that displays the banner/ flashfile:
(Gray lines is the standard html-code)

<script type="text/javascript">startIeFix();</script>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  codebase="http://active.macromedia.com/flash4/cabs/swflash.cab#version=4,0,0,0"
  id="name" width="468" height="60">
  <param name="movie" value="http://www.yourdomain.com/flashfile.swf">
  <param name="quality" value="high">
  <param name="wmode" value="transparent">
  <embed name="name" src="http://www.yourdomain.com/flashfile.swf"
  quality="high" wmode="transparent" width="468" height="60"
  type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?
P1_Prod_Version=ShockwaveFlash">
  </embed>
</object>
<script type="text/javascript">endIeFix();</script>

That's it, you're done!

If you don't like this solution, maybe this will be a link for you:
http://blog.deconcept.com/swfobject/