textmode in javascript example2 by evilpaulmore info at
evilpaul.org