[Prototype] Create Wrapper Automatically

I have a special need to wrap all the body content into a single <div/>. It's quiet easy to achieve while uses the surroundContents method in W3C Range. However, it doesn't have any equivalent method in Internet Explorer Range. I use appendChild() to append the existing node to the new wrapper <div/> node.

Blog Post in Chinese : http://josephj.com/entry?id=301