It's cute. Kind of surprising how much code it takes just to do one bare-bones window!
I'm very impressed by how you use long variable names to make your code self-documenting. That makes it very readable, despite some long scripts.
One problem: When I load it (Chrome, Mac) the window starts jumping around the screen all by itself, and the close and max/min buttons appear and disappear randomly. When I enable JS, it stops doing that and starts working. I read the one procedure in which you use JS, and I didn't see anything that should lead to that behavior.
Figuring out the exact width of a text is why the WRITE primitive moves the sprite to the end of the text. You subtract the starting position from the ending position.