Dialog windows tests

This is a JS language feature and I quite like it. I don't see any point of late–defining `var`s. But functions, I do. It looks better when they are defined below.