code by  Shane McCarron, originally hosted at http://htmlwg.mn.aptest.com/viewcvs/viewcvs.cgi/htmldiff/htmldiff