 /* TODO: swliveconnect, play, loop, quality, scale, (s)align, base, menu, wmode, allowscriptaccess, plug-in detection, version */

function innerFlashHTML(container,movie,width,height,bgcolor,scale,align,wmode,allowscriptaccess) { // Usage: innerFlashHTML(document.getElementById("eltId"),"./media/movie.swf","550","400",...)
 container.innerHTML = flashHTML(movie,width,height,bgcolor,scale,align,wmode,allowscriptaccess);//.replace(/</g,"&lt;");
}
function flashHTML(movie,width,height,bgcolor,scale,align,wmode,allowscriptaccess) { // Usage: document.getElementById("eltId").innerHTML = flashHTML("./media/movie.swf","550","400",...)
 /* This can't be use directly: to avoid the IE's "click to activate" frame the function which writes the ActiveX HTML must be implemented in an external file. */
 /* « To create Web pages that load interactive controls that respond immediately to user input, use Microsoft JScript to load controls from external script files. » cf. http://msdn2.microsoft.com/en-us/library/ms537508.aspx */
 var object = new String();
 var embed = new String();
 object += '<object width="'+width+'" height="'+height+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,29,0">';
 object += '<param name="movie" value="'+movie+'" />';
 embed += '<embed src="'+movie+'" width="'+width+'" height="'+height+'"';
 if (bgcolor) {
  object += '<param name="bgcolor" value="'+bgcolor+'" />';
  embed += ' bgcolor="'+bgcolor+'"';
 }
 if (scale) {
  object += '<param name="scale" value="'+scale+'" />';
  embed += ' scale="'+scale+'"';
 }
 if (align) {
  object += '<param name="align" value="'+align+'" />';
  embed += ' align="'+align+'"';
 }
 if (wmode) {
  object += '<param name="wmode" value="'+wmode+'" />';
  embed += ' wmode="'+wmode+'"';
 }
 if (allowscriptaccess) {
  object += '<param name="allowscriptaccess" value="'+allowscriptaccess+'" />';
  embed += ' allowscriptaccess="'+allowscriptaccess+'"';
 }
 embed += ' pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash">';
 //return object+embed+'</embed></object>'; /* some  IE6.0 doesn't admit <object> injection */
 return embed+'</embed>';
}