Almost working.

(except Javascript permission thing.  reading this...

http://stackoverflow.com/questions/22481340/error-permission-denied-to-access-property-document

)