var hasReqestedVersion = DetectFlashVer(7, 0, 0);

function InsertFlashContent(width, height, flash, image, alt) {
    //<![CDATA[
    var nonflashContent = "";
        '<img src="' + image + '" alt="' + alt + '" width="' + width + '" height="' + height + '" />';
    //]]>
    //<![CDATA[
    var flashContent = 
        '<object type="application/x-shockwave-flash" width="' + width + '" height="' + height + '" data="' + flash + '">' +
        '<param name="allowScriptAccess" value="sameDomain" />' +
        '<param name="movie" value="' + flash + '" />' +
        '<param name="loop" value="true" />' +
        '<param name="menu" value="false" />' +
        '<param name="quality" value="high" />' +
        '<\/object>';
    //]]>
    if (hasReqestedVersion)
        document.write(flashContent);  // insert flash content
    else
        document.write(nonflashContent);  // insert non-flash content
}