A contribution from Daniel Black, with minor additional enhancements.
Attach a file by drag & drop or click to upload