change innerText to textContent in htmlEncode()/htmlDecode() for wider browser support; add range methods; add method origin()