/** give a string instead of the doc.loc to only run the code on the given address */
var runHREF = "" + document.location.href;

if (document.location.href == runHREF && swfobject.getFlashPlayerVersion().major > 7)   {
    flashIntroId    = "flashIntro",
    dimIntroId      = "dimIntro",
    flashIntro      = document.createElement("div"),
    dimIntro        = document.createElement("div");
    flashIntro.id   = flashIntroId;
    dimIntro.id     = dimIntroId;
    dimIntro.appendChild(flashIntro);
    document.body.appendChild(dimIntro);


    function removeIntro()  {
        if (dimIntro) document.body.removeChild(dimIntro);
    }

    function hideIntro(fast)    {
        var amp = fast ?3:1,
            speed = 750/amp;
        if (dimIntro) dimIntro.innerHTML = "";
        if ($(dimIntro)) $(dimIntro).fadeOut(speed, removeIntro);
    }

    dimIntro.onclick = function() {
        hideIntro(true);
    };

    swfobject.embedSWF("./images/intro.swf", flashIntroId, "640", "360", "8.0.0", "./js/swfobject/expressInstall.swf", null, {
        bgcolor: "black"
    }, {
        styleclass: flashIntroId
    });
}
