function embedMovie(element, src, options)
{
	// replace the selected element with a new quicktime embed
	
	// determine if the options were provided
	if (!options)
	{
		options = [];
	}
	
	// create the object and embed elements
	var objectElement = document.createElement('object');
	var embedElement = document.createElement('embed');
	
	// set the object tag attributes for quicktime movies
	objectElement.setAttribute('classid', 'clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B');
	objectElement.setAttribute('codebase', 'http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0');
	
	// set the embed tag attributes
	embedElement.setAttribute('src', src);
	embedElement.setAttribute('pluginspage', 'http://www.apple.com/quicktime/download/');
	
	// add the quicktime parameters required for the object
	var paramElement = objectElement.appendChild(document.createElement('param'));
	paramElement.setAttribute('name', 'src');
	paramElement.setAttribute('value', src);
	
	// set the sizes and attributes of the object and embed to match the element
	if (element.width)
	{
		objectElement.setAttribute('width', element.width);
		embedElement.setAttribute('width', element.width);
	}
	if (element.height)
	{
		objectElement.setAttribute('height', element.height);
		embedElement.setAttribute('height', element.height);
	}
	if (element.align)
	{
		objectElement.setAttribute('align', element.align);
		embedElement.setAttribute('align', element.align);
	}
	if (element.className)
	{
		embedElement.className = element.className;
	}
	
	// check for optional parameters
	var supportedParameters = 
	[
		'autohref',
		'autoplay',
		'bgcolor',
		'cache',
		'controller',
		'correction',
		'dontflattenwhensaving',
		'enablejavascript',
		'endtime',
		'fov',
		'height',
		'hidden',
		'href',
		'kioskmode',
		'loop',
		'moveid',
		'moviename',
		'node',
		'pan',
		'playeveryframe',
		'pluginspage',
		'qtsrc',
		'qtsrcchokespeed',
		'qtsrcdontusebrowser',
		'scale',
		'starttime',
		'target',
		'targetcache',
		'tilt',
		'type',
		'volume',
		'width'
	];
	for (var parameter in supportedParameters)
	{
		if (options[parameter])
		{
			// set the attribute of the embed
			embedElement.setAttribute(parameter, (options[parameter] == false)? false: true);
			
			// add a parameter for this to the object
			paramElement = objectElement.appendChild(document.createElement('param'));
			paramElement.setAttribute('name', parameter);
			paramElement.setAttribute('value', (options[parameter] == false)? false: true);
		}
	}
	
	// now add the embed to the object so that it comes after the parameters
	objectElement.appendChild(embedElement);
	
	// now replace the original element with the object
	element.parentNode.replaceChild(objectElement, element);
}
