JavaScript window context settings

Made a change that lets javascript load config values in the context of a window so that if that config value is a function, then it can respond to the currently active window. 

The purpose was so that I could put javascript code in the windowHints* config settings which would respond to the window the hint was for.