Dev_DWT

I am trying to build an Object element that holds a Flash movie by directly adding an element node to the DOM. For the most part it is working correctly, as the following code will create and display the Flash movie:

ads_flashElement=document.createElement("object");
ads_flashElement.setAttribute("width", "600");
ads_flashElement.setAttribute("height", "250");
ads_flashElement.setAttribute("classid", "clsidBig Smile27CDB6E-AE6D-11cf-96B8-444553540000");
ads_flashElement.setAttribute("codebase", "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0");
ads_flashElement.setAttribute("movie", "mpuClipExpand.swf");

However when I add the "quality" attribute and try to set it to "high" I get a "Type Mismatch" JavaScript error in the browser. Why am I getting an error only on this attribute

I realize that these attributes are usually included as PARAM tags within the OBJECT tag, but when trying to add PARAM tags as child nodes of the object I could not get the Flash Movie to display. I found I could add the movie filepath value as a direct attribute of the Object element. Is this the correct way to do it Is there a better way to feed the parameters into the Object element than by adding them as attributes of that node