function createEmbed( href,divid,width,height ) {
// create the element
var embed = document.createElement( "EMBED" );
// set its attributes. (this is an example taken from above)
embed.setAttribute( "allowFullScreen", "false" );
embed.setAttribute( "src", href );
embed.setAttribute( "type", "application/x-shockwave-flash" );
embed.setAttribute( "width", width );
embed.setAttribute( "height", height );
embed.setAttribute( "play", "true" );
embed.setAttribute( "loop", "true" );
embed.setAttribute( "id", "flash_movie" );
embed.setAttribute('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0');
embed.setAttribute( "quality", "high" );
embed.setAttribute('pluginspage', 'http://www.macromedia.com/go/getflashplayer');
embed.setAttribute('align', 'middle');
embed.setAttribute('scale','showall');
embed.setAttribute('wmode','window');
embed.setAttribute('devicefont','false');
embed.setAttribute('bgcolor','#000000');
embed.setAttribute('name','flash_movie');
embed.setAttribute('menu','true');
embed.setAttribute('allowScriptAccess','sameDomain');
embed.setAttribute('movie',href);
embed.setAttribute('salign','');
// display it somwhere
var flash_box = document.getElementById( divid );
flash_box.appendChild( embed );
}
function removeEmbed(divid) {
// find the box
var flash_box= document.getElementById( divid );
// find the embedded element
var embed	= document.getElementById( "flash_movie" );
// remove the embedded element
flash_box.removeChild( embed );
}
