Originally supplied by collver@linuxfreemail.com in pkg/14359 and subsequently modified somewhat mostly by him.