Example 4, Same as example 1 with Jeff Yates' mozilla Range Patch:

<script type="text/javascript>
alert('hasFeature: '+document.implementation.hasFeature("Range","2.0"));
var x = document.createRange();
x.setStart(document.getElementsByTagName("p")[0],0);
x.setEnd(document.getElementsByTagName("p")[0],1);
alert('startContainer: '+x.startContainer);
alert('innerHTML: '+x.startContainer.innerHTML);
alert('startOffset: '+x.startOffset);
x.setStartBefore(document.getElementsByTagName("p")[0]);
x.setEndBefore(document.getElementsByTagName("p")[0]);
x.collapse("TRUE");
x.collapse("FALSE");
alert('startOffset: '+x.startOffset);
alert('collapsed: '+x.collapsed);
alert('selectedNode: '+x.selectNode(document.getElementsByTagName("p")[0]));
x.selectNode(document.getElementsByTagName("p")[0]);
x.selectNodeContents(document.getElementsByTagName("p")[0]);
alert('selectNodeContents: '+x);
var y = document.createRange();
y.setStart(document.getElementsByTagName("script")[0],0);
y.setEnd(document.getElementsByTagName("script")[0],1);
alert('compareBoundaryPoints(0,x): '+y.compareBoundaryPoints(0,x));
alert('compareBoundaryPoints(1,x): '+y.compareBoundaryPoints(1,x));
alert('compareBoundaryPoints(2,x): '+y.compareBoundaryPoints(2,x));
alert('compareBoundaryPoints(3,x): '+y.compareBoundaryPoints(3,x));
x.deleteContents();
x.extractContents();
x.cloneContents();
alert(document.body.innerHTML);
alert(x);
x.insertNode(document.getElementsByTagName("div")[0]);
x.surroundContents(document.getElementsByTagName("div")[1]);
var y = x.cloneRange()
alert(y.toString());
y.detach();
document.getElementsByTagName("div")[0].normalize();
alert(y);
Test Node 1
Test Node 2