If you searched around you probably would find where I made similar modifications (upgrade to FF and NS7.2) in response to a request in the Dynamic Drive Scripts Help section. I did not make the 'documentElement' modification as, it was not called for in that situation. If made, it should be done in such a way as to allow it to still be 'body' for those browsers and pages without doctype support. There is a fix for that, insert this function in your script:
function iecompattest(){
return (document.compatMode && document.compatMode.indexOf("CSS")!=-1)? document.documentElement : document.body
}then wherever the script uses:
document.body
substitute:
iecompattest()
As for the policy on orphans, there is none I am aware of.