http://xtc2.net/js/initialise-functions.js