/*  ObjectSwap for ie
Author: Karina Steffens, www.neo-archaic.net
simplify by xiaoma<xiaoma@taobao.com> at 2007-01-17
*/
//document.write('<style id="hideObject">object{visibility:hidden;}</style>');
(function(){
/*
var style = document.createElement("style");
style.setAttribute("type", "text/css");
style.setAttribute("id", "hideObject");
style.styleSheet.cssText = "object{visibility:hidden;}";
document.getElementsByTagName("head")[0].appendChild(style);
*/
var objects = document.getElementsByTagName("object");
for (var i=0; i<objects.length; i++){
var o = objects[i];
if (o.className.indexOf("NoSwap") != -1) continue;
var h = o.outerHTML;
var params = "";
var hasFlash = true;
for (var j = 0; j<o.childNodes.length; j++) {
var p = o.childNodes[j];
if (p.tagName == "PARAM")
params += p.outerHTML;
}
var tag = h.split(">")[0] + ">";
var newObject = tag + params + o.innerHTML + " </OBJECT>";
o.outerHTML = newObject;
}
//document.getElementById("hideObject").disabled = true;
})();
