function flash(obj) {
    document.write(
        '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"' + (obj.width ? ' width="'+obj.width+'"' : '') + (obj.height ? ' height="'+obj.height+'"' : '') + ' id="flashObject" align="top">' + "\n" +
        '    <param name="allowScriptAccess" value="sameDomain" />'+ "\n" +
        '    <param name="movie" value="'+obj.src+'" />'+ "\n" +
        '    <param name="quality" value="high" />'+ "\n" +
		'    <param name="menu" value="false" />'+ "\n" +
		'    <param name="bgcolor" value="'+obj.background+'" />'+ "\n" +
		'    <param name="wmode" value="'+obj.transparency+'" />'+ "\n" +
		'    <param name="flashvars" value="'+obj.flashVars+'" />'+ "\n" +
        '    <embed src="'+obj.src+'" flashvars="'+obj.flashVars+'" wmode="'+obj.transparency+'" bgcolor="'+obj.background+'" menu="false" quality="high"' + (obj.width ? ' width="'+obj.width+'"' : '') + (obj.height ? ' height="'+obj.height+'"' : '') + ' id="flashObject" align="top" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" />' + "\n" +
        '</object>'
    );
}

function setFlashSize(newW, newH){
	var newH = newH;
	document.getElementById("flashke").style.width	= newW+"px";
	document.getElementById("flashke").style.height	= newH+"px";
}

/*


USAGE: 

<script type="text/javascript" src="/scripts/flash.js"></script>



<div id="flashke">
  <script type="text/javascript">
    var obj = {ldelim}
      'src':'loader.swf', 
      'width':'940', 
      'height':'100%', 
      'transparency':'window',
      'background':'#CDD7D8'
    {rdelim};
    flash(obj);
  </script>
</div>


*/