Simple Blockdraw application using ECMAScript 5