function insertMovie(type, src, width, height, errhtml, version, quality, controls, autoplay, loop, bgcolor, wmode, flashvars) {

	if (type == 'qt') {
		if (Browser.Engine.trident) {
			document.write('<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="'+width+'" height="'+height+'">');
			document.write('<param name="src" value="'+src+'" />');
		} else if (Browser.Engine.webkit) {
			document.write('<object type="video/quicktime" src="'+src+'" width="'+width+'" height="'+height+'">');
		} else {
			document.write('<object type="video/quicktime" data="'+src+'" width="'+width+'" height="'+height+'">');
		}
	} else {
		if (Browser.Engine.trident) {
			document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="'+width+'" height="'+height+'">');
			document.write('<param name="movie" value="'+src+'" />');
		} else {
			document.write('<object type="application/x-shockwave-flash" data="'+src+'" width="'+width+'" height="'+height+'">');
		}
	}

	// Set params
	if (quality) { document.write('<param name="quality" value="'+quality+'" />'); }
	if (controls) {
		if (type == 'qt') {
			document.write('<param name="controller" value="'+controls+'" />');
		} else {
			document.write('<param name="menu" value="'+controls+'" />');
		}
	}
	if (autoplay) {
		if (type == 'qt') {
			document.write('<param name="autoplay" value="'+autoplay+'" />');
		} else {
			document.write('<param name="play" value="'+autoplay+'" />');
		}
	}
	if (loop) { document.write('<param name="loop" value="'+loop+'" />'); }
	if (bgcolor != 0) { document.write('<param name="bgcolor" value="'+bgcolor+'" />'); }
	if (type != 'qt' && wmode) { document.write('<param name="wmode" value="'+wmode+'" />'); }
	if (type != 'qt' && flashvars) { document.write('<param name="flashvars" value="'+flashvars+'" />'); }

	document.write(errhtml);
	document.write('</object>');
}
