﻿function CreateFlashObject(strDivID, strObjectTagID, intWidth, intHeight, strURL, strFlashVars) {
    var d = document.getElementById(strDivID);
    d.innerHTML = '<object id="' + strObjectTagID + '" ' +
						'codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" ' +
						'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
    //'codeBase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" ' +
    //	'classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ' +
						'height="' + intHeight + '" ' +
						'width="' + intWidth + '"' +
					'>' +
                    '<param name="_cx" value="3281" />' +
                    '<param name="_cy" value="3016" />' +
                    '<param name="FlashVars" value="' + strFlashVars + '" />' +
                    '<param name="Movie" value="' + strURL + '" />' +
                    '<param name="Src" value="' + strURL + '" />' +
                    '<param name="Play" value="-1" />' +
                    '<param name="Loop" value="-1" />' +
                    '<param name="Quality" value="High" />' +
                    '<param name="SAlign" value="" />' +
                    '<param name="Menu" value="-1" />' +
                    '<param name="Base" value="" />' +
                    '<param name="AllowScriptAccess" value="always" />' +
                    '<param name="Scale" value="ShowAll" />' +
                    '<param name="DeviceFont" value="0" />' +
                    '<param name="EmbedMovie" value="0" />' +
                    '<param name="BGColor" value="" />' +
                    '<param name="SWRemote" value="" />' +
                    '<param name="MovieData" value="" />' +
                    '<param name="SeamlessTabbing" value="1" />' +
                    '<param name="wmode" value="transparent" />' +
                    '<embed ' +
						'swliveconnect="true" ' +
						'id="' + strObjectTagID + '" ' +
						'name="' + strObjectTagID + '" ' +
						'src="' + strURL + '" ' +
						'quality="high" ' +
						'pluginspage="https://www.macromedia.com/go/getflashplayer" ' +
						'type="application/x-shockwave-flash" ' +
						'width="' + intWidth + '" ' +
						'height="' + intHeight + '" ' +
						'wmode="transparent" ' +
						'FlashVars="' + strFlashVars + '" ' +
                    ' />' +
                    '</object>';

    d.style.height = intHeight + 'px';
    d.style.width = intWidth + 'px';
    d.style.marginRight = 'auto';
    d.style.marginLeft = 'auto';
}
