// JavaScript Document
function swfmc(element_id, movie,width,height)
{

		element = document.getElementById(element_id);

		text = '';

        text += '<object id="flashobject" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="';
                // Width for Object TAG
        text +=  width;
        text += '" height="';
                // Height for Object TAG
        text += height;
        text += '">\n';
                // File for Object TAG
        text += '<param name="movie" value="';
        text += movie;
        text += '">\n';

        // Params for Object TAG
        text += '<param name="quality" value="high">\n';
        text += '<param name="menu" value="false">\n';
        text += '<param name="wmode" value="transparent">\n';
        text += '<param name="allowScriptAccess" value="always">\n';

                // File for EMBED TAG
        text += '<embed id="flashembed" src="';
        text += movie;
        text += '" quality="high" wmode="transparent" scale="noscale" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="';
                // Width for EMBED TAG
        text += width;
        text += '" height="';
                // Height for EMBED TAG
        text += height;

        // Params for Object TAG
        text += '" menu="false" scale="noscale"></embed>\n';
        text += '</object>';

        //document.captureEvents(Event.MOUSEUP);
        //document.onmouseup = (closeOverlay);
		element.innerHTML = text;


        document.captureEvents(Event.MOUSEUP);
        document.getElementById("FlashMovie").onmouseup = (closeOverlay);


}

function closeOverlay() {

        document.getElementById("FlashMovie").style.display = "none";
        //alert("Movie Closed");
}

