Since you seem to have abandoned this question I'll paste the answer here:
// makeObjectsOpaque() adds a tag to each tag
// analogous to
// it seems unlikely that adding a to an dynamically after
// it has been rendered by the browser will actually apply the value
// correctly; in other words, it *probably* WILL NOT WORK
function makeObjectsOpaque() {
var elementToAppend = document.createElement('param');
elementToAppend.setAttribute('name', 'wmode');
elementToAppend.setAttribute('value', 'opaque');
var objects = document.getElementsByTagName('object');
for(var i = 0; i < objects.length; i++) {
elementToAppend = elementToAppend.cloneNode(true);
objects[i].appendChild(elementToAppend);
}
}
// makeObjectsOpaque2() adds a 'wmode' attribute to each tag
// this should be analogous to in HTML
// THIS DOES NOT APPEAR TO BE WHAT YOU WANT TO DO ACCORDING TO
// THIS URL: http://kb2.adobe.com/cps/127/tn_12701.html
function makeObjectsOpaque2() {
var objects = document.getElementsByTagName('object');
for(var i = 0; i < objects.length; i++) {
objects[i].setAttribute('wmode', 'opaque');
// you can also try:
// objects[i].wmode = 'opaque';
}
}
// makeObjectsOpaque3() replaces every tag on the page with
// a cloned copy, adding a tag before replacing it
// analogous to replacing ...
// with ...
// this *may* cause the browser to re-render the and apply
// the newly added , or it may not
function makeObjectsOpaque3() {
var elementToAppend = document.createElement('param');
elementToAppend.setAttribute('name', 'wmode');
elementToAppend.setAttribute('value', 'opaque');
var objects = document.getElementsByTagName('object');
for(var i = 0; i < objects.length; i++) {
var newObject = objects[i].cloneNode(true);
elementToAppend = elementToAppend.cloneNode(true);
newObject.appendChild(elementToAppend);
objects[i].parentNode.replaceChild(newObject, objects[i]);
}
}
window.onload = makeObjectsOpaque3;
If there is already an onload event handler you'll have to do something like:
if(window.onload) {
var onLoad = window.onload;
window.onload = function() {
onLoad();
makeObjectsOpaque3();
};
} else {
window.onload = makeObjectsOpaque3;
}