This is the javascript / html5 web-client code