How to improve calculator

I am looking for some suggestions on how to refactor my calculator code:
I guess I would like to tighten thinks up, perhaps using functional js.
I know that I should probably build the entire calculator with js but I am not there yet.

You will notice I use global variables and a number of flags to manage the state.
(prevent double decimal points double operations etc.)
I could use more getters and setters but this would make it even less elegant.

Also as you can see I am not very good at design. Thanks for your time and attention.

Happy coding,

  • Chris

Did I say something wrong?