
function iframeFitHeight(oIframe) {//Iframe窗口自适应高度 兼容IE6.0 FF2.0以上 
    try {
        var oWin = oIframe.name ? window.frames[oIframe.name] : oIframe.contentWindow;
        oIframe.style.height = oWin.document.body.scrollHeight + "px";
    }
    catch (e) { }
}
function isIe(flashId, flash, _width, _height) {
    document.writeln("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" + _width + "\" height=\"" + _height + "\" id=\"" + flashId + "\">");
    document.writeln("   <param name=\"movie\" value=\"" + flash + "\" />");
    document.writeln("   <param name=\"allowScriptAccess\" value=\"sameDomain\" />");
    document.writeln("   <param name=\"quality\" value=\"high\" />");
    document.writeln("   <param name=\"menu\" value=\"false\" />");
    document.writeln("   <param name=\"wmode\" value=\"transparent\" />");
    document.writeln("   <embed src=\"" + flash + "\" quality=\"high\"  allowScriptAccess=\"sameDomain\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + _width + "\" height=\"" + _height + "\" wmode=\"transparent\"></embed>");
    document.writeln("</object>");
}

function isFF(flashId, flash, _width, _height) {
    document.writeln("<EMBED src=\"" + flash + "\"  width=\"" + _width + "\"  height=\"" + _height + "\"  allowScriptAccess=\"sameDomain\" quality=\"high\" TYPE=\"application/x-shockwave-flash\" id=\"" + flashId + "\" scale=\"exactfit\" wmode=\"transparent\" menu=\"false\">");
    document.writeln("</EMBED>");
}

function ShowFlash(flashId, flash, _width, _height) {
    var OsObject = "";
    if (navigator.userAgent.indexOf("MSIE") > 0) {
        isIe(flashId, flash, _width, _height);
    }
    else if (isFirefox = navigator.userAgent.indexOf("Firefox") > 0) {
        isFF(flashId, flash, _width, _height);
    }
    else {
        isFF(flashId, flash, _width, _height);
    }
}
