
function WriteSwf(img, wsize, hsize) {
    document.write("<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"" + wsize + "\" height=\"" + hsize + "\">");
    document.write("<param name=\"menu\" value=\"" + false + "\">");
    document.write("<param name=\"movie\" value=\"" + img + "\">");
    document.write("<param name=\"quality\" value=\"high\">");
    document.write("<param name=wmode value=transparent>");
    document.write("<embed wmode='transparent' src=\"" + img + "\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"" + wsize + "\" height=\"" + hsize + "\" menu=\"" + false + "\"></embed>");
    document.write("</object>");
}

function CheckFlash(htmlControlIDtest, imgName) {

    var version;
    var axo;
    var e;
    var okFlash = ""
    var isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;
    // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry
    try {
        // version will be set for 7.X or greater players
        axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");
        version = axo.GetVariable("$version");
    } catch (e) {
        okFlash = "0"
    }
    if (okFlash == "0" && isIE) {
        var htmlContainer = document.getElementById(htmlControlIDtest);

        if (imgName == "headerInnerNoScript.jpg") {
            htmlContainer.innerHTML = "<img src='" + imgName + "' alt='Mr. Talal Abu-Ghazaleh Personal' title='Mr. Talal Abu-Ghazaleh Personal Website' />"
        }
        else {
            htmlContainer.innerHTML = "<img src='" + imgName + "' alt='Mr. Talal Abu-Ghazaleh Personal' title='Mr. Talal Abu-Ghazaleh Personal' />"

        }
    }
}

