textmode in javascript example3 by evilpaulmore info at
evilpaul.org